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
            Asked
            
        
        
            Active
            
        
            Viewed 221 times
        
    1
            
            
        - 
                    I think this can help you http://stackoverflow.com/questions/151777/how-do-i-save-an-android-applications-state – dev mz Jul 21 '11 at 14:12
2 Answers
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
 
    
    
        Nikola Despotoski
        
- 49,966
- 15
- 119
- 148
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
 
    
    
        source.rar
        
- 8,002
- 10
- 50
- 82
