tommybuonomo / dotsindicator

Three material Dots Indicators for view pagers in Android !
Apache License 2.0
3.44k stars 353 forks source link

added listeners to viewpager2 adapter #137

Closed orelzion closed 2 years ago

orelzion commented 2 years ago

Fixing this issue https://github.com/tommybuonomo/dotsindicator/issues/131

As the documentation state, using AdapterDataObserver we should listen to all changes. Using only onChanged will trigger only when using notifyDataSetChanged, but if you're using any of the specific methods like notifyItemChanged it won't be triggered. So in this PR I fix it by simply listening to all changes and call refreshDots from each one

tommybuonomo commented 2 years ago

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