【发布时间】:2014-03-25 06:04:25
【问题描述】:
我有一个 android 中的对象列表。我想遍历列表并创建一个可扩展的列表视图,每个对象一个条目。我已经在 xml 文件中创建了 ExpandableListView。所以我知道我开始:
ExpandableListView results = ((ExpandableListView)rootView.findViewById(R.id.results));
我想遍历对象列表,为每个对象创建一个Parent,每个Child都是主对象的一个实例变量。
例如:
Parent = Object.Title
Child1 = Object.Taste
Child2 = Object.smell
Parent1 = Object1.Title
Child1 = Object1.Taste
Child2 = Object1.smell
【问题讨论】:
标签: android list expandablelistview expandablelistadapter