博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
去掉ExpandableListView的箭头图标
阅读量:4478 次
发布时间:2019-06-08

本文共 678 字,大约阅读时间需要 2 分钟。

用到ExpandableListView时有个箭头图标系统自带的在你自定义布局也不能去掉只要设置一个属性即可,如下:

  settingLists.setGroupIndicator(null);  ~~~~~~~~~~~~~~~~~此处就是设置自定义的箭头图标的。置空则没有了。

也可以自定义(但是位置还是在那个地方不推荐)如下:

首先,自定义一个expandablelistviewselector.xml文件,具体内容如下: Java代码

<?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)); 

大功告成

转载于:https://www.cnblogs.com/Free-Thinker/p/3440306.html

你可能感兴趣的文章
你真的会写Java吗?
查看>>
alibaba.fastjson.JSONObject 解析
查看>>
终于有人把Elasticsearch原理讲透了
查看>>
Java使用POI 读取和写入Excel指南
查看>>
shell脚本中各类括号的作用(小结)
查看>>
借用Snippet插件美化博客中的代码
查看>>
深入研究java.lang.Runtime类
查看>>
10677 我们仍未知道那天所看见的花的名字
查看>>
ScanTailor-ScanTailor 自动矫正图像歪斜
查看>>
UVA GCD - Extreme (II)
查看>>
完成个人中心—导航标签
查看>>
【C++】C++中变量的声明与定义的区别
查看>>
前端性能优化
查看>>
static
查看>>
属性动画
查看>>
Swift 字符串
查看>>
Python 生成器 Generator 和迭代器 Iterator
查看>>
实现icon和文字垂直居中的两种方法-(vertical-align and line-height)
查看>>
[CareerCup] 3.6 Sort Stack 栈排序
查看>>
Beta版总结会议
查看>>