本文整理汇总了Java中android.view.ViewConfiguration.getScaledOverscrollDistance方法的典型用法代码示例。如果您正苦于以下问题:Java ViewConfiguration.getScaledOverscrollDistance方法的具体用法?Java ViewConfiguration.getScaledOverscrollDistance怎么用?Java ViewConfiguration.getScaledOverscrollDistance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.view.ViewConfiguration
的用法示例。
在下文中一共展示了ViewConfiguration.getScaledOverscrollDistance方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initAbsListView
import android.view.ViewConfiguration; //导入方法依赖的package包/类
private void initAbsListView() {
setClickable(true);
setFocusableInTouchMode(true);
setWillNotDraw(false);
setAlwaysDrawnWithCacheEnabled(false);
setScrollingCacheEnabled(true);
final ViewConfiguration configuration = ViewConfiguration
.get(getContext());
mTouchSlop = configuration.getScaledTouchSlop();
mMinimumVelocity = configuration.getScaledMinimumFlingVelocity();
mMaximumVelocity = configuration.getScaledMaximumFlingVelocity();
mOverscrollDistance = configuration.getScaledOverscrollDistance();
mOverflingDistance = configuration.getScaledOverflingDistance();
mViewHelper = ViewHelperFactory.create(this);
}
示例2: initAbsListView
import android.view.ViewConfiguration; //导入方法依赖的package包/类
private void initAbsListView() {
setClickable(true);
setFocusableInTouchMode(true);
setWillNotDraw(false);
setAlwaysDrawnWithCacheEnabled(false);
setScrollingCacheEnabled(true);
ViewConfiguration configuration = ViewConfiguration.get(getContext());
this.mTouchSlop = configuration.getScaledTouchSlop();
this.mMinimumVelocity = configuration.getScaledMinimumFlingVelocity();
this.mMaximumVelocity = configuration.getScaledMaximumFlingVelocity();
this.mOverscrollDistance = configuration.getScaledOverscrollDistance() + 200;
this.mOverflingDistance = configuration.getScaledOverflingDistance() + 100;
this.mViewHelper = ViewHelperFactory.create(this);
}