ViewPager.setOffscreenPageLimit(0) doesn't work as expected
Like the question. But I need a custom Viewpager which load one page on time. Is there any example?<
Yes you can do this with following steps
count
variable in the adapter classViewPager
Adapter make a public
function say setCount()
getCount()
function of Adapter return
the count
variableoverride
the on pageScroll()
function of the ViewPager
when the
user flips the page you can call the setCount()
to increase the count
of the count variableindex
is last and page is
scrolled to leftthis should work .