您的位置:首页 > 编程语言 > Java开发

解决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"

/>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐