关于listview使用shape来设置background的问题

ZYLab 2011-03-28 04:39:41
我的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没到底或顶的,但是我不想要这个功能,不想要这一抹颜色~怎么样去掉呢?
...全文
1170 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
ZYLab 2011-03-30
  • 打赏
  • 举报
回复
eoe那边有人解决了, 那位朋友这样写的:“你说的那一抹是listview属性造成的,设置了 android:scrollbarAlwaysDrawHorizontalTrack="false"这个属性造成的,listiew没有滚动条时,默认会有那么一抹颜色提示用户,上或下还是有内容的,可以加个属性 android:fadingEdge="none" 就好了”
youngwolf 2011-03-29
  • 打赏
  • 举报
回复
上下那个渐变区域应该是可以去掉的,我见过,但实在是想不想来是哪个属性用于设置这个的。
hui22021616 2011-03-28
  • 打赏
  • 举报
回复
上下黄色的边框是渐变的,为了带有一些阴影效果,增加一点立体感,好看的,之前做brew的时候,还写过代码实现这种效果。但是不知道为什么android要做成,滑到某一端的时候,那一端的阴影效果就不再显示了。
感觉应该和那个scroll有点关系,我刚开始学,很多东西都没看到。明天看看
ZYLab 2011-03-28
  • 打赏
  • 举报
回复
没人回答了么??我必须得顶一下~有没有什么drawable的属性可以让这个黄色的底和顶边消失啊?
ZYLab 2011-03-28
  • 打赏
  • 举报
回复
这个边可不是我想让它加载的,我还找不到这个属性来不让它加载,因为我还要做倒影特效,那个黄边也倒影下来了,就看上去不好看了~
dinjay 2011-03-28
  • 打赏
  • 举报
回复
你可以对滚动条当前位置做判断,来做是否加载这个边儿。
但从用户的角度,我觉得现在这个效果也挺漂亮的...
ZYLab 2011-03-28
  • 打赏
  • 举报
回复

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


MLSkin is a skin component under Delphi, inherited based on Delphi standard components, and extends a lot of practical attribute functions for developers to call; in use, there is little difference between the standard VCL components, but the display style is very different, it can easily achieve the effect like QQ skin, and want to change the display The style you want to do is just to reload a picture; most of the components in it can be used alone, without the need to rely on the skin of the form, the display effect can be customized, very flexible; the current set of skin components provides more than 50 common components, more than 20 practical Demo, can be very convenient and quick implementation of you The effect you want. Website http://www.pngui.com/filedownload Feature: Support one touch skin, you can set the picture and color into the background of the form. The hue, saturation and brightness of the skin can be adjusted arbitrarily. The original picture resource management library can quickly and conveniently manage the pictures needed in the program. The unique image resource attribute supports the direct use of the detailed path of picture ID or local image file to call image resources. Easy to achieve the shadow of the form, the shape of the special form effect, simple to only need to set up two pictures. You can add any number of pictures, buttons and text on the form title bar. Memo, Edit, ListView and other components support transparent background, the border effect can be customized, add the commonly used search box and password input box. Redefined Toolbar, showing very beautiful style, and supporting horizontal and vertical display. Menu beautification, transparent effect, as long as you set up a picture, you can make your menu style different. You can display MainMenu on the title bar and display the location that you can customize. Almost all components can set their display styles individually, and most of the container com
SkinEngine3.4.7 SkinEngine is an VCL library that allows you to dynamically change almost any aspect of the visual appearance your project's forms or controls. SkinEngine provides you with full support for application skins. Skins support for forms, menus and controls. SkinEngine using the internal skin files for provide new visual appearance for your project's. Also SkinEngine include powerful tools for create your own skins - SkinBuilder. # What's New in SkinEngine 3.4.7 # + Fixed: GDI resource leaks on TSeCustomForm + Fixed: SeBitmapLink memory leaks + Fixed: Scrollbars not hide in Memo, ListView, TreeView, ScrollBox # Technical Support # Technical support for KSDev software is provided through email and newsgroups on our news server. For latest news and support visit KSDev's newsgroups. Please, address general questions to the newsgroup. To obtain technical support for any of the KSDev's products, please send an electronic mail message to support@ksdev.com. Be sure to include a detailed description of the problem you are having in addition to the following information: * Version number of KSDev software * Name and version number of development tool (i.e. Delphi 4.01) * Windows 95/98/Me/NT/2000/XP version (including service packs and other fixes installed), US or international, OEM or not computer information: CPU type and speed, amount of memory installed description of your problem (as much information as possible to retrieve the problem) We'll try to help you as fast as possible, usually in one or two business days. # KSDev's Products # # FXLib # FXLib is an easy-to-use set of components that enables you to create amazing splash screens, form and image transition effects, using all the power of its advanced rendering engine. Over 70 families of animation and transition effects with hundreds of variations. Real-time rendering. WYSIWYG editing in both design-time and run-time, preview. # ThemeEngine # ThemeEngine is an VCL library that allows you to change almost any aspect of the visual appearance your project's forms, menus and controls. ThemeEngine provides you application full themes support. ThemeEngine support new Windows XP style and simulation for other Windows platform. # MediaPack # MediaPack allows to you create of application with cool GUI. Forms of any shape, background with bitmaps tile, gradient or plasma fill, original border with bitmaps or solid fill. Advanced multimedia controls with cool background and borders. MediaPack is a over 70 advanced multimedia components and controls. # FreeSkinEngine # SkinEngine is an VCL library that allows you to dynamically change almost any aspect of the visual appearance your project's forms or controls. In short, it provides you with full support for application skins. It's even possible to make your program look like an application from any other OS, or create your own user WindowBlinds-like or NeoPlanet-like "skinned" interface. # FreeVCL # FreeVCL is a library of almost 20 visual components mostly Office 2k simulation
# Welcome to SkinEngine 3.4.7 # SkinEngine is an VCL library that allows you to dynamically change almost any aspect of the visual appearance your project's forms or controls. SkinEngine provides you with full support for application skins. Skins support for forms, menus and controls. SkinEngine using the internal skin files for provide new visual appearance for your project's. Also SkinEngine include powerful tools for create your own skins - SkinBuilder. # What's New in SkinEngine 3.4.7 # + Fixed: GDI resource leaks on TSeCustomForm + Fixed: SeBitmapLink memory leaks + Fixed: Scrollbars not hide in Memo, ListView, TreeView, ScrollBox # Technical Support # Technical support for KSDev software is provided through email and newsgroups on our news server. For latest news and support visit KSDev's newsgroups. Please, address general questions to the newsgroup. To obtain technical support for any of the KSDev's products, please send an electronic mail message to support@ksdev.com. Be sure to include a detailed description of the problem you are having in addition to the following information: * Version number of KSDev software * Name and version number of development tool (i.e. Delphi 4.01) * Windows 95/98/Me/NT/2000/XP version (including service packs and other fixes installed), US or international, OEM or not computer information: CPU type and speed, amount of memory installed description of your problem (as much information as possible to retrieve the problem) We'll try to help you as fast as possible, usually in one or two business days. # KSDev's Products # # FXLib # FXLib is an easy-to-use set of components that enables you to create amazing splash screens, form and image transition effects, using all the power of its advanced rendering engine. Over 70 families of animation and transition effects with hundreds of variations. Real-time rendering. WYSIWYG editing in both design-time and run-time, preview. # ThemeEngine # ThemeEngine is an VCL library that allows you to change almost any aspect of the visual appearance your project's forms, menus and controls. ThemeEngine provides you application full themes support. ThemeEngine support new Windows XP style and simulation for other Windows platform. # MediaPack # MediaPack allows to you create of application with cool GUI. Forms of any shape, background with bitmaps tile, gradient or plasma fill, original border with bitmaps or solid fill. Advanced multimedia controls with cool background and borders. MediaPack is a over 70 advanced multimedia components and controls. # FreeSkinEngine # SkinEngine is an VCL library that allows you to dynamically change almost any aspect of the visual appearance your project's forms or controls. In short, it provides you with full support for application skins. It's even possible to make your program look like an application from any other OS, or create your own user WindowBlinds-like or NeoPlanet-like "skinned" interface. # FreeVCL # FreeVCL is a library of almost 20 visual components mostly Office 2k simulation # Contact Information # Contact e-mail: contact@ksdev.com Sales: sales@ksdev.com (c) 1996-2002 KSDev. All right reserved. http://www.ksdev.com

80,357

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧