GreenDroid Paged View - Detect if last page

160 Views Asked by At

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.

1

There are 1 best solutions below

1
On BEST ANSWER

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 */
    }
}