0

I made a class MyPagedView extends GDActivity and have a PagedView.

I implemented a working PagedAdapter as class MyPagedAdapter.

I would like to be able to get out of the PagedView once the latest page have been displayed to make a tutorial/introduction to my Android application.

Please help me I can't find the right method to get triggered once the slides have reach the end.

shkschneider
  • 17,833
  • 13
  • 59
  • 112

1 Answers1

0

Use ViewPager.OnPageChangeListener.. the onPageSelected(int position) is most likely the callback that you need.

void onPageChanged(int position) {
    if (position == pageCount-1) {
       /* you are on last page */
    }
}
Ron
  • 24,175
  • 8
  • 56
  • 97
  • Thanks, it worked with `OnPagedViewChangeListener` and `onPageChanged(PagedView pagedView, int previousPage, int newPage)` with `if (newPage == PAGE_COUNT - 1)` – shkschneider Jul 26 '12 at 12:14