> I have a small app that has the screenOrientation set to "portrait" in
> the manifest file for the single activity it contains.
>
> It works fine, except for Honeycomb devices, which users are reporting
> to me that if they are holding the device in landscape position, the
> app will crash instead of remaining in portrait mode.
>
> Do I have to do something extra to keep it forced in portrait, or is
> it simply not possible to do this in Honeycomb?
This sample project works fine on Honeycomb:
https://github.com/commonsguy/cw-android/tree/master/Rotation/RotationFour
If you have an app in production, you should be doing something to get
stack traces (e.g., Android Market console, ACRA, Flurry), which
should help you determine where things are going wrong.
Bear in mind that having android:screenOrientation="portrait" does not
stop Android from destroying and recreating your activity. Hence, you
still need to use onSaveInstanceState() and/or
onRetainNonConfigurationInstance(), just as you do for any other
configuration change (dock, locale, etc.).
--
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy
_The Busy Coder's Guide to *Advanced* Android Development_ Version
1.9.2 Available!
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en