Gobind kumar Gobind kumar - 1 month ago 17
Android Question

ViewPager issue: To finish Activity on swiping last page

I want to finish an

Activity
when a user is in last fragment inside of a
view Pager
and try to swipe for next screen.

Thanks in advance.

Answer

There isn't any direct way but you can include a blank page at last index of ViewPager. So when user comes to this blank page, which most probably will be a fragment, call activity finish.

Comments