我的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没到底或顶的,但是我不想要这个功能,不想要这一抹颜色~怎么样去掉呢?
解决方案 »
- 请问android平台下开发软件需要学习哪些知识
- android 调用webservice问题
- dispatchKeyEvent问题
- android中自动完成查询如何实现
- 将tcpdump -p -nnn -vvv -s 0 -w /sdcard/1.pcap代码写进了JAVA程序不能对android真机进行抓包
- 如何在程序中关闭自启动程序
- eclipse 代码提示出来后点回车键,为什么包名也被打上?
- 话说这菜单怎么没有显示啊,点击menu都没用嘞
- Android Studio中在onDestroy销毁定时器的时候,返回会报空指针异常
- 基于Android平台的多路独立 音频输出,求方案
- android webview 在公司真实项目
- 浏览器能否启动程序
我来发张问题图, 看就是上边和底下的那个黄色的条,listview现在正滚动在中间,下拉条设定隐藏了所以没有。
感觉应该和那个scroll有点关系,我刚开始学,很多东西都没看到。明天看看