Reputation: 61
I'm using a ListActivity to list events, and i want to show the events and after that i want to show the list of participants on the same List.
I'm getting JSON data to get the information and one element is a List of the participants.
To show the data i'm using an ArrayAdapter.
EventosAdapter adapter = new EventosAdapter(this, R.layout.item_evento, EventosList);
setListAdapter(adapter);
The question is, what is the correct way to do this?
Use a LinearLayout inside the ListActivity and to show the detail info use another ArrayAdapter?
Upvotes: 0
Views: 66
Reputation: 4352
You can use Expandable ListView
https://developer.android.com/reference/android/widget/ExpandableListView.html
Example, http://www.androidhive.info/2013/07/android-expandable-list-view-tutorial/
Upvotes: 1