mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 16:26:47 +00:00
Add spring animation when stashing transient taskbar.
Bug: 273961611 Change-Id: I35a658a5e30a155094a48effdefc3895f45e0483 Flag: ENABLE_TRANSIENT_TASKBAR Test: stash transient taskbar
This commit is contained in:
@@ -103,6 +103,7 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar
|
||||
private AnimatedFloat mTaskbarNavButtonTranslationY;
|
||||
private AnimatedFloat mTaskbarNavButtonTranslationYForInAppDisplay;
|
||||
private float mTaskbarIconTranslationYForSwipe;
|
||||
private float mTaskbarIconTranslationYForSpringOnStash;
|
||||
|
||||
private final int mTaskbarBottomMargin;
|
||||
private final int mStashedHandleHeight;
|
||||
@@ -291,10 +292,19 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar
|
||||
updateTranslationY();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the translation of the TaskbarView during the spring on stash animation.
|
||||
*/
|
||||
public void setTranslationYForStash(float transY) {
|
||||
mTaskbarIconTranslationYForSpringOnStash = transY;
|
||||
updateTranslationY();
|
||||
}
|
||||
|
||||
private void updateTranslationY() {
|
||||
mTaskbarView.setTranslationY(mTaskbarIconTranslationYForHome.value
|
||||
+ mTaskbarIconTranslationYForStash.value
|
||||
+ mTaskbarIconTranslationYForSwipe);
|
||||
+ mTaskbarIconTranslationYForSwipe
|
||||
+ mTaskbarIconTranslationYForSpringOnStash);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user