Android的 - 如何改变滚动型/ ListView控件Overscroll的颜色(见图示为例。) [英] Android - How to change color of an ScrollView/ListView Overscroll?(see Desc. for example)
问题描述
可能重复:
<一href="http://stackoverflow.com/questions/9062616/changing-the-color-of-over-scroll-in-scrollview-in-android">Changing在滚动,滚动型的彩色Android中
我想问问,如果有人知道如何改变颜色,这个overscroll?
我知道你可以通过调用 setOverscrollmode从来没有=
摆脱它。但你如何cahnge它的颜色?
I wanted to ask, if somebody knows how to change the color this "overscroll"?
I know you can get rid of it by calling setOverscrollmode="never"
. But how do you cahnge its color?
下面的图片,让你知道我的意思:
Here the Picture, so you know what I mean:
感谢
推荐答案
使用下面的属性在你的XML 的ListView
Use the following attributes in your xml ListView
android:overScrollHeader="@drawable/the_header"
android:overScrollFooter="@drawable/the_footer"
或者,您可以通过编程做,太:
Or you can do it programmatically, too:
SetOverscrollHeader(R.drawable.the_header);
setOverscrollFooter(R.drawable.the_footer);
这些方法和属性是唯一可用的,因为API 9;它们不会对previous版本。
These methods and attributes are only available since API 9; they won't work on the previous versions.
这篇关于Android的 - 如何改变滚动型/ ListView控件Overscroll的颜色(见图示为例。)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!