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

refreshDots not called when ListAdapter.submitList #84

Closed
li2 opened this issue Apr 19, 2020 · 2 comments
Closed

refreshDots not called when ListAdapter.submitList #84

li2 opened this issue Apr 19, 2020 · 2 comments
Assignees
Labels
Milestone

Comments

@li2
Copy link

li2 commented Apr 19, 2020

I use androidx.recyclerview.widget.ListAdapter and call submitList to update recyclerView, however, the dots were not showing until I call notifyDataSetChanged instead.

 fun setViewPager2(viewPager2: ViewPager2) {
   viewPager2.adapter!!.registerAdapterDataObserver(object : AdapterDataObserver() {
     override fun onChanged() {
       super.onChanged()
       // I added breakpoint here,
       // and this callback is not trriggered when call submitList
       refreshDots()
     }
   })
 }
@dsawenko
Copy link

dsawenko commented Apr 25, 2020

I've got the same issue with ListAdapter. When calling submitList to push the data to the ViewPager2's adapter, no dots are displayed until notifyDataSetChanged() is called.

aloj22 added a commit to aloj22/dotsindicator that referenced this issue Mar 25, 2021
…when onItemRangeInserted or onItemRangeRemoved called
@tommybuonomo tommybuonomo added this to the 4.3 milestone Apr 30, 2022
@tommybuonomo tommybuonomo self-assigned this Apr 30, 2022
@tommybuonomo
Copy link
Owner

Duplicate of #109 #84 #78

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