解决java.lang.IllegalStateException: Content view not yet created(ListFragment)
2015-03-09 14:04
525 查看
java.lang.IllegalStateException: Content view not yet created(ListFragment)
把代码中的ListView lv = getListView()
统一改为ListView lv = (ListView)v.findViewById(android.R.id.list);
当然在xml要加上
<ListView
android:id="@id/android:list"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
把代码中的ListView lv = getListView()
统一改为ListView lv = (ListView)v.findViewById(android.R.id.list);
当然在xml要加上
<ListView
android:id="@id/android:list"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
相关文章推荐
- ListFragment错误之java.lang.IllegalStateException: Content view not yet created解决办法
- 在调用Fragment.setListShown()报java.lang.IllegalStateException: Content view not yet created的错误
- Fragment list list Content view not yet created问题
- Face++ 接口 java.lang.ClassNotFoundException: org.apache.commons.collections.map.ListOrderedMap解决方法
- 使用Activity.isfinishing()解决java.lang.IllegalArgumentException: View not attached to window manager
- 使用Activity.isfinishing()解决java.lang.IllegalArgumentException: View not attached to window manager
- Fragment解决java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
- Android java.lang.IllegalStateException: ViewPager has not been bound 的解决办法
- 解决java.lang.NullPointerException: View must not be null!
- java.lang.IllegalArgumentException:No view found for id for fragment 的解决
- java.lang.ClassNotFoundException: org.apache.commons.collections.map.ListOrderedMap如何解决
- java.lang.ClassNotFoundException: org.apache.commons.collections.map.ListOrderedMap解决方法
- java.lang.classnotfoundexception: android.view.fragment in loader
- 解决:java.lang.IllegalArgumentException:No view found for id for fragment
- java.lang.ClassNotFoundException: org.apache.commons.collections.map.ListOrderedMap解决方法
- 异常 java.lang.ClassCastException:cannot be cast to android.widget.HeaderViewListAdapter.的解决方法
- java.lang.illegalargumentexception view not attached to window manager 解决
- Caused by: java.lang.ClassNotFoundException: android.view.fragment in loader dalvik.system.PathClass
- 【Exception】java.lang.ClassNotFoundException: android.view.fragment in loader dalvik.system.PathClass
- java.lang.IllegalStateException: Fragment does not have a view