【发布时间】:2014-07-15 14:57:34
【问题描述】:
我有一个需要自定义箭头的可扩展列表视图。我尝试将 groupIndicator 设置为这样的选择器:
<ExpandableListView
android:id="@+id/home_drawer_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:childDivider="@android:color/transparent"
android:divider="@android:color/transparent"
android:dividerHeight="0dp"
android:groupIndicator="@drawable/expandable_list_view_selector" />
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/arrow_down" android:state_expanded="true" />
<item android:drawable="@drawable/arrow_right" />
</selector>
但是,由于某种原因,这会扭曲箭头的尺寸,请参见下文:
知道为什么它们会被扭曲,以及如何解决吗?
【问题讨论】:
-
看来帖子与组标题的高度有关,拉伸图像,而我的是由于填充。然而,bwacher 的回答是我最终做的,虽然我的回答有更多细节,所以也许这仍然有用。
标签: android xamarin xamarin.android expandablelistview