android - 可扩展 ListView android,设置自定义可绘制对象

标签 android expandablelistview

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

谢谢

最佳答案

请查看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 - 可扩展 ListView android,设置自定义可绘制对象,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6544113/

相关文章:

android - ExpandableListView 中按钮的 onClick 方法

java - Android - 如何在 Android 中的 Expandable ListView 的 subview 下添加另一个 View ?

android - Fragment 中的可扩展 ListView

android - 在 Android 中确定 ProgressDialog

android - OutputStreamWriter 的 flush 方法在尝试写入汉字时抛出 IOException

android - 如何将 ArrayList<CustomObject> 传递给另一个应用程序中的 Activity ?

android - BaseExpandableListAdapter RuntimeError NullPointerException

android - Android React Native 中的多个可扩展 ListView

java - 在 Android 上录制音频和在 Swing (PC) 上播放时出现问题

android - 将流量转换为实时数据的最佳方式