Merge "Fix all apps alpha applying twice" into ub-launcher3-rvc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
bc374cf7f2
+2
-1
@@ -29,6 +29,7 @@ import static com.android.launcher3.anim.Interpolators.DEACCEL;
|
||||
import static com.android.launcher3.anim.Interpolators.DEACCEL_1_7;
|
||||
import static com.android.launcher3.anim.Interpolators.DEACCEL_3;
|
||||
import static com.android.launcher3.anim.Interpolators.FAST_OUT_SLOW_IN;
|
||||
import static com.android.launcher3.anim.Interpolators.FINAL_FRAME;
|
||||
import static com.android.launcher3.anim.Interpolators.INSTANT;
|
||||
import static com.android.launcher3.anim.Interpolators.LINEAR;
|
||||
import static com.android.launcher3.anim.Interpolators.OVERSHOOT_1_2;
|
||||
@@ -188,7 +189,7 @@ public class QuickstepAtomicAnimationFactory extends
|
||||
}
|
||||
} else if (toState == NORMAL && fromState == OVERVIEW_PEEK) {
|
||||
// Keep fully visible until the very end (when overview is offscreen) to make invisible.
|
||||
config.setInterpolator(ANIM_OVERVIEW_FADE, t -> t < 1 ? 0 : 1);
|
||||
config.setInterpolator(ANIM_OVERVIEW_FADE, FINAL_FRAME);
|
||||
} else if (toState == OVERVIEW_PEEK && fromState == NORMAL) {
|
||||
config.setInterpolator(ANIM_OVERVIEW_FADE, INSTANT);
|
||||
config.setInterpolator(ANIM_OVERVIEW_TRANSLATE_X, OVERSHOOT_1_7);
|
||||
|
||||
@@ -6,6 +6,8 @@ import static com.android.launcher3.LauncherState.APPS_VIEW_ITEM_MASK;
|
||||
import static com.android.launcher3.LauncherState.OVERVIEW;
|
||||
import static com.android.launcher3.LauncherState.VERTICAL_SWIPE_INDICATOR;
|
||||
import static com.android.launcher3.anim.Interpolators.FAST_OUT_SLOW_IN;
|
||||
import static com.android.launcher3.anim.Interpolators.FINAL_FRAME;
|
||||
import static com.android.launcher3.anim.Interpolators.INSTANT;
|
||||
import static com.android.launcher3.anim.Interpolators.LINEAR;
|
||||
import static com.android.launcher3.anim.PropertySetter.NO_ANIM_PROPERTY_SETTER;
|
||||
import static com.android.launcher3.states.StateAnimationConfig.ANIM_ALL_APPS_FADE;
|
||||
@@ -227,7 +229,9 @@ public class AllAppsTransitionController implements StateHandler<LauncherState>,
|
||||
setter.setInt(mScrimView, ScrimView.DRAG_HANDLE_ALPHA,
|
||||
(visibleElements & VERTICAL_SWIPE_INDICATOR) != 0 ? 255 : 0, allAppsFade);
|
||||
|
||||
setter.setViewAlpha(mAppsView, hasAnyVisibleItem ? 1 : 0, allAppsFade);
|
||||
// Set visibility of the container at the very beginning or end of the transition.
|
||||
setter.setViewAlpha(mAppsView, hasAnyVisibleItem ? 1 : 0,
|
||||
hasAnyVisibleItem ? INSTANT : FINAL_FRAME);
|
||||
}
|
||||
|
||||
public AnimatorListenerAdapter getProgressAnimatorListener() {
|
||||
|
||||
@@ -61,6 +61,11 @@ public class Interpolators {
|
||||
public static final Interpolator EXAGGERATED_EASE;
|
||||
|
||||
public static final Interpolator INSTANT = t -> 1;
|
||||
/**
|
||||
* All values of t map to 0 until t == 1. This is primarily useful for setting view visibility,
|
||||
* which should only happen at the very end of the animation (when it's already hidden).
|
||||
*/
|
||||
public static final Interpolator FINAL_FRAME = t -> t < 1 ? 0 : 1;
|
||||
|
||||
private static final int MIN_SETTLE_DURATION = 200;
|
||||
private static final float OVERSHOOT_FACTOR = 0.9f;
|
||||
|
||||
Reference in New Issue
Block a user