You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
3、RecyclerIndicatorView和BannerComponent一起用Crash
日志如下:
01-24 10:56:36.263 32627-32627/com.ckditu.map E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.ckditu.map, PID: 32627
java.lang.StackOverflowError: stack size 8MB
at android.support.v7.widget.ChildHelper.getChildCount(ChildHelper.java:253)
at android.support.v7.widget.RecyclerView$LayoutManager.getChildCount(RecyclerView.java:8198)
at android.support.v7.widget.LinearLayoutManager.findViewByPosition(LinearLayoutManager.java:401)
at com.shizhefei.view.indicator.RecyclerIndicatorView.scrollToTab(RecyclerIndicatorView.java:189)
at com.shizhefei.view.indicator.RecyclerIndicatorView.setCurrentItem(RecyclerIndicatorView.java:113)
at com.shizhefei.view.indicator.BannerComponent.setCurrentItem(BannerComponent.java:109)
at com.shizhefei.view.indicator.BannerComponent$1.onItemSelected(BannerComponent.java:64)
at com.shizhefei.view.indicator.RecyclerIndicatorView.setCurrentItem(RecyclerIndicatorView.java:122)
at com.shizhefei.view.indicator.BannerComponent.setCurrentItem(BannerComponent.java:109)
at com.shizhefei.view.indicator.BannerComponent$1.onItemSelected(BannerComponent.java:64)
at com.shizhefei.view.indicator.RecyclerIndicatorView.setCurrentItem(RecyclerIndicatorView.java:122)
at com.shizhefei.view.indicator.BannerComponent.setCurrentItem(BannerComponent.java:109)
at com.shizhefei.view.indicator.BannerComponent$1.onItemSelected(BannerComponent.java:64)
at com.shizhefei.view.indicator.RecyclerIndicatorView.setCurrentItem(RecyclerIndicatorView.java:122)
at com.shizhefei.view.indicator.BannerComponent.setCurrentItem(BannerComponent.java:109)
at com.shizhefei.view.indicator.BannerComponent$1.onItemSelected(BannerComponent.java:64)
at com.shizhefei.view.indicator.RecyclerIndicatorView.setCurrentItem(RecyclerIndicatorView.java:122)
at com.shizhefei.view.indicator.BannerComponent.setCurrentItem(BannerComponent.java:109)
at com.shizhefei.view.indicator.BannerComponent$1.onItemSelected(BannerComponent.java:64)
at com.shizhefei.view.indicator.RecyclerIndicatorView.setCurrentItem(RecyclerIndicatorView.java:122)
at com.shizhefei.view.indicator.BannerComponent.setCurrentItem(BannerComponent.java:109)
at com.shizhefei.view.indicator.BannerComponent$1.onItemSelected(BannerComponent.java:64)
at com.shizhefei.view.indicator.RecyclerIndicatorView.setCurrentItem(RecyclerIndicatorView.java:122)
at com.shizhefei.view.indicator.BannerComponent.setCurrentItem(BannerComponent.java:109)
at com.shizhefei.view.indicator.BannerComponent$1.onItemSelected(BannerComponent.java:64)
at com.shizhefei.view.indicator.RecyclerIndicatorView.setCurrentItem(RecyclerIndicatorView.java:122)
at com.shizhefei.view.indicator.BannerComponent.setCurrentItem(BannerComponent.java:109)
at com.shizhefei.view.indicator.BannerComponent$1.onItemSelected(BannerComponent.java:64)
at com.shizhefei.view.indicator.RecyclerIndicatorView.setCurrentItem(RecyclerIndicatorView.java:122)
at com.shizhefei.view.indicator.BannerComponent.setCurrentItem(BannerComponent.java:109)
at com.shizhefei.view.indicator.BannerComponent$1.onItemSelected(BannerComponent.java:64)
at com.shizhefei.view.indicator.RecyclerIndicatorView.setCurrentItem(RecyclerIndicatorView.java:122)
at com.shizhefei.view.indicator.BannerComponent.setCurrentItem(BannerComponent.java:109)
at com.shizhefei.view.indicator.BannerComponent$1.onItemSelected(BannerComponent.java:64)
at com.shizhefei.view.indicator.RecyclerIndicatorView.setCurrentItem(RecyclerIndicatorView.java:122)
at com.shizhefei.view.indicator.BannerComponent.setCurrentItem(BannerComponent.java:109)
at com.shizhefei.view.indicator.BannerComponent$1.onItemSelected(BannerComponent.java:64)
at com.shizhefei.view.indicator.RecyclerIndicatorView.setCurrentItem(RecyclerIndicatorView.java:122)
at com.shizhefei.view.indicator.BannerComponent.setCurrentItem(BannerComponent.java:109)
at com.shizhefei.view.indicator.BannerComponent$1.onItemSelected(BannerComponent.java:64)
at com.shizhefei.view.indicator.RecyclerIndicatorView.setCurrentItem(RecyclerIndicatorView.java:122)
at com.shizhefei.view.indicator.BannerComponent.setCurrentItem(BannerComponent.java:10
The text was updated successfully, but these errors were encountered:
1、轮播出现,ANR
操作:对于一个bannerComponent,根据数据不同反复复设置不同的Adapter对象
比如:bannerComponent.setAdapter(new Adapte(list))
结果:第二次调用bannerComponent.setAdapter(new Adapte(list))出现ANR
2、轮播indicatorView切换错误
操作:bannerComponent.setCurrentItem(n,false)
当n大于数据源个数的时候
结果:indicatorView始终默认最后一个小圆点被选中
3、RecyclerIndicatorView和BannerComponent一起用Crash
日志如下:
01-24 10:56:36.263 32627-32627/com.ckditu.map E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.ckditu.map, PID: 32627
java.lang.StackOverflowError: stack size 8MB
at android.support.v7.widget.ChildHelper.getChildCount(ChildHelper.java:253)
at android.support.v7.widget.RecyclerView$LayoutManager.getChildCount(RecyclerView.java:8198)
at android.support.v7.widget.LinearLayoutManager.findViewByPosition(LinearLayoutManager.java:401)
at com.shizhefei.view.indicator.RecyclerIndicatorView.scrollToTab(RecyclerIndicatorView.java:189)
at com.shizhefei.view.indicator.RecyclerIndicatorView.setCurrentItem(RecyclerIndicatorView.java:113)
at com.shizhefei.view.indicator.BannerComponent.setCurrentItem(BannerComponent.java:109)
at com.shizhefei.view.indicator.BannerComponent$1.onItemSelected(BannerComponent.java:64)
at com.shizhefei.view.indicator.RecyclerIndicatorView.setCurrentItem(RecyclerIndicatorView.java:122)
at com.shizhefei.view.indicator.BannerComponent.setCurrentItem(BannerComponent.java:109)
at com.shizhefei.view.indicator.BannerComponent$1.onItemSelected(BannerComponent.java:64)
at com.shizhefei.view.indicator.RecyclerIndicatorView.setCurrentItem(RecyclerIndicatorView.java:122)
at com.shizhefei.view.indicator.BannerComponent.setCurrentItem(BannerComponent.java:109)
at com.shizhefei.view.indicator.BannerComponent$1.onItemSelected(BannerComponent.java:64)
at com.shizhefei.view.indicator.RecyclerIndicatorView.setCurrentItem(RecyclerIndicatorView.java:122)
at com.shizhefei.view.indicator.BannerComponent.setCurrentItem(BannerComponent.java:109)
at com.shizhefei.view.indicator.BannerComponent$1.onItemSelected(BannerComponent.java:64)
at com.shizhefei.view.indicator.RecyclerIndicatorView.setCurrentItem(RecyclerIndicatorView.java:122)
at com.shizhefei.view.indicator.BannerComponent.setCurrentItem(BannerComponent.java:109)
at com.shizhefei.view.indicator.BannerComponent$1.onItemSelected(BannerComponent.java:64)
at com.shizhefei.view.indicator.RecyclerIndicatorView.setCurrentItem(RecyclerIndicatorView.java:122)
at com.shizhefei.view.indicator.BannerComponent.setCurrentItem(BannerComponent.java:109)
at com.shizhefei.view.indicator.BannerComponent$1.onItemSelected(BannerComponent.java:64)
at com.shizhefei.view.indicator.RecyclerIndicatorView.setCurrentItem(RecyclerIndicatorView.java:122)
at com.shizhefei.view.indicator.BannerComponent.setCurrentItem(BannerComponent.java:109)
at com.shizhefei.view.indicator.BannerComponent$1.onItemSelected(BannerComponent.java:64)
at com.shizhefei.view.indicator.RecyclerIndicatorView.setCurrentItem(RecyclerIndicatorView.java:122)
at com.shizhefei.view.indicator.BannerComponent.setCurrentItem(BannerComponent.java:109)
at com.shizhefei.view.indicator.BannerComponent$1.onItemSelected(BannerComponent.java:64)
at com.shizhefei.view.indicator.RecyclerIndicatorView.setCurrentItem(RecyclerIndicatorView.java:122)
at com.shizhefei.view.indicator.BannerComponent.setCurrentItem(BannerComponent.java:109)
at com.shizhefei.view.indicator.BannerComponent$1.onItemSelected(BannerComponent.java:64)
at com.shizhefei.view.indicator.RecyclerIndicatorView.setCurrentItem(RecyclerIndicatorView.java:122)
at com.shizhefei.view.indicator.BannerComponent.setCurrentItem(BannerComponent.java:109)
at com.shizhefei.view.indicator.BannerComponent$1.onItemSelected(BannerComponent.java:64)
at com.shizhefei.view.indicator.RecyclerIndicatorView.setCurrentItem(RecyclerIndicatorView.java:122)
at com.shizhefei.view.indicator.BannerComponent.setCurrentItem(BannerComponent.java:109)
at com.shizhefei.view.indicator.BannerComponent$1.onItemSelected(BannerComponent.java:64)
at com.shizhefei.view.indicator.RecyclerIndicatorView.setCurrentItem(RecyclerIndicatorView.java:122)
at com.shizhefei.view.indicator.BannerComponent.setCurrentItem(BannerComponent.java:109)
at com.shizhefei.view.indicator.BannerComponent$1.onItemSelected(BannerComponent.java:64)
at com.shizhefei.view.indicator.RecyclerIndicatorView.setCurrentItem(RecyclerIndicatorView.java:122)
at com.shizhefei.view.indicator.BannerComponent.setCurrentItem(BannerComponent.java:10
The text was updated successfully, but these errors were encountered: