为ExpandableListView这个控件自定义箭头

来源:互联网 发布:三维弯管机编程软件 编辑:程序博客网 时间:2024/06/07 14:52

系统中的ExpandableListView这个控件的箭头不好看,不能满足我们需求,需要自定义箭头样式

1.要在<ExpandableListView></ExpandableListView>布局里加上android:groupIndicator="@drawable/image",其中image是我们自定义的一个selector类型的布局文件。

2.image.xml文件加上<item android:state_expanded="false"  
        android:drawable="@drawable/down_arrow"/>    
    <item android:state_expanded="true"  
     android:drawable="@drawable/up_arrow"/> 

0 0
原创粉丝点击