可扩展的列表视图 android,设置自定义绘图

发布于 2024-11-18 12:20:49 字数 90 浏览 5 评论 0原文

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

谢谢

ok, i just have a simple question here.
how can i change the group arrow on expandable listview with another drawables?
y know, i'm gonna use + and - for my expandable group list...

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

魔法少女 2024-11-25 12:20:49

请检查此链接对您更有帮助



<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>

Please check this link more helpful to you


OR


<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>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文