1

I want to know how can I save state of a page(Activity) so when I come back to that page it should be in state in which I left it. for eg if I checked a checkbox in page so after leaving that page when I come back that checkbox should be checked as I left. thanks in advance

1

2 Answers 2

1

http://mobile.tutsplus.com/tutorials/android/android-application-preferences/

Take a look at this tutorial about SharedPreferences

or

http://developer.android.com/reference/android/content/SharedPreferences.html

Sign up to request clarification or add additional context in comments.

Comments

0

If you are talking about a case where another Activity interrupts the current one then you should look into managing the Activity lifecycle http://developer.android.com/guide/topics/fundamentals/activities.html#Lifecycle onSaveInstanceState(), onRestoreInstanceState() or in onPause() and onResume().

If this is for persistent data storage then SharedPreferences / DB or some other form of storage would be required: http://developer.android.com/guide/topics/data/data-storage.html

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.