0

In my app I have to implement a registration process represented by four pages. I want to store each page's information in a session so that at the end of the fourth page when I click the register button, all data could be stored in my local database. I have a next button at the end of each page.

When I click the next button the validation for that page would happen and if all valid details entered the app will navigate to the next page.

I have two questions:

  1. How do I navigate between the four pages?
  2. How can I maintain the session until I reach the fourth page?
RivieraKid
  • 5,923
  • 4
  • 38
  • 47
Barbie
  • 19
  • 7

1 Answers1

1

I suggest you to use a single Activity with NonSwipeableViewPager such that you don't need a session since all the data is stored in the Activity. See my answer here.

Community
  • 1
  • 1
user2558461
  • 281
  • 1
  • 6
  • 21
  • good approach! would do it the same way. Instead of the NonSwipeableViewPager you could just use Fragments and store the Values in the MainActivity from Fragment like this: `((MainActiivty)getActivity()).storeValues(...)` – A.S. Nov 12 '13 at 14:14
  • 1
    I suggested NonSwipeableViewPager with FragmentPagerAdapter due to the smoothScroll to allow the actual switch between Fragments. This way I allow the user to return and edit the previous pages – user2558461 Nov 12 '13 at 14:40