11 ms·
"When the user rotates the device your activity is completely reset" You just need to set " android:configChanges="orientation|keyboardHidden" in the manifest.
by warrenmiller 13y ago
"When the user rotates the device your activity is completely reset"
You just need to set " android:configChanges="orientation|keyboardHidden" in the manifest.
This is very well documented.
- ZoFreX 13y agoThis is definitively the wrong way to handle the problem he describes in the article. Even if you set this in the manifest you need to store your state and resume from it correctly. An orientation change is the most common configuration change that causes activities to be restarted, but is far from the only one.
- srcreigh 13y agoThis. The most common other case in which you need to restore state is when your app goes into the background, and is restored.
- bestdayever 13y agoIt's also documented to be the wrong way to store state and a horrible idea.