ExpandableListView和SimpleCursorTreeAdapter

时间:2013-09-30 16:17:19

标签: java android expandablelistview simplecursortreeadapter

我想使用ExpandableListView支持SimpleCursorTreeAdapter。到目前为止,我无法在屏幕上看到任何内容。

为此,我创建了一个源自SimpleCursorTreeAdapter类的自己的类。在此类中,我重写getChildrenCursor以检索参数列表中指定的组的子项。我创建了这个类的实例,其中SQLiteCursor用于数据源,我的视图是简单的TextView,用于组和子组。我的光标有一些数据(在我的例子中是2行),我没有收到任何错误信息,但是ExpandableListView在屏幕上没有显示任何内容。

我可以补充一点,使用从BaseExpandableListAdapter派生的类,我能够看到我的数据。

我错过了什么吗?我是否可以使用SimpleCursorTreeAdapter类与ExpandableListView类一起找到代码示例?

0 个答案:

没有答案