Wednesday, 21 August 2013

Finishing the Navigation Drawer Activity

Finishing the Navigation Drawer Activity

I have a NavigationDrawerActivity which has a button in the navigation
drawer that navigates to the previous activity. I achieve this through
calling finish(), which works well. Inside my NavigationDrawerActivity, I
have a ViewPager. My issue is that when I call finish from the activity,
the ViewPager will go back to the first page before going back to the
previous activity. I'm assuming this happens because the ViewPager kills
off the pages one by one, so my question is, how can I make this
transition invisible to the user? I want the user to be able to go
directly from the 2nd page or 3rd page to the previous activity. All the 3
pages in the ViewPager must remain active and I have tried making a new
intent for the previous activity and starting it (which did not work).
Thanks

No comments:

Post a Comment