Cell orientation change

I have an activity that cannot be recreated after changing orientation. I added the following to the activity declaration in the manifest:

android:configChanges="orientation" 

On Android 2.3, this works fine. On HONEYCOMB_MR2, onCreate is called anyway when the orientation changes.

Is there anything else that needs to be done on HONEYCOMB_MR2 to prevent the re-creation of activity after changing orientation?

+17
android android-3.0-honeycomb screen-orientation
Aug 6 '11 at 16:20
source share
1 answer

Apparently, using orientation|screenSize (?) Prevents onCreate on Honeycomb and (for now) doesn't look like anything in previous versions of Android.

 android:configChanges="orientation|screenSize" 

I don’t know why this is necessary, and I don’t understand the document about this new meaning.

I suspect that in HONEYCOMB_MR2, when the orientation changes, the activity sees this as two configuration changes: orientation and screen size. And both attempts to recreate the default activity.

+37
Aug 6 '11 at 16:35
source share



All Articles