use of com.android.launcher3.states.StateAnimationConfig in project android_packages_apps_Launcher3 by crdroidandroid.
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();
}
use of com.android.launcher3.states.StateAnimationConfig in project android_packages_apps_Launcher3 by crdroidandroid.
the class StaggeredWorkspaceAnim method prepareToAnimate.
/**
* Setup workspace with 0 duration to prepare for our staggered animation.
*/
private void prepareToAnimate(Launcher launcher, boolean animateOverviewScrim) {
StateAnimationConfig config = new StateAnimationConfig();
config.animFlags = SKIP_OVERVIEW | SKIP_DEPTH_CONTROLLER | SKIP_SCRIM;
config.duration = 0;
// setRecentsAttachedToAppWindow() will animate recents out.
launcher.getStateManager().createAtomicAnimation(BACKGROUND_APP, NORMAL, config).start();
// Stop scrolling so that it doesn't interfere with the translation offscreen.
launcher.<RecentsView>getOverviewPanel().getScroller().forceFinished(true);
if (animateOverviewScrim) {
launcher.getWorkspace().getStateTransitionAnimation().setScrim(NO_ANIM_PROPERTY_SETTER, BACKGROUND_APP, config);
}
}
use of com.android.launcher3.states.StateAnimationConfig in project android_packages_apps_Launcher3 by crdroidandroid.
the class StaggeredWorkspaceAnim method addDepthAnimationForState.
private void addDepthAnimationForState(Launcher launcher, LauncherState state, long duration) {
if (!(launcher instanceof BaseQuickstepLauncher)) {
return;
}
PendingAnimation builder = new PendingAnimation(duration);
DepthController depthController = ((BaseQuickstepLauncher) launcher).getDepthController();
depthController.setStateWithAnimation(state, new StateAnimationConfig(), builder);
mAnimators.play(builder.buildAnim());
}
use of com.android.launcher3.states.StateAnimationConfig in project android_packages_apps_Launcher3 by crdroidandroid.
the class WorkspaceRevealAnim method prepareToAnimate.
/**
* Setup workspace with 0 duration.
*/
private void prepareToAnimate(Launcher launcher, boolean animateOverviewScrim) {
StateAnimationConfig config = new StateAnimationConfig();
config.animFlags = SKIP_OVERVIEW | SKIP_DEPTH_CONTROLLER | SKIP_SCRIM;
config.duration = 0;
// setRecentsAttachedToAppWindow() will animate recents out.
launcher.getStateManager().createAtomicAnimation(BACKGROUND_APP, NORMAL, config).start();
// Stop scrolling so that it doesn't interfere with the translation offscreen.
launcher.<RecentsView>getOverviewPanel().getScroller().forceFinished(true);
if (animateOverviewScrim) {
launcher.getWorkspace().getStateTransitionAnimation().setScrim(NO_ANIM_PROPERTY_SETTER, BACKGROUND_APP, config);
}
}
use of com.android.launcher3.states.StateAnimationConfig in project android_packages_apps_Launcher3 by AOSPA.
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;
}
Aggregations