A
A
Artix2015-01-13 09:05:48
Android
Artix, 2015-01-13 09:05:48

How to create the same ListView as in the picture?

Good day to all!
It is necessary to create a ListView of such a plan as in the picture, it is necessary that it be grouped and at the same time have the form of a mixed listview and expandable listview, so that some elements open and some simply perform some actions by clicking on the element
f1a362d868c64ad480c161c7e3573916.png

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexey, 2015-01-13
@nikkorejz

Hey! This element is called "ExpandableListView. It is recommended by Google. Look here how it looks and here is the documentation
Here are some good examples of how to make it:
1. Tutorial on startandroid and video on yuotube
2. Another video on yuotube
3. simple example
4. Too good example
5. Well, an article on Habré
6. Another example on github

E
Eliador, 2015-01-13
@eliador

This control looks more like a TreeView than a ListView. Try to google with the corresponding request, here is the first thing that the search engine gives out:
https://code.google.com/p/tree-view-list-android/

A
Alexey, 2015-01-13
@Xapaxuc

+1 to ExpandableListView instead of https://code.google.com/p/tree-view-list-android.
Reasons:
1. tree-view-list-android - marked as deprecated.
2. Subjectively: tree-view-list-android is difficult to optimize in terms of memory consumption
3. Also subjectively: tree-view-list-android is extremely inconvenient to use together with Loader.
Therefore, my advice is: if the ListView does not require more than two levels of hierarchy (and in your case it does), then use ExpandableListView.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question