mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 01:46:49 +00:00
Cleanup how we set back button alpha
Add BackButtonAlphaHandler to set back button alpha, instead of setting it from multiple places. Also force back button alpha to be 1 if swipe up is disabled (b/80091187) Change-Id: I49b63a0e6b033a3a947a847669a398f1b9ff0564
This commit is contained in:
@@ -25,11 +25,9 @@ import com.android.launcher3.LauncherState;
|
||||
import com.android.launcher3.LauncherStateManager.AnimationConfig;
|
||||
import com.android.launcher3.LauncherStateManager.StateHandler;
|
||||
import com.android.launcher3.R;
|
||||
import com.android.launcher3.Utilities;
|
||||
import com.android.launcher3.anim.AnimationSuccessListener;
|
||||
import com.android.launcher3.anim.AnimatorSetBuilder;
|
||||
import com.android.launcher3.anim.PropertySetter;
|
||||
import com.android.launcher3.uioverrides.UiFactory;
|
||||
import com.android.launcher3.util.Themes;
|
||||
import com.android.launcher3.views.ScrimView;
|
||||
|
||||
@@ -184,13 +182,6 @@ public class AllAppsTransitionController implements StateHandler, OnDeviceProfil
|
||||
anim.setDuration(config.duration);
|
||||
anim.setInterpolator(builder.getInterpolator(ANIM_VERTICAL_PROGRESS, interpolator));
|
||||
anim.addListener(getProgressAnimatorListener());
|
||||
if (toState.hideBackButton) {
|
||||
anim.addUpdateListener(animation -> {
|
||||
final float alpha = (float) animation.getAnimatedValue();
|
||||
UiFactory.setBackButtonAlpha(mLauncher, 1 - Utilities.boundToRange(alpha, 0, 1),
|
||||
false /* animate */);
|
||||
});
|
||||
}
|
||||
|
||||
builder.play(anim);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user