已采纳回答 / iMcLaren
今天刚刚回答了这个问题。。可以直接把view当作布局view里面包含listview,更简单粗暴的是直接往viewpager里加listview;上思路:xml文件里只有一个viewpager --> 继承pageradapter重写相应方法 --> 将listview初始化 --> 将listview作为viewpager的初始化参数加入进去 -->搞定
2016-08-25
静态加载的时候遇到这个问题:
Caused by: android.app.Fragment$InstantiationException: Trying to instantiate a class xxx.xxx.xxx that is not a Fragment
因为我一开始导入的是support.v4的包。。导入android.app.Fragment就可以了
毕竟现在也很少3.0一下版本的手机了,不用support.v4也没关系吧
Caused by: android.app.Fragment$InstantiationException: Trying to instantiate a class xxx.xxx.xxx that is not a Fragment
因为我一开始导入的是support.v4的包。。导入android.app.Fragment就可以了
毕竟现在也很少3.0一下版本的手机了,不用support.v4也没关系吧
2016-08-23