List of usage examples for android.view ViewConfiguration getScaledOverflingDistance
public int getScaledOverflingDistance()
From source file:com.example.libwidgettv.bak.AbsListView.java
private void initAbsListView() { // Setting focusable in touch mode will set the focusable property to // true// ww w.j a va 2 s . c o m 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(); mDensityScale = getContext().getResources().getDisplayMetrics().density; }
From source file:com.appunite.list.AbsHorizontalListView.java
private void initAbsListView() { // Setting focusable in touch mode will set the focusable property to true setClickable(true);//from ww w. j a v a2 s. c o m setFocusableInTouchMode(true); setWillNotDraw(false); setAlwaysDrawnWithCacheEnabled(false); setScrollingCacheEnabled(true); final Context context = getContext(); final ViewConfiguration configuration = ViewConfiguration.get(context); mTouchSlop = configuration.getScaledTouchSlop(); mMinimumVelocity = configuration.getScaledMinimumFlingVelocity(); mMaximumVelocity = configuration.getScaledMaximumFlingVelocity(); mOverscrollDistance = configuration.getScaledOverscrollDistance(); mOverflingDistance = configuration.getScaledOverflingDistance(); mDensityScale = context.getResources().getDisplayMetrics().density; }