The application's PagerAdapter changed the adapter's contents without calling PagerAdapter#notifyDat
来源:互联网 发布:unix高级编程环境 编辑:程序博客网 时间:2024/05/17 23:12
log信息如下:10-10 12:31:14.186: E/AndroidRuntime(22835): java.lang.IllegalStateException: The application's PagerAdapter changed the adapter's contents without calling PagerAdapter#notifyDataSetChanged! Expected adapter item count: 0, found: 4 Pager id: com.example.app:id/viewpager Pager class: class android.support.v4.view.ViewPager Problematic adapter: class com.example.Share.ViewPagerAdapter
解决方法 http://www.cnblogs.com/ivan240/archive/2013/07/23/3208570.html:
在初始化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
1 0
- 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
- PagerAdapter changed the adapter's contents without calling PagerAdapter#notifyDataSetChanged
- 】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
- 使用ViewPager时报出The application’s PagerAdapter changed the adapter’s contents without calling PagerAda
- The application's PagerAdapter changed the adapter's contents without calling Pagapter
- The application's PagerAdapter changed the adapter's contents without calling notifyDataSetChanged
- 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
- 003Java分支结构
- Eclipse下maven项目自动打war包丢失jar包问题解决方法
- Android通过adb命令实现模拟滑动
- 搜狗面板程序加载失败,请重启以使用输入法! ubuntu12.04
- linux下sysctl()函数初探
- The application's PagerAdapter changed the adapter's contents without calling PagerAdapter#notifyDat
- centos学习 拾零之如何安装rar
- java基础之-IO(下)
- UItextField限制字符输入的个数
- NGUI之UIButton"禁用"状态时置灰
- Eclipse中启动tomcat 浏览器无法访问8080端口
- 在WebView中如何让JS与Java安全地互相调用
- 自定义 Android 对话框 (AlertDialog) 的样式
- xcode6中如何添加pch文件 Xcode6与Xcode5之间的细节差别(Precompile Prefix Header)