ExpandableListView is kind of advanced version of Listview. You can expand the list items. It is very useful when you have categories and sub categories of data. Here a tutorial using for ExpandableListView with event listener of parent and child list items.
- Create main_activity.xml.
- Create list_group.xml
- Create list_item.xml.
- Create the ExpandableListAdapter.java.
- Create MainActiviy.java.
The file main_activity.xml contain the ExpandableListView tag. list_item.xml and list_gruop.xml has the TextViews for list and sublist.
You can get the complete project at Github Repository. Or you can get the code below in this post.
Here is you main_activiy.xml
list_group.xml
list_item.xml
ExpandableListAdapter.java
MainActivity.java
Really a great and simple tutorial for beginners. Thumbs up (Y)
ReplyDeletemeow...
ReplyDeleteYour content is excellent but with pics and videos,
ReplyDeletethis blog could certainly be one of the best in its field.
Excellent blog!
KissAnime