LoopingViewPager icon indicating copy to clipboard operation
LoopingViewPager copied to clipboard

Crash when calling MyPagerAdapter.notifyDataSetChanged()

Open TracyZhangLei opened this issue 9 years ago • 6 comments

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

TracyZhangLei avatar Oct 15 '15 07:10 TracyZhangLei

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

TracyZhangLei avatar Nov 20 '15 11:11 TracyZhangLei

I also have the same problem

panda912 avatar Jul 08 '16 08:07 panda912

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

TracyZhangLei avatar Jul 09 '16 08:07 TracyZhangLei

I also have the same problem.

CeleryIce avatar Dec 20 '16 03:12 CeleryIce

what's the reason ?

OtzOrz avatar Dec 21 '16 02:12 OtzOrz

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

achillh avatar Jan 23 '17 03:01 achillh