Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Expandable list-view android, set custom drawables

ok, i just have a simple question here. how can i change the group arrow on expandable listview with another drawables? y know, i'm gonna use + and - for my expandable group list...

Thanks

like image 275
user724861 Avatar asked Jul 01 '11 05:07

user724861


People also ask

What is expandable ListView?

android.widget.ExpandableListView. A view that shows items in a vertically scrolling two-level list. This differs from the ListView by allowing two levels: groups which can individually be expanded to show its children. The items come from the ExpandableListAdapter associated with this view.


1 Answers

Please check this link more helpful to you


OR


<ExpandableListView
    android:id="@+id/android:list"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:groupIndicator="@drawable/group_indicator" >

group_indicator.xml

<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:state_empty="true" android:drawable="@drawable/arrowright"></item>
    <item android:state_expanded="true" android:drawable="@drawable/arrowdown"></item>
    <item android:drawable="@drawable/arrowright"></item>
</selector>
like image 76
Nikhil Avatar answered Nov 15 '22 18:11

Nikhil