question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ViewPager scrolls back immediately to the first item when there are only two items

See original GitHub issue

When the user scrolls to the second item, if the layout has only two FlipperViews, the ViewPager scrolls back immediately to the first item. The ViewPager should remain at that position (or switch after a certain amount of time if auto cycle is enabled).

Here is an example: ezgif-6-444070d61c5f

This problem doesn’t occur when there are more than two FlipperViews. ezgif-6-153ac05e0290

Version of the library used: 1.6.0

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:37 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
therealshabicommented, Feb 23, 2020

Merged your PR into the dev branch. Will merge and release from the master after testing the implementation. Thanks for your contribution

1reaction
Sonphilcommented, Feb 23, 2020

@therealshabi I made a small change and opened a pull request: #39

Read more comments on GitHub >

github_iconTop Results From Across the Web

Moving view pager to first item when the end ... - Stack Overflow
When I swipe to the last view pager screen, it is automatically getting scrolling to the first one. It should scroll to the...
Read more >
Creating a ViewPager in Jetpack Compose
It's possible to overshoot items so that the user can scroll past the first or last item, but the pager then resets back...
Read more >
Slide between fragments using ViewPager2
If the user scrolls halfway between pages one and two, page one has a position of -0.5 and page two has a position...
Read more >
ViewPager with FragmentPagerAdapter - CodePath Cliffnotes
This solves the common problem of needing to access the current item within the ViewPager.
Read more >
ViewPager2 with Navigation Component - Onboarding Screens
You will learn how to show Onboarding screens only the first time a ... Fragment 1:50 - Create ViewPager Fragment 2 :50 -...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found