使用 arrayList 填充可扩展列表视图
谁能告诉我有关如何执行此操作的任何好的链接? 我浏览了 15-20 个链接,但没有一个真正解释了任何事情。 我只想用 ArrayList 动态填充 ExpandableListView
或如果有 另一种方式...我很想知道。
请帮忙:(!
Can anyone tell me any good links on how to do this?
I've looked through a good 15-20 links and none have really explained anything.
I just want to dynamically populate an ExpandableListView
with ArrayList
s or if theres
another way... I'd love to know.
PLEASE HELP :(!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不确定 ArrayList 是否是用于 ExpandableListView 的正确数据结构——但如果您指的是 Maps ArrayList ,那就更合适了。您可以使用 SimpleExpandableListAdapter 类来实现这一点。然后使用 ExpandableListView.setAdapter() 将其与您的视图耦合。
I'm not sure an ArrayList is the right data structure to use for an ExpandableListView -- but if you mean a ArrayList of Maps that would be more appropriate. You could do that with the SimpleExpandableListAdapter class it looks like. Then use ExpandableListView.setAdapter() to couple it with your view.