I am trying to add some visual indication, that there are no more pages in the desired fling direction in the ViewPager. However I am struggling to find a place, where to put re
Usually with ViewPager, one uses a PagerAdapter
such as FragmentPagerAdapter
or FragmentStatePagerAdapter
to flood the ViewPager with contents(your content are going to be views).
Now, when you use a PagerAdapter
, you have one method called getCount()
, http://developer.android.com/reference/android/support/v4/view/PagerAdapter.html#getCount%28%29 ,which will give you the size of the content.
Since you now, know the size you can easily display a message with an if control statement.
Try this code : http://developer.android.com/reference/android/support/v4/view/ViewPager.html
Note: I dont think you need a custom ViewPager. You will also need to understand Fragments for ViewPager. Look at samples in ApiDemos. Its a great source.