Expandable ListView [closed]
How we can create Expandable ListView with group icon on Right.have any one implement it...
<ExpandableListView android:id="@+id/Exlist"
android:childDivider="#00000000" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:groupIndicator="transparent Image"
android:scrollbars="none" android:listSelector="#00000000"
android:cacheColorHint="#00000000"
android:layout_marginBottom="10dip" />
Above code "android:groupIndicator="transparent image"" becuase remove left side group indicator icon.
Now used below XML for Group Indicator file.
group.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal" android:layout_width="fill_parent"
android:layout_height="wrap_content">
<RelativeLayout android:id="@+id/rlheaderName"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:background="@drawable/main_down">
<TextView android:id="@+id/headerName"
android:layout_marginLeft="5dip" android:layout_centerVertical="true"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:textColor="#6e6e6e" android:textStyle="bold"></TextView>
<TextView android:id="@+id/headerCount"
android:layout_marginLeft="10dip" android:layout_centerVertical="true"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:textColor="#6e6e6e" android:layout_toRightOf="@+id/headerName"></TextView>
</RelativeLayout>
</LinearLayout>
Above file "android:background="@drawable/main_down"" main_down used as arrow in rightside.
so you problem solved.
精彩评论