-1

hi I have gridview that has custom layout , the custom layout is a framelayout that has two buttons and one button is visible only when the use clicks on other button... like the user can strike off on click on a number ( i am trying to be clear please let me know if anyone did not understand) ... now my issue is that... HOW TO I SAVE THE STATE of the activity. I want to user to strike off the same number of buttons as he did in landscape or portrait mode... even when he changes the orientation of the tablet.

Finally how do i make sure the activity remains in the same state when the user changes the orientation...

quinestor
  • 1,432
  • 4
  • 19
  • 40
user1106888
  • 245
  • 3
  • 14
  • Your question is actually about an activity's lifeCycle Take a look at the activity lifecycle on android's api page, I'm sure the 20 minutes invested there will clarify all to you – quinestor Sep 05 '12 at 20:22

1 Answers1

0

Take a look at the method overrides on Activity.

http://developer.android.com/reference/android/app/Activity.html

Specifically, you need http://developer.android.com/reference/android/app/Activity.html#ConfigurationChanges

See onSaveInstanceState. Good luck.

Simon
  • 14,407
  • 8
  • 46
  • 61