Search in sources :

Example 6 with OverScroller

use of android.widget.OverScroller in project android_frameworks_base by ResurrectionRemix.

the class SystemGesturesPointerEventListener method systemReady.

public void systemReady() {
    Handler h = new Handler(Looper.myLooper());
    mGestureDetector = new GestureDetector(mContext, new FlingGestureDetector(), h);
    mOverscroller = new OverScroller(mContext);
}
Also used : Handler(android.os.Handler) GestureDetector(android.view.GestureDetector) OverScroller(android.widget.OverScroller)

Example 7 with OverScroller

use of android.widget.OverScroller in project android_frameworks_base by ResurrectionRemix.

the class ActionBarOverlayLayout method init.

private void init(Context context) {
    TypedArray ta = getContext().getTheme().obtainStyledAttributes(ATTRS);
    mActionBarHeight = ta.getDimensionPixelSize(0, 0);
    mWindowContentOverlay = ta.getDrawable(1);
    setWillNotDraw(mWindowContentOverlay == null);
    ta.recycle();
    mIgnoreWindowContentOverlay = context.getApplicationInfo().targetSdkVersion < Build.VERSION_CODES.KITKAT;
    mFlingEstimator = new OverScroller(context);
}
Also used : TypedArray(android.content.res.TypedArray) OverScroller(android.widget.OverScroller)

Example 8 with OverScroller

use of android.widget.OverScroller in project FreeFlow by Comcast.

the class FreeFlowContainer method init.

@Override
protected void init(Context context) {
    viewpool = new ViewPool();
    frames = new LinkedHashMap<Object, FreeFlowItem>();
    ViewConfiguration configuration = ViewConfiguration.get(context);
    maxFlingVelocity = configuration.getScaledMaximumFlingVelocity();
    minFlingVelocity = configuration.getScaledMinimumFlingVelocity();
    overflingDistance = configuration.getScaledOverflingDistance();
    /*overscrollDistance = configuration.getScaledOverscrollDistance();*/
    touchSlop = configuration.getScaledTouchSlop();
    scroller = new OverScroller(context);
    setEdgeEffectsEnabled(true);
}
Also used : ViewConfiguration(android.view.ViewConfiguration) OverScroller(android.widget.OverScroller)

Example 9 with OverScroller

use of android.widget.OverScroller in project android_frameworks_base by crdroidandroid.

the class ActionBarOverlayLayout method init.

private void init(Context context) {
    TypedArray ta = getContext().getTheme().obtainStyledAttributes(ATTRS);
    mActionBarHeight = ta.getDimensionPixelSize(0, 0);
    mWindowContentOverlay = ta.getDrawable(1);
    setWillNotDraw(mWindowContentOverlay == null);
    ta.recycle();
    mIgnoreWindowContentOverlay = context.getApplicationInfo().targetSdkVersion < Build.VERSION_CODES.KITKAT;
    mFlingEstimator = new OverScroller(context);
}
Also used : TypedArray(android.content.res.TypedArray) OverScroller(android.widget.OverScroller)

Example 10 with OverScroller

use of android.widget.OverScroller in project android_frameworks_base by crdroidandroid.

the class SystemGesturesPointerEventListener method systemReady.

public void systemReady() {
    Handler h = new Handler(Looper.myLooper());
    mGestureDetector = new GestureDetector(mContext, new FlingGestureDetector(), h);
    mOverscroller = new OverScroller(mContext);
}
Also used : Handler(android.os.Handler) GestureDetector(android.view.GestureDetector) OverScroller(android.widget.OverScroller)

Aggregations

OverScroller (android.widget.OverScroller)23 ViewConfiguration (android.view.ViewConfiguration)10 TypedArray (android.content.res.TypedArray)5 GestureDetector (android.view.GestureDetector)5 Handler (android.os.Handler)4 Paint (android.graphics.Paint)2 Rect (android.graphics.Rect)2 GestureDetectorCompat (android.support.v4.view.GestureDetectorCompat)2 TextPaint (android.text.TextPaint)2 Scroller (android.widget.Scroller)2 Context (android.content.Context)1 FastOutLinearInInterpolator (android.support.v4.view.animation.FastOutLinearInInterpolator)1 ScaleGestureDetector (android.view.ScaleGestureDetector)1 View (android.view.View)1 DecelerateInterpolator (android.view.animation.DecelerateInterpolator)1 FrameLayout (android.widget.FrameLayout)1 TouchInterceptionFrameLayout (com.github.ksoichiro.android.observablescrollview.TouchInterceptionFrameLayout)1 SlidingTabLayout (com.google.samples.apps.iosched.ui.widget.SlidingTabLayout)1