Android 单击时出现ListView问题

Android 单击时出现ListView问题,android,listview,Android,Listview,这是我的ListView xml文件,我的行有不同的xml(ListView的每一项),与此无关 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent"

这是我的ListView xml文件,我的行有不同的xml(ListView的每一项),与此无关

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" >

    <ListView
        android:id="@android:id/list"
        android:layout_width="fill_parent" 
        android:layout_height="wrap_content"    
        android:listSelector="#ffffff"  
        android:clickable="false"
        android:dividerHeight="1dip"
        style="@style/ProgressStyle"
        android:cacheColorHint="#00000000"

     />

</LinearLayout>


当我单击此listview时,它会变成白色,因为它被设置为android:listSelector=“#ffffff”。但是,当我从xml文件中删除它时,当我单击它时,我单击的项目会显示一些颜色(在emulator中为黄色,在设备中为红色)。它不应该显示,因为android:clickable=设置为“假”。有人知道吗?

这是默认设置,如果您不想要任何颜色,那么您可以在xml中设置一种透明的颜色

android:listSelector="#00000000"

这是默认设置,如果不需要任何颜色,则可以在xml中设置透明的颜色

android:listSelector="#00000000"

将列表中的cacheColorHint设置为透明(#00000000)。将列表中的cacheColorHint设置为透明(#00000000)。提高接受率:)抱歉,我去做了一些工作。所以我忘记接受。现在我接受了。:)提高你的接受率,:)对不起,我去做了一些工作。所以我忘了接受。现在我接受了。:)