imbryk / LoopingViewPager

An android ViewPager extension allowing infinite scrolling

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Crash when calling MyPagerAdapter.notifyDataSetChanged()

TracyZhangLei opened this issue · comments

commented

The application's PagerAdapter changed the adapter's contents without calling PagerAdapter#notifyDataSetChanged! Expected adapter item count: 6, found: 2

commented

I found that we can't call adapter.notifyDataSetChanged() when using LoopViewPager, we can use setAdapter(new Adapter()) to avoid this error.

commented

I also have the same problem

commented

@panda912 setAdapter(new Adapter()) 就可以了,调用notifyDataSetChanged实际不起作用

I also have the same problem.

what's the reason ?

try to use LoopPagerAdapterWrapper's notifyDataSetChanged.Actually,LoopViewPager use LoopPagerAdapterWrapper as adapter