android - My activity become blank when i toggle Auto-rotate screen setting -
I have an activity with which I'm handling screen orientation:
@ Override Secure Zero to Savings InstantState (Bundle Outstate) {Super. Onsiteinstastet (outstate); UiHelper.onSaveInstanceState (outState); Outstate.putSerializable ("Some Wide Objects", videoEntityList); } and
Android: configChanges = "keyboardHidden" orientation " in the manifest.
When my activity becomes open and I toggle the auto-rotation in the device setting activity, it becomes empty.
Is any body not helping me for some reason ??
Because it is in your manifest
android: configChanges = " KeyboardHidden; Orientation " Android will not delete your activity on rotation and will rebuild. Therefore onSaveInstanceState will not even be called.
Either
- Rotate the orientation setting with configChanges and place the code to save and save the example.
- or
On Configuration(Keeping in mind you do not need to save / restore the state - this is the same activity).
Comments
Post a Comment