Example usage for android.view ViewConfiguration getScaledOverscrollDistance

List of usage examples for android.view ViewConfiguration getScaledOverscrollDistance

Introduction

In this page you can find the example usage for android.view ViewConfiguration getScaledOverscrollDistance.

Prototype

public int getScaledOverscrollDistance() 

Source Link

Usage

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);//w  w w.j av  a  2  s .co 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;
}

From source file:com.aliasapps.seq.scroller.TwoWayView.java

@TargetApi(9)
private int getScaledOverscrollDistance(ViewConfiguration vc) {
    if (Build.VERSION.SDK_INT < 9) {
        return 0;
    }/* w  w w.j  a v a2s  . c  o  m*/

    return vc.getScaledOverscrollDistance();
}