• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Start Activity from where it stops

ridoy

Lurker
I have 2 activity...suppose i name it activity A and activity B.When the application starts it shows activity A.Then after 5 seconds,it automatically switch to activity B.Activity B contains a listview and checkboxes with each item of listview.If user checks something then he press back button and returns to activity 1 page.All these works correctly.
Now my problem is,activity A has a button to go again activity B page.When user press this button i want to start activity B from where it stops..that means the user will see what items he had checked earlier.Is it possible to view the activity B page from where it stops?
 
Sure. Override the onPause method to save the state using something like SharedPreferences and then override the onResume method to restore this state.
 
Back
Top Bottom