Search in sources :

Example 1 with ShowStackActionButtonEvent

use of com.android.systemui.recents.events.activity.ShowStackActionButtonEvent in project platform_frameworks_base by android.

the class TaskStackView method onFirstLayout.

/** Handler for the first layout. */
void onFirstLayout() {
    // Setup the view for the enter animation
    mAnimationHelper.prepareForEnterAnimation();
    // Animate in the freeform workspace
    int ffBgAlpha = mLayoutAlgorithm.getStackState().freeformBackgroundAlpha;
    animateFreeformWorkspaceBackgroundAlpha(ffBgAlpha, new AnimationProps(150, Interpolators.FAST_OUT_SLOW_IN));
    // Set the task focused state without requesting view focus, and leave the focus animations
    // until after the enter-animation
    RecentsConfiguration config = Recents.getConfiguration();
    RecentsActivityLaunchState launchState = config.getLaunchState();
    int focusedTaskIndex = launchState.getInitialFocusTaskIndex(mStack.getTaskCount());
    if (focusedTaskIndex != -1) {
        setFocusedTask(focusedTaskIndex, false, /* scrollToTask */
        false);
    }
    // Update the stack action button visibility
    if (mStackScroller.getStackScroll() < SHOW_STACK_ACTION_BUTTON_SCROLL_THRESHOLD && mStack.getTaskCount() > 0) {
        EventBus.getDefault().send(new ShowStackActionButtonEvent(false));
    } else {
        EventBus.getDefault().send(new HideStackActionButtonEvent());
    }
}
Also used : RecentsActivityLaunchState(com.android.systemui.recents.RecentsActivityLaunchState) RecentsConfiguration(com.android.systemui.recents.RecentsConfiguration) HideStackActionButtonEvent(com.android.systemui.recents.events.activity.HideStackActionButtonEvent) ShowStackActionButtonEvent(com.android.systemui.recents.events.activity.ShowStackActionButtonEvent)

Aggregations

RecentsActivityLaunchState (com.android.systemui.recents.RecentsActivityLaunchState)1 RecentsConfiguration (com.android.systemui.recents.RecentsConfiguration)1 HideStackActionButtonEvent (com.android.systemui.recents.events.activity.HideStackActionButtonEvent)1 ShowStackActionButtonEvent (com.android.systemui.recents.events.activity.ShowStackActionButtonEvent)1