本文整理匯總了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);
}