异常:IllegalStateException: The application's PagerAdapter changed the adapter's contents
来源:互联网 发布:淘宝心级怎么算买家 编辑:程序博客网 时间:2024/04/30 09:45
先把异常贴出来:
java.lang.IllegalStateException:
The application's PagerAdapter changed the adapter's contents
without calling PagerAdapter#notifyDataSetChanged!
Expected adapter item count: 0, found: 3 Pager id:
cn.ronghuakeji.application:id/view_pagerContent
Pager class: class android.support.v4.view.ViewPager Problematic
adapter: class cn.itcast.application.phone_sms.ui.adapter.ContentViewPagerAdapter
解决方法:
在初始化ViewPager时,应先给Adapter初始化内容后再将该adapter传给ViewPager,如果不这样处理,在更新adapter的内容后,应该调用一下adapter的notifyDataSetChanged方法,否则在ADT22以上使用会报The application's PagerAdapter changed the adapter's contents without calling PagerAdapter#notifyDataSetChanged的异常,具体原因可参考:http://stackoverflow.com/questions/16756131/fragmentstatepageradapter-stopped-working-after-updating-to-adt-22
0 0
- 异常:IllegalStateException: The application's PagerAdapter changed the adapter's contents
- java.lang.IllegalStateException: The application's PagerAdapter changed the adapter's contents witho
- 】The application’s PagerAdapter changed the adapter’s contents without calling PagerAdapter#notifyDa
- The application's PagerAdapter changed the adapter's contents without calling PagerAdapter
- The application's PagerAdapter changed the adapter's contents without calling PagerAdapter
- The application's PagerAdapter changed the adapter's contents without calling PagerAdapter#notifyDat
- The application's PagerAdapter changed the adapter's contents without calling PagerAdapter#notifyDat
- The application's PagerAdapter changed the adapter's contents without calling PagerAdapter#notifyDat
- The application's PagerAdapter changed the adapter's contents without calling PagerAdapter#notifyDat
- The application's PagerAdapter changed the adapter's contents without calling PagerAdapter#notifyDat
- The application's PagerAdapter changed the adapter's contents without calling PagerAdapter#notifyDat
- The application's PagerAdapter changed the adapter's contents without calling PagerAdapter#notifyDat
- The application's PagerAdapter changed the adapter's contents without calling PagerAdapter#notifyDat
- The application's PagerAdapter changed the adapter's contents without calling PagerAdapter#notifyDat
- ViewPager异步添加数据异常 The application's PagerAdapter changed the adapter's contents without calling Pag
- ViewPager异步添加数据异常 The application's PagerAdapter changed the adapter's contents without calling Pag
- PagerAdapter changed the adapter's contents without calling PagerAdapter#notifyDataSetChanged
- 使用ViewPager时报出The application’s PagerAdapter changed the adapter’s contents without calling PagerAda
- eclispe工程没有编译的解决办法
- 深度学习-网络Xavier初始化方法
- git代码统计-生成详细html报告
- Metal Performance Shader使用小结
- jQuery和jquerymobile 实现火车票查询
- 异常:IllegalStateException: The application's PagerAdapter changed the adapter's contents
- 反射 新增知识点
- 新手学习IOS 是用黑苹果好还是虚拟机好
- EL
- c语言实现通讯录
- 初探Android NDK 编程
- 蓝牙解析(part9):BLE Resolving List
- CC2650 入手资料总结(转)
- Java初始化详解