TangoAgency / material-intro-screen

Inspired by Heinrich Reimer Material Intro and developed with love from scratch
MIT License
2.71k stars 411 forks source link

Added method for getting index of current slide #120

Closed mileskrell closed 2 years ago

mileskrell commented 7 years ago

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()
    }
}
simonesessa commented 7 years ago

Hi, how can I use this or a similar method?

mileskrell commented 2 years ago

Closing this to clean up my open pull requests page, since the last release was in 2016