1. Check out our companion app, Forums for Android! Download from Google Play

Start Activity from where it stops

Discussion in 'Application Development' started by ridoy, Oct 28, 2012.

  1. ridoy

    ridoy New Member
    Thread Starter
    5

    Jan 21, 2012
    3
    0
    5
    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?
     

    Advertisement

  2. jonbonazza

    jonbonazza Well-Known Member
    163

    Jul 13, 2010
    1,934
    458
    163
    Male
    Sure. Override the onPause method to save the state using something like SharedPreferences and then override the onResume method to restore this state.
     

Share This Page

Loading...