滚动时 ListView 顶部突出显示 [英] ListView top highlight on scrolling

查看:22
本文介绍了滚动时 ListView 顶部突出显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在将 ListView 滚动到限制时,边框显示默认颜色(在我的 Nexus S 上为橙色).如何改变那种颜色?

The border displays a default color (that's orange on my Nexus S) while scrolling a ListView to the limit. How to change that color?

我真的不知道该怎么解释.看看这张图:

I really don't know how to explain it. Just look at this picture:

那么,如何改变ListView滚动到边框时的高亮颜色呢?使用主题或样式

So, how to change the highlight color when the ListView scrolling to the border? using themes or styles

推荐答案

解决方案是使用setOverscrollFooter(null)setOverscrollHeader(null).文档是这里 !

The solution is to use setOverscrollFooter(null) and setOverscrollHeader(null). The documentation is here !

你也可以直接在XML中设置:

You can also set it directly in the XML :

<ListView android:overScrollMode="never" />

或者指定页脚和页眉:

<ListView 
  android:overscrollHeader="@null" 
  android:overscrollFooter="@null" />

注意: 还有一个属性 fadingEdge 你可能会感兴趣.

N.B. : There is also a property fadingEdge that may interest you.

从 API 级别 9 开始支持Overscroll"方法

"Overscroll" methodes are supported starting API level 9

这篇关于滚动时 ListView 顶部突出显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆