Crash when calling MyPagerAdapter.notifyDataSetChanged()
Opened this issue · 6 comments
TracyZhangLei commented
The application's PagerAdapter changed the adapter's contents without calling PagerAdapter#notifyDataSetChanged! Expected adapter item count: 6, found: 2
TracyZhangLei commented
I found that we can't call adapter.notifyDataSetChanged() when using LoopViewPager, we can use setAdapter(new Adapter()) to avoid this error.
panda912 commented
I also have the same problem
TracyZhangLei commented
@panda912 setAdapter(new Adapter()) 就可以了,调用notifyDataSetChanged实际不起作用
CeleryIce commented
I also have the same problem.
OtzOrz commented
what's the reason ?
achillh commented
try to use LoopPagerAdapterWrapper's notifyDataSetChanged.Actually,LoopViewPager use LoopPagerAdapterWrapper as adapter