我的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没到底或顶的,但是我不想要这个功能,不想要这一抹颜色~怎么样去掉呢?
<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没到底或顶的,但是我不想要这个功能,不想要这一抹颜色~怎么样去掉呢?
解决方案 »
- js调用android方法,大家进来看看
- windows下的java程序能否在android平台上运行
- 出错求帮忙
- 我用自己写的phone应用替换了android源码中package/apps下的phone应用。那么,请问我的这个phone应用有系统权限吗。
- 90后IT崛起!!!!!!!!!!!我自己写的软件,大家要支持下啊!!!!!!!!!!!!!!!!!!!!!!!!!!!
- webview中页面元素焦点设置问题
- 如何退出整个应用程序?
- 谁能告诉我下像懒人笨笨那样的软件的设计思路及涉及技术
- 获取通话记录需要什么权限?
- 实在搞不定这个Android Studio和Gradle。。。
- android webview 在公司真实项目
- 浏览器能否启动程序
我来发张问题图, 看就是上边和底下的那个黄色的条,listview现在正滚动在中间,下拉条设定隐藏了所以没有。
感觉应该和那个scroll有点关系,我刚开始学,很多东西都没看到。明天看看