【发布时间】:2013-02-14 10:43:32
【问题描述】:
当我展开子行时,Expandablelistview 的背景变得更白。我该如何解决?
我设置:
android:cacheColorHint="@null"
android:scrollingCache="false"
我也试过了:
android:cacheColorHint="@android:color/transparent"
android:scrollingCache="false"
但这并不能解决问题。
展开子前的截图:
http://i.imgur.com/fbaKPus.png http://i.imgur.com/pHejwDn.png
之后:
http://i.imgur.com/hftsxhA.png
编辑:
应用程序使用 Sherlock 主题: ...
可扩展列表视图 xml 文件:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<ExpandableListView
android:id="@+id/expandableListView"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:background="@drawable/background"
android:cacheColorHint="@android:color/transparent"
android:childDivider="@color/expandablelist_divider"
android:divider="@color/expandablelist_divider"
android:dividerHeight="1dp"
android:groupIndicator="@drawable/expandablelistindicator" >
</ExpandableListView>
</LinearLayout>
【问题讨论】:
-
第一张截图没有找到
-
你试过只用 android:cacheColorHint="@android:color/transparent" 吗?没有 android:scrollingCache="false"
-
您是否为您的应用程序设置了特定主题?
-
@Nickolaus - 是的,我正在使用 Sherlock 主题:android:theme="@style/Theme.Sherlock.Light.DarkActionBar"
-
你能把所有的xml文件都贴出来吗?您的 ExpandableListView 是否继承了某种风格?在这种情况下,尝试构建一个继承它的新属性,添加新属性并分配给您的 ExpandableListView。
标签: android expandablelistview