![]()
CustomExpandableListAdapter. #ANDROID STUDIO APK EXPANSION TUTORIAL CODE#In the above code the expandableListDetail object is used to map the group header strings to their respective children using an ArrayList of Strings. HashMap> expandableListDetail = new HashMap>() ĮxpandableListDetail.put("CRICKET TEAMS", cricket) ĮxpandableListDetail.put("FOOTBALL TEAMS", football) ĮxpandableListDetail.put("BASKETBALL TEAMS", basketball) The ExpandableListDataPump class is defined as below: package The layout row of the child items is given below : list_item.xml Note : We cannot use the value wrap_content for the android:layout_height attribute of the ExpandableListView in XML unless the parent’s size is strictly specified The layout of the group header of each individual list is given below : list_group.xml The android:indicatorLeft is the left bound for an items indicator. The activity_main.xml layout consists of an ExpandableListView in a RelativeLayout as shown below : activity_main.xml
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |