简体   繁体   中英

How to create the layout for this kind of activity?

How can I display information in the following format? What controls should I use, listView or RecycleView?

Note that the question isn't about this particular activity and how to use it. It's about how to show the information in the same format and how to create the layout for it.

在此处输入图片说明

That is a ListView. You would just need a ListAdapter/ArrayAdapter to fill it and that's about it.

You can make exactly the same thing using the layout simple_expandable_list_item_2 in the SimpleAdapter of a ListAdapter (here is how you do it : Displaying kind of static data in ListView )

RecyclerView is of course much better in terms of performance and flexibility. However, ListView is enough in many cases like this one.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM