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

  1. Rotate the orientation setting with configChanges and place the code to save and save the example.
  2. or On Configuration (Keeping in mind you do not need to save / restore the state - this is the same activity).

Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -