Search in sources :

Example 21 with OverScroller

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

the class NotificationStackScrollLayout method initView.

private void initView(Context context) {
    mScroller = new OverScroller(getContext());
    setDescendantFocusability(FOCUS_AFTER_DESCENDANTS);
    setClipChildren(false);
    final ViewConfiguration configuration = ViewConfiguration.get(context);
    mTouchSlop = configuration.getScaledTouchSlop();
    mMinimumVelocity = configuration.getScaledMinimumFlingVelocity();
    mMaximumVelocity = configuration.getScaledMaximumFlingVelocity();
    mOverflingDistance = configuration.getScaledOverflingDistance();
    mCollapsedSize = context.getResources().getDimensionPixelSize(R.dimen.notification_min_height);
    mBottomStackPeekSize = context.getResources().getDimensionPixelSize(R.dimen.bottom_stack_peek_amount);
    mStackScrollAlgorithm.initView(context);
    mPaddingBetweenElements = Math.max(1, context.getResources().getDimensionPixelSize(R.dimen.notification_divider_height));
    mIncreasedPaddingBetweenElements = context.getResources().getDimensionPixelSize(R.dimen.notification_divider_height_increased);
    mBottomStackSlowDownHeight = mStackScrollAlgorithm.getBottomStackSlowDownLength();
    mMinTopOverScrollToEscape = getResources().getDimensionPixelSize(R.dimen.min_top_overscroll_to_qs);
}
Also used : ViewConfiguration(android.view.ViewConfiguration) OverScroller(android.widget.OverScroller)

Example 22 with OverScroller

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

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 23 with OverScroller

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

the class NotificationStackScrollLayout method initView.

private void initView(Context context) {
    mScroller = new OverScroller(getContext());
    setDescendantFocusability(FOCUS_AFTER_DESCENDANTS);
    setClipChildren(false);
    final ViewConfiguration configuration = ViewConfiguration.get(context);
    mTouchSlop = configuration.getScaledTouchSlop();
    mMinimumVelocity = configuration.getScaledMinimumFlingVelocity();
    mMaximumVelocity = configuration.getScaledMaximumFlingVelocity();
    mOverflingDistance = configuration.getScaledOverflingDistance();
    mCollapsedSize = context.getResources().getDimensionPixelSize(R.dimen.notification_min_height);
    mBottomStackPeekSize = context.getResources().getDimensionPixelSize(R.dimen.bottom_stack_peek_amount);
    mStackScrollAlgorithm.initView(context);
    mPaddingBetweenElements = Math.max(1, context.getResources().getDimensionPixelSize(R.dimen.notification_divider_height));
    mIncreasedPaddingBetweenElements = context.getResources().getDimensionPixelSize(R.dimen.notification_divider_height_increased);
    mBottomStackSlowDownHeight = mStackScrollAlgorithm.getBottomStackSlowDownLength();
    mMinTopOverScrollToEscape = getResources().getDimensionPixelSize(R.dimen.min_top_overscroll_to_qs);
}
Also used : ViewConfiguration(android.view.ViewConfiguration) 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