两个不同片段中的两个ListView会产生错误

时间:2015-06-13 17:02:50

标签: android listview android-fragments

我的应用程序中有两个包含两个ListView的片段。我试图对每个片段中的两个ListView执行以下操作:

ListView listView = (ListView)view.findViewById(R.id.list1);
listView.setAdapter(new ListAdapter() {

    //Sets The Adapter

}

但是当我跑步时,会产生这个错误:

Can't have a viewTypeCount < 1

对我正在做的事情有没有更好的方法?感谢所有帮助

0 个答案:

没有答案