JakeWharton / ViewPagerIndicator

Paging indicator widgets compatible with the ViewPager from the Android Support Library and ActionBarSherlock.
http://viewpagerindicator.com
10.14k stars 4.01k forks source link

PageIndicators should listen for the Adapters 'notifyDataSetChanged' #172

Open theomega opened 11 years ago

theomega commented 11 years ago

If the FragmentStatePagerAdapter is dynamically updated, the notifyDataSetChanged method is called.

Problem: The PageIndicators do not register for this events. This leads to the fact that if a new page is added after the current one, the Indicators are not updated automatically. The developer has to call notifyDataSetChanged on the Indicator by himself.

Why doesnt the PageIndicator register for the notifyDataSetChange method of the adapters?

JakeWharton commented 11 years ago

This probably wasn't available when I first wrote the library back in the r1/r2 days. Absolutely should be updated to support this, though.

2fours commented 10 years ago

+1