mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 16:26:47 +00:00
Have responsive taskbar UI during swipe up gesture.
- Makes taskbar threshold an absolute Y threshold
instead of a distance threshold.
- Moves handle, taskbar view, and taskbar background
during the swipe up gesture
Next CL will address transforming the nav handle <-> taskbar
and ensuring that there's a clean handoff
Bug: 246631059
Test: swipe up on taskbar, release. see bounce
swipe up on taskbar to go home, proper icon alignment
swipe up on taskbar, pause for overview, see bounce
-> further movement should not move taskbar
test launcher3
Change-Id: I141236fd72428cda7edd0ff116de1d478d18c722
This commit is contained in:
@@ -91,6 +91,7 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar
|
||||
this::updateTranslationY);
|
||||
private AnimatedFloat mTaskbarNavButtonTranslationY;
|
||||
private AnimatedFloat mTaskbarNavButtonTranslationYForInAppDisplay;
|
||||
private float mTaskbarIconTranslationYForSwipe;
|
||||
|
||||
private final int mTaskbarBottomMargin;
|
||||
|
||||
@@ -260,9 +261,18 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar
|
||||
mTaskbarView.setScaleY(scale);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the translation of the TaskbarView during the swipe up gesture.
|
||||
*/
|
||||
public void setTranslationYForSwipe(float transY) {
|
||||
mTaskbarIconTranslationYForSwipe = transY;
|
||||
updateTranslationY();
|
||||
}
|
||||
|
||||
private void updateTranslationY() {
|
||||
mTaskbarView.setTranslationY(mTaskbarIconTranslationYForHome.value
|
||||
+ mTaskbarIconTranslationYForStash.value);
|
||||
+ mTaskbarIconTranslationYForStash.value
|
||||
+ mTaskbarIconTranslationYForSwipe);
|
||||
}
|
||||
|
||||
private void updateIconsBackground() {
|
||||
|
||||
Reference in New Issue
Block a user