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

Dotsindicator not refreshed when viewpager2 change size #109

Closed
bruzzers opened this issue Nov 26, 2020 · 9 comments
Closed

Dotsindicator not refreshed when viewpager2 change size #109

bruzzers opened this issue Nov 26, 2020 · 9 comments
Assignees
Labels
Milestone

Comments

@bruzzers
Copy link

Hi,
we have a problem with the library when we have a view pager 2 that changes his size.

At start we have 3 items and everything is good.
After that i delete the central item and i slide programmatically my view pager to the first item, but the indicator doesn't refresh. It shows two dots correctly, but when i am in the first item of the pager it doesn't show any dot selected and when i move to the Second and last item the indicator shows the first dot as selected.

The only way to return to normal situation is go back to another activity and open again the one that contains the DotsIndicator.

We have also tried with tab layout and we see that it works, so we think is a Library problem. Can you send us some instruction or make a new release for avoid this?

Thank you so much.

Matteo

@xellent1
Copy link

i have the same issue. @bruzzers

@xellent1
Copy link

@bruzzers
you have to use 3.0.3 version. it helped me

@bruzzers
Copy link
Author

Thank you, i have tried this version but i have another bug that is solved with latest release

@NareshMyTeam11
Copy link

Any solution??

@sanjogshrestha
Copy link

With the latest version, I still have the same issue reflected in my end. Any recommended help is always welcomed.

@igorka48
Copy link

This issue occurs in case of using only method onChanged from AdapterDataObserver.
You also need to trigger on onItemRangeChanged, onItemRangeInserted, onItemRangeMoved methods.

I'm using workaround in my code. But it can be easily fixed on library code.

aloj22 added a commit to aloj22/dotsindicator that referenced this issue Mar 25, 2021
…when onItemRangeInserted or onItemRangeRemoved called
@NunciosChums
Copy link

my solution just temporary. Kotlin + coroutine + ListAdapter

viewModel.myList.observe(viewLifecycleOwner, {
  myListAdapter.submitList(it)

  lifecycleScope.launch {
    delay(300)
    myListAdapter.notifyDataSetChanged()
  }
})

@tommybuonomo tommybuonomo self-assigned this Apr 30, 2022
@tommybuonomo
Copy link
Owner

Duplicate of #139

@tommybuonomo tommybuonomo marked this as a duplicate of #139 Apr 30, 2022
@tommybuonomo tommybuonomo added this to the 4.3 milestone Apr 30, 2022
@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
7 participants