我的listview用一个xml和shape来设置background, listview的xml声明如下:  
<ListView android:id="@+id/page_list_listview"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:background="@layout/list_corner_1"
android:divider="#fead01"
android:dividerHeight="4px"
>list_corner_1的xml如下:<?xml version="1.0" encoding="UTF-8"?>   
<shape xmlns:android="http://schemas.android.com/apk/res/android"   
    android:shape="rectangle"  android:scrollbarAlwaysDrawHorizontalTrack="false">   
   <solid android:color="#fead01"/> 
    <corners android:bottomRightRadius="10dp"   
        android:bottomLeftRadius="10dp" android:topLeftRadius="10dp"   
        android:topRightRadius="10dp" />   
</shape> 这样我实现了圆角,也实现了填充颜色。listview因为内容多所以要上下滚动,但是我发现在listview没有滚到底和顶的时候,屏幕的底端和上端都会有 一抹#fead01这个颜色. listview到顶的时候,屏幕底端有一抹#fead01颜色,listview到底的时候,屏幕顶端有一抹#fead01这个颜色。 我反复排查,确定就是solid color产生的效果~我感觉 就是提示我listview没到底或顶的,但是我不想要这个功能,不想要这一抹颜色~怎么样去掉呢?

解决方案 »

  1.   


    我来发张问题图, 看就是上边和底下的那个黄色的条,listview现在正滚动在中间,下拉条设定隐藏了所以没有。
      

  2.   

    没人回答了么??我必须得顶一下~有没有什么drawable的属性可以让这个黄色的底和顶边消失啊?
      

  3.   

    上下黄色的边框是渐变的,为了带有一些阴影效果,增加一点立体感,好看的,之前做brew的时候,还写过代码实现这种效果。但是不知道为什么android要做成,滑到某一端的时候,那一端的阴影效果就不再显示了。
    感觉应该和那个scroll有点关系,我刚开始学,很多东西都没看到。明天看看
      

  4.   

    eoe那边有人解决了, 那位朋友这样写的:“你说的那一抹是listview属性造成的,设置了 android:scrollbarAlwaysDrawHorizontalTrack="false"这个属性造成的,listiew没有滚动条时,默认会有那么一抹颜色提示用户,上或下还是有内容的,可以加个属性 android:fadingEdge="none"  就好了”