切换滚动的颜色,滚动型的机器人 [英] Changing the color of over scroll in scrollview in android
问题描述
我有一个小问题,我的滚动视图。每当滚动视图已在滚动,它显示了一个黄色的渐变(在我的设备,它可以改变其他设备)在滚动视图的边缘。它可以通过在安卓2.3及以上设定的属性如下被淘汰。
I have a small problem with my scroll view. Whenever a scroll view has over scrolled, it shows a yellow gradient (in my device, it may vary for other devices) at edges of scroll view. It can be eliminated by setting attribute as below in android 2.3 and above.
android:overScrollMode="never"
现在我想改变默认的颜色为其他。如何实现这一点。
Now i want to change the default color to some other. How to achieve this.
请帮我对此。任何帮助将AP preciated。
Please help me regarding this. Any help will be appreciated.
推荐答案
您应该使用下面的属性在你的的ListView
:
You should use the following attributes on your ListView
:
<ListView
...
android:overScrollHeader="@drawable/header"
android:overScrollFooter="@drawable/footer"/>
使用您也可以将它们编程<一href="http://developer.android.com/reference/android/widget/ListView.html#setOverscrollFooter%28android.graphics.drawable.Drawable%29"><$c$c>setOverscrollFooter(Drawable D) 和<一href="http://developer.android.com/reference/android/widget/ListView.html#setOverscrollHeader%28android.graphics.drawable.Drawable%29"><$c$c>setOverscrollHeader(Drawable D) 。
这篇关于切换滚动的颜色,滚动型的机器人的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!