Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.IllegalStateException #9

Open
allenli0413 opened this issue Jun 13, 2020 · 1 comment
Open

java.lang.IllegalStateException #9

allenli0413 opened this issue Jun 13, 2020 · 1 comment

Comments

@allenli0413
Copy link

java.lang.IllegalStateException: The application's PagerAdapter changed the adapter's contents without calling PagerAdapter#notifyDataSetChanged! Expected adapter item count: 6, found: 4 Pager id: ffffffff Pager class: class android.support.v4.view.ViewPager Problematic adapter: class com.donkingliang.banner.BannerPagerAdapter
at android.support.v4.view.ViewPager.populate(ViewPager.java:1143)
at android.support.v4.view.ViewPager.setCurrentItemInternal(ViewPager.java:669)
at android.support.v4.view.ViewPager.setCurrentItemInternal(ViewPager.java:631)
at android.support.v4.view.ViewPager.setCurrentItem(ViewPager.java:623)
at com.donkingliang.banner.CustomBanner$2.onPageScrollStateChanged(CustomBanner.java:173)
at android.support.v4.view.ViewPager.dispatchOnScrollStateChanged(ViewPager.java:1964)
at android.support.v4.view.ViewPager.setScrollState(ViewPager.java:497)
at android.support.v4.view.ViewPager$3.run(ViewPager.java:272)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1154)
at android.view.Choreographer.doCallbacks(Choreographer.java:977)
at android.view.Choreographer.doFrame(Choreographer.java:885)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1139)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7682)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:516)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)

@donkingliang
Copy link
Owner

你个问题一般是改变了轮播图的数据引起的,数据发生改变,应该重新mBanner.setPages设置数据。

另外这个库已经不维护了,有bug可以自行下载源码修改,谢谢!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants