use of com.android.launcher3.util.OverScroller in project Neo-Launcher by NeoApplications.
the class PagedView method init.
/**
* Initializes various states for this workspace.
*/
protected void init() {
mScroller = new OverScroller(getContext());
setDefaultInterpolator(Interpolators.SCROLL);
mCurrentPage = 0;
final ViewConfiguration configuration = ViewConfiguration.get(getContext());
mTouchSlop = configuration.getScaledPagingTouchSlop();
mMaximumVelocity = configuration.getScaledMaximumFlingVelocity();
float density = getResources().getDisplayMetrics().density;
mFlingThresholdVelocity = (int) (FLING_THRESHOLD_VELOCITY * density);
mMinFlingVelocity = (int) (MIN_FLING_VELOCITY * density);
mMinSnapVelocity = (int) (MIN_SNAP_VELOCITY * density);
if (Utilities.ATLEAST_OREO) {
setDefaultFocusHighlightEnabled(false);
}
}
Aggregations