android - 移除 ListView 中 ListItem 周围的蓝色光晕 (android)

标签 android eclipse listview layout

我想在单击时摆脱我的列表项周围可怕的蓝色 HOLO 发光。

我有:

<ListView
        android:id="@+id/projects_list"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:cacheColorHint="#00000000"
        android:choiceMode="singleChoice"
        android:listSelector="@android:color/transparent"
        android:paddingBottom="0dp"
        android:paddingLeft="0dp"
        android:paddingRight="0dp"
        android:scrollbars="none" />

但它仍然看起来像这样: http://www.roji.be/IMG_0001.png

更新: 好的,我的应用程序是:

<style name="AppBaseTheme" parent="android:style/Theme.Light">
<item name="android:actionBarStyle">@style/ActionBar</item>
        <item name="android:windowBackground">@drawable/gradient_bg</item>
        <item name="android:windowContentOverlay">@null</item>
</style>

并且每个列表项都包裹在一个 LinearLayout 中

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res/com.axxes.netinc"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:background="@drawable/listitemshadow" //9patch shadow 
    android:orientation="vertical"
    android:paddingTop="8dp" >

最佳答案

将 ListView 的渐变边缘设置为无。

<ListView
    android:id="@+id/projects_list"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:cacheColorHint="#00000000"
    android:choiceMode="singleChoice"
    android:listSelector="@android:color/transparent"
    android:paddingBottom="0dp"
    android:paddingLeft="0dp"
    android:paddingRight="0dp"
    android:scrollbars="none"
    android:fadingEdge="none" />

关于android - 移除 ListView 中 ListItem 周围的蓝色光晕 (android),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15325023/

相关文章:

java - 远程调试时评论代码被命中

java - 为什么修饰符在似乎什么都不做的情况下允许用于包?

c# - ListView 中的图像质量差

listview - Kendo Mobile - 无法刷新 ModalView 上的 ListView

java - 带有 contentprovider 的 Listview 中没有数据

android - 是否可以让内置的谷歌地图显示地址

android - 如何获取我的 Android 系统上所有 Activity 内核驱动程序的列表?

android - 当我们在任何 Activity 中单击主页时,关闭整个应用程序将关闭

android - 如何从 Webview 中访问摄像头?

没有 Eclipse/ADT 的 Android 应用程序开发