【发布时间】:2012-05-18 09:07:54
【问题描述】:
我有一个自定义 ListView,其中每个 row.xml 看起来像这样:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="bottom"
android:orientation="horizontal" >
<CheckBox
android:id="@+id/star_listed"
style="?android:attr/starStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:contentDescription="@string/question_img_cd"
android:focusable="false"/>
<TextView
android:id="@+id/listTitles"
style="@style/ListTitles" />
一切正常,除了当我按下ListView 上的任意位置时,CheckBox 的背景变为黑色(而不是保持白色)。我的TextView 之前也发生过这种情况,直到我将其背景颜色设置为白色。
如果我将“复选框”背景更改为白色,甚至是透明的,它就会消失。
有什么建议吗?
【问题讨论】:
-
我的自定义
ListView工作正常。我在您的链接中没有看到任何与我的问题相关的内容。
标签: android checkbox android-listview background-color