去掉ExpandableListView的系统自带的箭头图标

一个属性就可以把它解决,<span style="color: rgb(51, 51, 51); font-family: Arial; line-height: 26px; "> settingLists.setGroupIndicator(null); </span>

如果你想更改它的形状,但是位置是更改不了的,要注意了呀,更改形状代码如下:一个选择的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/expandablelistviewindicatordown" />   

    <item android:drawable="@drawable/expandablelistviewindicator" />   

</selector>  

再在源代码中加一句:

settingLists.setGroupIndicator(this.getResources().getDrawable(R.layout.expandablelistviewselector)); 

大功告成
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章