Open rajohns08 opened 11 years ago
This issue is related to snap being set to true. All other things being equal, changing snap to false makes the indicator update correctly, as talked about here: http://stackoverflow.com/questions/14210968/android-viewpagerindicator-does-not-refresh
Is there any way to have the snap working with the highlight issue fixed?
The problem is that mSnapPage isn't updated when notifyDataSetChanged() is called. It works when snap is off because onPageScrolled() is called when DataSet is changed. Also, on setCurrentItem(), mSnapPage isn't updated as well. To fix my problem, I added mSnapPage = item; on setCurrentItem() to fix my page, but this isn't a real fix.
Adding mSnapPage = position; on onPageScrolled() also works, but it makes the snap change position right when you start horizontal scrolling instead of when you finish scrolling.
I am calling setCurrentItem(0) in my code after I change viewpagers. After the code executes, the mCurrentPage property of my CirclePageIndicator changes to 0, but the dot selected is still the 3rd one.