Note that there are some explanatory texts on larger screens.

plurals
  1. POSave activity state(not just some variables) on orientation change
    primarykey
    data
    text
    <p>I realized that there are lots of question on this topic already asked on SO. But I don't even know the basic when it comes to <strong>saving the state of an activity</strong>.</p> <blockquote> <hr> </blockquote> <p>(Refer Screenshot Below) When app launches,</p> <p>1) ScrollView item 1,2,3,4 are visible</p> <p>2) table containd data which is populated due to Gainer button.</p> <blockquote> <hr> </blockquote> <p>As showed in below screenshots, <strong>While app is running in PORTRAIT mode</strong>, I </p> <p>1)scrolled down to ScrollView item 4,5,6</p> <p>2)pressed the Loser button so accordingly data in the table below the button changes.</p> <p>3)I'll even change content of graph dynamically(which I had not done yet).</p> <blockquote> <hr> </blockquote> <p><strong>Now I switch to LANDSCAPE Mode</strong> so</p> <p>1)ScrollView is showing ScrollView item 1,2,3,4</p> <p>2)table is showing data which is populated due to pressing Gainer button.</p> <p>3)graph is as it is as I've not changed it yet(which I will change later).</p> <blockquote> <hr> </blockquote> <p>So what happens is when I change the orientation, my activity is getting re-launched. So if user is performing some task in one orientation and he changes the orientation, then whole progress will be lost.</p> <p>I know I need to save the state of the activity and Restore it when orientation changes. But I don't know from where to start and what to save.</p> <p><strong>ANY HELP WILL BE LIFE-SAVER !</strong></p> <p><img src="https://i.imgur.com/lpcGV.png" alt="Scrrenshot"></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload