标签:android
先在drawable目录下建立xml文件:
<?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_expanded="true" android:drawable="@drawable/up_indicator" /> <item android:state_expanded="false" android:drawable="@drawable/down_indicator" /> </selector>
up_indicator和down_indicator即为你要替换的图标文件名。
然后修改Activity代码中的ExpandableListView设置代码,关键一句是:
setGroupIndicator(this.getResources().getDrawable(R.drawable.expandablelistview_indicator));
替换ExpandableListView右边箭头Group Indicator(小图标)
标签:android
原文地址:http://blog.csdn.net/zhangphil/article/details/43767581