/**
* Always allow a user to over-scroll this view, provided it is a
* view that can scroll.
*
* @see #getOverScrollMode()
* @see #setOverScrollMode(int)
*/
public static final int OVER_SCROLL_ALWAYS = 0;
/**
* Allow a user to over-scroll this view only if the content is large
* enough to meaningfully scroll, provided it is a view that can scroll.
*
* @see #getOverScrollMode()
* @see #setOverScrollMode(int)
*/
public static final int OVER_SCROLL_IF_CONTENT_SCROLLS = 1;
/**
* Never allow a user to over-scroll this view.
*
* @see #getOverScrollMode()
* @see #setOverScrollMode(int)
*/
public static final int OVER_SCROLL_NEVER = 2;
/**
* Set the over-scroll mode for this view. Valid over-scroll modes are
* {@link #OVER_SCROLL_ALWAYS} (default), {@link #OVER_SCROLL_IF_CONTENT_SCROLLS}
* (allow over-scrolling only if the view content is larger than the container),
* or {@link #OVER_SCROLL_NEVER}.
*
* Setting the over-scroll mode of a view will have an effect only if the
* view is capable of scrolling.
*
* @param overScrollMode The new over-scroll mode for this view.
*/
public void setOverScrollMode (int mode)
为视图设置过滚动模式。有效的过滚动模式有 OVER_SCROLL_ALWAYS(默认值)、 OVER_SCROLL_IF_CONTENT_SCROLLS(视图内容大于容器时允许过滚动)、和 OVER_SCROLL_NEVER. 只有当视图可以滚动时,才可以设置视图的过滚动模式.
参数
mode 视图的新的过滚动模式
本文详细介绍了如何为视图设置过滚动模式,包括三种模式:总是允许、仅当内容足够大时允许、从不允许,并提供了设置方法及使用场景。
6641

被折叠的 条评论
为什么被折叠?



