【发布时间】:2012-05-12 00:43:57
【问题描述】:
我有 ExpandableListView 并为我自己的适配器扩展了 BaseExpandableListAdapter。不过,我在使用分隔符时遇到了困难。我添加到我的对象列表中,这些对象转到 ExpandableListView “分隔符”到某些位置,我需要使用不同的行布局在 ExpandableListView 中显示它们。现在的问题是,BaseExpandableListAdapter 没有 BaseAdapter 所具备的 getViewTypeCount() 和 getItemViewType(int position) 方法。有什么办法吗?
【问题讨论】:
-
更加努力地检查文档。这些方法适用于子视图和组视图。
-
这太疯狂了,太出乎意料了....getChildViewType 会更有意义,我完全忽略了它。
-
我添加了一个答案。希望没事。
标签: android android-layout expandablelistview