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

No. of dots don't change when deleting #139

Closed
RichestYoo opened this issue Jan 8, 2022 · 2 comments
Closed

No. of dots don't change when deleting #139

RichestYoo opened this issue Jan 8, 2022 · 2 comments
Assignees
Labels
Milestone

Comments

@RichestYoo
Copy link

Hello.
I found something not intuitive as following:
When deleting an image from ViewPager2, the number of dots doesn't change.

    [Before Delete] 
             (Image)  (Image)  (Image)           (Image - Marked)  <-- I delete last one
    [After Delete]
             (Image)  (Image)  (Image - Marked)  (Image - appear but not exists)

As a quick fix, I put removeDot() with index from 0 to 3, but all 0~3 led to indexOutOfBound.
What am I supposed to do?

@kacsogellert
Copy link

kacsogellert commented Jan 26, 2022

I ended up fixing by calling refreshDots on the callback of the submitList method

  adapter.submitList(it){
             dotsIndicator.refreshDots()
           }

@tommybuonomo
Copy link
Owner

Hello, thanks for your contribution !
This issue is now fixed in the new version 4.3
Thanks 🔥

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

No branches or pull requests

3 participants