I would like to change the extended and standard icon of my Expandable List. I did some research on how to do this and found this question .
I think I did it as described there. I have 2 icons, the first is called defaulticon.png and the second is expandicon.png. Bothers are in a folder with the ability to move (not in drawable-hdpi). A list ad is as follows:
<ExpandableListView android:id="@+id/expandableListView" android:layout_width="match_parent" android:layout_height="wrap_content" android:groupIndicator="@drawable/groupindicator"> </ExpandableListView>
The group identifier is an xml file, also located in a folder with the ability to transfer and looks like this:
<?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@drawable/defaulticon" android:state_empty="true"/> <item android:drawable="@drawable/expandedicon" android:state_expanded="true"/> </selector>
However, the icons do not change. The default icon disappears from the list view, and is missing instead. Are there any restrictions on resources (how much resources can be to me (both 160x160), where should they be located, ...). I am testing an application on my S3 running Android 4.1.2.
Greetings
android android-listview expandablelistview
slashburn
source share