更改的ListView阴影的颜色和大小 [英] Changing the ListView shadow color and size
问题描述
当项目在ListView列表比ListView控件的尺寸长,你会看到一个影子表明有更多的项目上方或下方。默认情况下,这个影子是黑色的。这是不可取的。
When the list of items in a ListView is longer than the size of the ListView, you'll see a shadow indicating that there are more items above or below. By default, this shadow is black. This is not desirable.
如果我的cacheColorHint设置如下:
If I set the cacheColorHint to the following:
android:cacheColorHint="#00000000"
阴影将是透明的,可见我已经设置到布局的背景绘制。这是不可取的要么。
The shadow will be transparent, showing the drawable I have set to the layout's background. This is not desirable either.
我只希望阴影的颜色更改为黑色,或者灰色较淡。有没有指定这个办法?
I wish to simply change the color of the shadow to a lighter shade of black, or perhaps gray. Is there a way to specify this?
此外,有没有办法更改阴影的大小?
Also, is there a way to change the shadow's size?
推荐答案
通过的android:cacheColorHint =#00000000
要设置这种颜色为透明。我不知道你要准确使用哪种颜色,但尝试的android:cacheColorHint =#FF777777
。我认为它必须工作。
By android:cacheColorHint="#00000000"
you are setting this color to transparent. I don't know which color you want to use exactly, but try android:cacheColorHint="#FF777777"
. I think it must work.
这篇关于更改的ListView阴影的颜色和大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!