android:change indicator icon and size of expandablelistview used for navigation
You can use the following code:
<ExpandableListView android:id="@+id/android:list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginTop="10dp"
android:groupIndicator="@drawable/settings_selector" />
... where the setting_selector
is:
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/up_arrow"
android:state_empty="true" />
<item android:drawable="@drawable/down_arrow"
android:state_expanded="true" />
</selector>
<ExpandableListView android:id="@+id/android:list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginTop="10dp"
android:groupIndicator="@drawable/settings_selector"
/>
And
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/up_arrow" android:state_expanded="true"/>
<item android:drawable="@drawable/down_arrow" android:state_expanded="false"/>
</selector>
He forgot to put
<item android:drawable="@drawable/down_arrow" android:state_expanded="false"/>
in it.
For me, android:state_empty
not working.
this is efficient way to set group indicator
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:state_empty="true">
<layer-list>
<item
android:left="20dp"
android:right="-30dp"
android:top="120dp"
android:bottom="10dp"
android:drawable="@drawable/panier_plus">
</item>
</layer-list>
</item>
<item android:state_expanded="true">
<layer-list>
<item
android:left="20dp"
android:right="-30dp"
android:top="120dp"
android:bottom="10dp"
android:drawable="@drawable/panier_minus"
>
</item>
</layer-list>
</item>