Search in sources :

Example 86 with StateAnimationConfig

use of com.android.launcher3.states.StateAnimationConfig in project android_packages_apps_404Launcher by P-404.

the class StateManager method createAnimationToNewWorkspace.

public AnimatorPlaybackController createAnimationToNewWorkspace(STATE_TYPE state, long duration, @AnimationFlags int animFlags) {
    StateAnimationConfig config = new StateAnimationConfig();
    config.duration = duration;
    config.animFlags = animFlags;
    return createAnimationToNewWorkspace(state, config);
}
Also used : StateAnimationConfig(com.android.launcher3.states.StateAnimationConfig)

Example 87 with StateAnimationConfig

use of com.android.launcher3.states.StateAnimationConfig in project android_packages_apps_404Launcher by P-404.

the class StateManager method createAtomicAnimation.

/**
 * Creates an animation representing atomic transitions between the provided states
 */
public AnimatorSet createAtomicAnimation(STATE_TYPE fromState, STATE_TYPE toState, StateAnimationConfig config) {
    PendingAnimation builder = new PendingAnimation(config.duration);
    prepareForAtomicAnimation(fromState, toState, config);
    for (StateHandler handler : mActivity.getStateManager().getStateHandlers()) {
        handler.setStateWithAnimation(toState, config, builder);
    }
    return builder.buildAnim();
}
Also used : PendingAnimation(com.android.launcher3.anim.PendingAnimation)

Example 88 with StateAnimationConfig

use of com.android.launcher3.states.StateAnimationConfig in project android_packages_apps_404Launcher by P-404.

the class AllAppsSwipeController method initCurrentAnimation.

@Override
protected float initCurrentAnimation() {
    float range = getShiftRange();
    StateAnimationConfig config = getConfigForStates(mFromState, mToState);
    config.duration = (long) (2 * range);
    mCurrentAnimation = mLauncher.getStateManager().createAnimationToNewWorkspace(mToState, config);
    float startVerticalShift = mFromState.getVerticalProgress(mLauncher) * range;
    float endVerticalShift = mToState.getVerticalProgress(mLauncher) * range;
    float totalShift = endVerticalShift - startVerticalShift;
    return 1 / totalShift;
}
Also used : StateAnimationConfig(com.android.launcher3.states.StateAnimationConfig)

Example 89 with StateAnimationConfig

use of com.android.launcher3.states.StateAnimationConfig in project android_packages_apps_404Launcher by P-404.

the class PortraitStatesTouchController method getNormalToAllAppsAnimation.

private StateAnimationConfig getNormalToAllAppsAnimation() {
    StateAnimationConfig builder = new StateAnimationConfig();
    builder.setInterpolator(ANIM_ALL_APPS_FADE, Interpolators.clampToProgress(ACCEL, ALL_APPS_CONTENT_FADE_MIN_CLAMPING_THRESHOLD, ALL_APPS_CONTENT_FADE_MAX_CLAMPING_THRESHOLD));
    builder.setInterpolator(ANIM_SCRIM_FADE, Interpolators.clampToProgress(ACCEL, ALL_APPS_SCRIM_VISIBLE_THRESHOLD, ALL_APPS_SCRIM_OPAQUE_THRESHOLD));
    return builder;
}
Also used : StateAnimationConfig(com.android.launcher3.states.StateAnimationConfig)

Example 90 with StateAnimationConfig

use of com.android.launcher3.states.StateAnimationConfig in project android_packages_apps_404Launcher by P-404.

the class PortraitStatesTouchController method getAllAppsToNormalAnimation.

private StateAnimationConfig getAllAppsToNormalAnimation() {
    StateAnimationConfig builder = new StateAnimationConfig();
    builder.setInterpolator(ANIM_ALL_APPS_FADE, Interpolators.clampToProgress(DEACCEL, 1 - ALL_APPS_CONTENT_FADE_MAX_CLAMPING_THRESHOLD, 1 - ALL_APPS_CONTENT_FADE_MIN_CLAMPING_THRESHOLD));
    builder.setInterpolator(ANIM_SCRIM_FADE, Interpolators.clampToProgress(DEACCEL, 1 - ALL_APPS_SCRIM_OPAQUE_THRESHOLD, 1 - ALL_APPS_SCRIM_VISIBLE_THRESHOLD));
    return builder;
}
Also used : StateAnimationConfig(com.android.launcher3.states.StateAnimationConfig)

Aggregations

StateAnimationConfig (com.android.launcher3.states.StateAnimationConfig)108 PendingAnimation (com.android.launcher3.anim.PendingAnimation)26 LauncherState (com.android.launcher3.LauncherState)25 RecentsView (com.android.quickstep.views.RecentsView)24 Animator (android.animation.Animator)16 ValueAnimator (android.animation.ValueAnimator)13 Interpolator (android.view.animation.Interpolator)12 AnimatorListenerAdapter (android.animation.AnimatorListenerAdapter)9 AnimatorSet (android.animation.AnimatorSet)8 AllAppsTransitionController (com.android.launcher3.allapps.AllAppsTransitionController)8 AnimationSuccessListener (com.android.launcher3.anim.AnimationSuccessListener)7 AbstractFloatingView (com.android.launcher3.AbstractFloatingView)6 BaseQuickstepLauncher (com.android.launcher3.BaseQuickstepLauncher)6 CellLayout (com.android.launcher3.CellLayout)6 Hotseat (com.android.launcher3.Hotseat)6 Workspace (com.android.launcher3.Workspace)6 DepthController (com.android.launcher3.statehandlers.DepthController)6 VISIBLE (android.view.View.VISIBLE)5 HINT_STATE (com.android.launcher3.LauncherState.HINT_STATE)5 HINT_STATE_TWO_BUTTON (com.android.launcher3.LauncherState.HINT_STATE_TWO_BUTTON)5