zoukankan      html  css  js  c++  java
  • 去掉ExpandableListView的箭头图标

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

    大功告成

  • 相关阅读:
    github的使用
    QPalette的用法
    QTimer的用法
    QStatusBar的用法
    QWhatsThis的用法
    QString::​arg的用法
    qt中ui的 使用介绍
    安全协议IPSEC
    安全协议ssl
    对称加密和非对称加密
  • 原文地址:https://www.cnblogs.com/zhujiabin/p/4724667.html
Copyright © 2011-2022 走看看