siralam/LoopingViewPager

isinfinite=false not working

matinashtiani opened this issue · 7 comments

I am using your sample code and I set the isinfinite =false in xml. Also I set it false in adapter constructor. but the view pager is in loop yet and unfortunately nothing happend!!
please help me with this problem.
thank you so mush :)

but the view pager is in loop yet and unfortunately nothing happend!!

Would you mind clarify this sentence? I am not sure I get what you mean.

If you set isInfinite to false, autoScroll is still enabled and it will jumps to the first page after it reaches the end, just the animation (flip page) direction should be different. isInfinite only means that you can flip using the same direction, from the last page to the first page, as if the loop is circular.

If this does not answer your question and what you mean is isInfinite="false" is not working, please post your code, thanks!

oh, I used isinfinite=false to make my viewpager non-circular. Then, how can I do this? (make non-circular auto-scroll viewpager)

autoScroll="true"

Thank you for your response but setting autoScroll="true" cannot help me. I want to the viewpager scroll automatically from first page to the last one, but stay in the last page and does not move to first page. Can you help me about this?

Oh, this cannot be accomplished by this library (lose the point of using it), but also need not to use any library.

Simply use a Handler with postDelayed() and flip page every N seconds until the last page, then you are done.

Like this stackoverflow answer.

Ok, thanks for your time and consideration.

You're welcomed, happy coding!