AndroidDev (Pro) tip: Do not forget screenSize

So you are stuck using screenOrientation in your android:configChanges list within your AndroidManifest. Your activity will not be recreated, but will receive a callback instead.
You may not know that this is insufficient on API level of 13 or above.

In API level 13 or above, the screen size changes when the orientation changes, so this cause the activity to be destroyed. If you still want to keep the state and use onConfigurationChanged() you will also need to use screenSize.

Leave a Reply

*

captcha *