编辑了一次,不合格被刷新了。。。
我的思路是把初始化viewpager放在oncreat()里面,先初始化ui,再获取数据。
注:之前是先获取数据,再初始化viewpager,正常情况下不会出错。
出错的原因是:
界面A(有viewpager)--(跳到)编辑界面B--保存返回界面A,这时候推出界面A,必然发生IllegalStateException: <Fragment> is not currently in the FragmentManager。
IllegalStateException: <Fragment> is not currently in the FragmentManager
原文:http://9105034.blog.51cto.com/9095034/1625101