Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

isinfinite=false not working #8

Closed
matinashtiani opened this issue Apr 24, 2018 · 7 comments
Closed

isinfinite=false not working #8

matinashtiani opened this issue Apr 24, 2018 · 7 comments

Comments

@matinashtiani
Copy link

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 :)

@siralam
Copy link
Owner

siralam commented Apr 24, 2018

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!

@matinashtiani
Copy link
Author

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

@siralam
Copy link
Owner

siralam commented Apr 24, 2018

autoScroll="true"

@matinashtiani
Copy link
Author

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?

@siralam
Copy link
Owner

siralam commented Apr 24, 2018

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.

@siralam siralam closed this as completed Apr 24, 2018
@matinashtiani
Copy link
Author

Ok, thanks for your time and consideration.

@siralam
Copy link
Owner

siralam commented Apr 24, 2018

You're welcomed, happy coding!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants