Posts

Showing posts with the label Expandable Listview

Expandable ListView Example

Image
This example will show you how can you work with an expandable list in the android application. Steps:- 1) Create two layout XML file.(One for header(parent) and Second for item list(child)). 2) Create one new java file for an expandable adapter. Main.xml  <?xml version="1.0" encoding="utf-8"?> <RelativeLayout >     <ExpandableListView         android:layout_width="match_parent"         android:layout_height="match_parent"         android:id="@+id/myexpandablelist">     </ExpandableListView> </RelativeLayout> header.xml  <LinearLayout >     <TextView     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:text="New Text"     android:id="@+id/textView2" /> </LinearLayout> child.xml <LinearLayout >     <TextView...