Android-Image-Slider icon indicating copy to clipboard operation
Android-Image-Slider copied to clipboard

java.lang.IllegalStateException: The application's PagerAdapter changed the adapter's contents without calling PagerAdapter#notifyDataSetChanged! Expected adapter item count: 0,

Open swapniltomake opened this issue 4 years ago • 3 comments

swapniltomake avatar Oct 21 '20 12:10 swapniltomake

Hi there, I've just gotten the same problem. Did you find out any solution yet?

thangnvv avatar Nov 05 '20 15:11 thangnvv

I've found the problem for this. The error's showing when you create your Image List with size = 0, and then you add image in a Asynchronous task without knowing it. All you need to do is add adapter.notifyDataSetChanged() in your list.add(). Sorry for my bad english, but hope it help someone get the same problem

thangnvv avatar Nov 06 '20 03:11 thangnvv

https://github.com/smarteist/Android-Image-Slider/issues/137#issuecomment-867415349

aminsato avatar Jun 24 '21 11:06 aminsato