mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 10:48:19 +00:00
Fade in/out taskbar when launching apps from or back to AllApps/-1
- Added isHotseatIconTopWhenAligned to control both iconAlignment and stash animation to just fade in if hotseat icon isn't on top of the screen in the aligned state Fix: 257355864 Fix: 213455090 Test: Launch apps from/back to home, taskbar animate from/to hotseat Test: Launch apps from/back to AllApps/-1, taskbar fade in/out Test: Repeat aboth with transient or persistent taskbar Change-Id: I6bdae615ff9e199d23cbfe2d26c8d46a08fbc436
This commit is contained in:
@@ -385,6 +385,13 @@ import java.util.StringJoiner;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns if the current Launcher state has hotseat on top of other elemnets.
|
||||
*/
|
||||
public boolean isInHotseatOnTopStates() {
|
||||
return mLauncherState != LauncherState.ALL_APPS;
|
||||
}
|
||||
|
||||
private void playStateTransitionAnim(AnimatorSet animatorSet, long duration,
|
||||
boolean committed) {
|
||||
boolean isInStashedState = mLauncherState.isTaskbarStashed(mLauncher);
|
||||
@@ -438,14 +445,16 @@ import java.util.StringJoiner;
|
||||
|
||||
private void updateIconAlphaForHome(float alpha) {
|
||||
mIconAlphaForHome.setValue(alpha);
|
||||
|
||||
boolean hotseatVisible = alpha == 0
|
||||
|| (!mControllers.uiController.isHotseatIconOnTopWhenAligned()
|
||||
&& mIconAlignment.value > 0);
|
||||
/*
|
||||
* Hide Launcher Hotseat icons when Taskbar icons have opacity. Both icon sets
|
||||
* should not be visible at the same time.
|
||||
*/
|
||||
mLauncher.getHotseat().setIconsAlpha(alpha > 0 ? 0 : 1);
|
||||
mLauncher.getHotseat().setIconsAlpha(hotseatVisible ? 1 : 0);
|
||||
mLauncher.getHotseat().setQsbAlpha(
|
||||
mLauncher.getDeviceProfile().isQsbInline && alpha > 0 ? 0 : 1);
|
||||
mLauncher.getDeviceProfile().isQsbInline && !hotseatVisible ? 0 : 1);
|
||||
}
|
||||
|
||||
private final class TaskBarRecentsAnimationListener implements
|
||||
|
||||
Reference in New Issue
Block a user