I added an intro activity to my app, but I realized that if the user presses the back button while viewing the first slide, the activity will simply close. This is a problem if the user needs to grant permissions, accept terms and conditions, etc.
Using the proposed method getCurrentSlideIndex(), I could do something like this in my intro activity:
@Override
public void onBackPressed() {
if (getCurrentSlideIndex() != 0) {
super.onBackPressed()
}
}
I added an intro activity to my app, but I realized that if the user presses the back button while viewing the first slide, the activity will simply close. This is a problem if the user needs to grant permissions, accept terms and conditions, etc.
Using the proposed method getCurrentSlideIndex(), I could do something like this in my intro activity: