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
2 Answers
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
Comments
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