I have an issue with my android app when i use android:configChanges="orientation". I want to prevent reloading activity after changing acreen orientation (above xml param works in other app) but this time it fails.
The thing is, that i want my activity (SherlockActivity) to keep portrait on start, but after OnClickListener event i need to enable it with:
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR);
Is there any other method that should be run to prevent that reload?
The
android:configChangesparameter should work (it worked for me flawlessly). Just a blind guess – if you’re targeting API level 13 or higher, you also have to includescreenSize:(excerpt from here)