Search in sources :

Example 11 with FlingAnimationUtils

use of com.android.systemui.statusbar.FlingAnimationUtils in project android_frameworks_base by ResurrectionRemix.

the class NotificationPanelView method loadDimens.

@Override
protected void loadDimens() {
    super.loadDimens();
    mFlingAnimationUtils = new FlingAnimationUtils(getContext(), 0.4f);
    mStatusBarMinHeight = getResources().getDimensionPixelSize(com.android.internal.R.dimen.status_bar_height);
    mQsPeekHeight = getResources().getDimensionPixelSize(R.dimen.qs_peek_height);
    mNotificationsHeaderCollideDistance = getResources().getDimensionPixelSize(R.dimen.header_notifications_collide_distance);
    mUnlockMoveDistance = getResources().getDimensionPixelOffset(R.dimen.unlock_move_distance);
    mClockPositionAlgorithm.loadDimens(getResources());
    mNotificationScrimWaitDistance = getResources().getDimensionPixelSize(R.dimen.notification_scrim_wait_distance);
    mQsFalsingThreshold = getResources().getDimensionPixelSize(R.dimen.qs_falsing_threshold);
    mPositionMinSideMargin = getResources().getDimensionPixelSize(R.dimen.notification_panel_min_side_margin);
    mMaxFadeoutHeight = getResources().getDimensionPixelSize(R.dimen.max_notification_fadeout_height);
    mStatusBarHeaderHeight = getResources().getDimensionPixelSize(R.dimen.status_bar_header_height);
}
Also used : FlingAnimationUtils(com.android.systemui.statusbar.FlingAnimationUtils)

Example 12 with FlingAnimationUtils

use of com.android.systemui.statusbar.FlingAnimationUtils in project android_frameworks_base by ResurrectionRemix.

the class DividerView method onFinishInflate.

@Override
protected void onFinishInflate() {
    super.onFinishInflate();
    mHandle = (DividerHandleView) findViewById(R.id.docked_divider_handle);
    mBackground = findViewById(R.id.docked_divider_background);
    mMinimizedShadow = (MinimizedDockShadow) findViewById(R.id.minimized_dock_shadow);
    mHandle.setOnTouchListener(this);
    mDividerWindowWidth = getResources().getDimensionPixelSize(com.android.internal.R.dimen.docked_stack_divider_thickness);
    mDividerInsets = getResources().getDimensionPixelSize(com.android.internal.R.dimen.docked_stack_divider_insets);
    mDividerSize = mDividerWindowWidth - 2 * mDividerInsets;
    mTouchElevation = getResources().getDimensionPixelSize(R.dimen.docked_stack_divider_lift_elevation);
    mLongPressEntraceAnimDuration = getResources().getInteger(R.integer.long_press_dock_anim_duration);
    mGrowRecents = getResources().getBoolean(R.bool.recents_grow_in_multiwindow);
    mTouchSlop = ViewConfiguration.get(mContext).getScaledTouchSlop();
    mFlingAnimationUtils = new FlingAnimationUtils(getContext(), 0.3f);
    updateDisplayInfo();
    boolean landscape = getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE;
    mHandle.setPointerIcon(PointerIcon.getSystemIcon(getContext(), landscape ? TYPE_HORIZONTAL_DOUBLE_ARROW : TYPE_VERTICAL_DOUBLE_ARROW));
    getViewTreeObserver().addOnComputeInternalInsetsListener(this);
    mHandle.setAccessibilityDelegate(mHandleDelegate);
    mGestureDetector = new GestureDetector(mContext, new SimpleOnGestureListener() {

        @Override
        public boolean onSingleTapUp(MotionEvent e) {
            if (SWAPPING_ENABLED) {
                updateDockSide();
                SystemServicesProxy ssp = Recents.getSystemServices();
                if (mDockSide != WindowManager.DOCKED_INVALID && !ssp.isRecentsActivityVisible()) {
                    mWindowManagerProxy.swapTasks();
                    return true;
                }
            }
            return false;
        }
    });
}
Also used : SystemServicesProxy(com.android.systemui.recents.misc.SystemServicesProxy) FlingAnimationUtils(com.android.systemui.statusbar.FlingAnimationUtils) SimpleOnGestureListener(android.view.GestureDetector.SimpleOnGestureListener) GestureDetector(android.view.GestureDetector) MotionEvent(android.view.MotionEvent)

Example 13 with FlingAnimationUtils

use of com.android.systemui.statusbar.FlingAnimationUtils in project android_frameworks_base by DirtyUnicorns.

the class KeyguardAffordanceHelper method initDimens.

private void initDimens() {
    final ViewConfiguration configuration = ViewConfiguration.get(mContext);
    mTouchSlop = configuration.getScaledPagingTouchSlop();
    mMinFlingVelocity = configuration.getScaledMinimumFlingVelocity();
    mMinTranslationAmount = mContext.getResources().getDimensionPixelSize(R.dimen.keyguard_min_swipe_amount);
    mMinBackgroundRadius = mContext.getResources().getDimensionPixelSize(R.dimen.keyguard_affordance_min_background_radius);
    mTouchTargetSize = mContext.getResources().getDimensionPixelSize(R.dimen.keyguard_affordance_touch_target_size);
    mHintGrowAmount = mContext.getResources().getDimensionPixelSize(R.dimen.hint_grow_amount_sideways);
    mFlingAnimationUtils = new FlingAnimationUtils(mContext, 0.4f);
    mFalsingManager = FalsingManager.getInstance(mContext);
}
Also used : ViewConfiguration(android.view.ViewConfiguration) FlingAnimationUtils(com.android.systemui.statusbar.FlingAnimationUtils)

Example 14 with FlingAnimationUtils

use of com.android.systemui.statusbar.FlingAnimationUtils in project android_frameworks_base by crdroidandroid.

the class KeyguardAffordanceHelper method initDimens.

private void initDimens() {
    final ViewConfiguration configuration = ViewConfiguration.get(mContext);
    mTouchSlop = configuration.getScaledPagingTouchSlop();
    mMinFlingVelocity = configuration.getScaledMinimumFlingVelocity();
    mMinTranslationAmount = mContext.getResources().getDimensionPixelSize(R.dimen.keyguard_min_swipe_amount);
    mMinBackgroundRadius = mContext.getResources().getDimensionPixelSize(R.dimen.keyguard_affordance_min_background_radius);
    mTouchTargetSize = mContext.getResources().getDimensionPixelSize(R.dimen.keyguard_affordance_touch_target_size);
    mHintGrowAmount = mContext.getResources().getDimensionPixelSize(R.dimen.hint_grow_amount_sideways);
    mFlingAnimationUtils = new FlingAnimationUtils(mContext, 0.4f);
    mFalsingManager = FalsingManager.getInstance(mContext);
}
Also used : ViewConfiguration(android.view.ViewConfiguration) FlingAnimationUtils(com.android.systemui.statusbar.FlingAnimationUtils)

Example 15 with FlingAnimationUtils

use of com.android.systemui.statusbar.FlingAnimationUtils in project android_frameworks_base by crdroidandroid.

the class NotificationPanelView method loadDimens.

@Override
protected void loadDimens() {
    super.loadDimens();
    mFlingAnimationUtils = new FlingAnimationUtils(getContext(), 0.4f);
    mStatusBarMinHeight = getResources().getDimensionPixelSize(com.android.internal.R.dimen.status_bar_height);
    mQsPeekHeight = getResources().getDimensionPixelSize(R.dimen.qs_peek_height);
    mNotificationsHeaderCollideDistance = getResources().getDimensionPixelSize(R.dimen.header_notifications_collide_distance);
    mUnlockMoveDistance = getResources().getDimensionPixelOffset(R.dimen.unlock_move_distance);
    mClockPositionAlgorithm.loadDimens(getResources());
    mNotificationScrimWaitDistance = getResources().getDimensionPixelSize(R.dimen.notification_scrim_wait_distance);
    mQsFalsingThreshold = getResources().getDimensionPixelSize(R.dimen.qs_falsing_threshold);
    mPositionMinSideMargin = getResources().getDimensionPixelSize(R.dimen.notification_panel_min_side_margin);
    mMaxFadeoutHeight = getResources().getDimensionPixelSize(R.dimen.max_notification_fadeout_height);
    mStatusBarHeaderHeight = getResources().getDimensionPixelSize(R.dimen.status_bar_header_height);
}
Also used : FlingAnimationUtils(com.android.systemui.statusbar.FlingAnimationUtils)

Aggregations

FlingAnimationUtils (com.android.systemui.statusbar.FlingAnimationUtils)15 GestureDetector (android.view.GestureDetector)5 SimpleOnGestureListener (android.view.GestureDetector.SimpleOnGestureListener)5 MotionEvent (android.view.MotionEvent)5 ViewConfiguration (android.view.ViewConfiguration)5 SystemServicesProxy (com.android.systemui.recents.misc.SystemServicesProxy)5