开发者

How do I group similary items in an Android ListView?

I'm building an app that lists items in a ListView. There are a lot of items, and I'd like to present the user with a tree-like view that groups similar items (e.g. produce) under a parent category and expands to show the user the specific items (e.g. lettuce, tomato) after the user clicks on the category (e.g. produce). Is the ListView the right view to use? If so, how do I do this?

开发者_开发知识库

Thanks!


You want to use an ExpandableListView.

Here is an example on the Android Developer website.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜