【问题标题】:Expandable list-view android, set custom drawables可扩展的列表视图android,设置自定义drawables
【发布时间】:2011-09-26 12:16:24
【问题描述】:

好的,我这里有一个简单的问题。 如何使用另一个可绘制对象更改可扩展列表视图上的组箭头? 你知道,我将使用 + 和 - 作为我的可扩展组列表...

谢谢

【问题讨论】:

    标签: android expandablelistview


    【解决方案1】:

    对你有帮助的请查看this link



    <ExpandableListView
        android:id="@+id/android:list"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:groupIndicator="@drawable/group_indicator" >
    

    group_indicator.xml

    <selector xmlns:android="http://schemas.android.com/apk/res/android">
        <item android:state_empty="true" android:drawable="@drawable/arrowright"></item>
        <item android:state_expanded="true" android:drawable="@drawable/arrowdown"></item>
        <item android:drawable="@drawable/arrowright"></item>
    </selector>
    

    【讨论】:

    • “android:groupindicator”应该是“android:groupIndicator”
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-04-06
    • 1970-01-01
    • 2013-06-17
    • 1970-01-01
    相关资源
    最近更新 更多