> I want my Activity to be always in portrait mode and I do NOT want the > onDestroy() method to be called. > There are some interesting articles about that at: > http://www.androidguys.com/2008/11/24/rotational-forces-part-four/ > > The solution seems to be: > In AndroidManifest.xml: > <activity android:name=".MyActivity" > android:screenOrientation="portrait" > android:configChanges="keyboardHidden|orientation"> > > > In Activity code: > public void onConfigurationChanged(Configuration newConfig) > { > super.onConfigurationChanged(newConfig); > } > > I've tried it and it seems to work. Is there any other alternative or > is it the correct solution?
Well, I think it's the correct solution. But, then again, I'm biased in favor of the author of that fine, upstanding blog post. ;-) -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html --~--~---------~--~----~------------~-------~--~----~ 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-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---