Android View源码解析
/**
* 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 视图的新的过滚动模式
更多相关文章
- 移除Android中的安全模式
- Android任务栈和启动模式
- 精通android体系架构、mvc、常见的设计模式、控制反转(ioc)
- Unity3D游戏开发之在Android视图中嵌入Unity视图
- Android活动Acitivity启动模式之singleTop
- Android活动启动模式
- Android盈利模式,哪种更靠谱?
- [Android]ListView性能优化之视图缓存