neevek/Paginize

Stack question

Closed this issue · 1 comments

How I can finish old screen.
For exmp screen1 - > screen2 (when I backpress it is show scree1 =( )

You can achieve that in three ways:

  1. Use an Activity for screen1 and another for all other pages(I assume you are implementing splash screen page) and finish() the first Activity before starting the next activity(remember that you can customize transition for activities. Note, this is not provided by Paginize).
  2. Override onBackPressed() in screen2 and use getPageManager().popTopNPages() to dismiss multiple pages with 1 call.
  3. Call hide(false) before showing screen2, but the transition effect may be desired.

I deleted my previous comment on issue#10 recommending using single Activity with Paginize, it was misleading, so I will rephrase it because it is more relevant to the question here:

It is highly recommended to use Paginize with single Activity for the core business logic of the app, and use different Activities for different phases of the app, like the ones for splash screen and user guide screens, because activities for these kinds of screens are likely to be destroyed before entering the main app Activity.