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:
Jon Miranda
2023-03-21 07:07:46 -07:00
parent 149246f077
commit 3344ec7004
11 changed files with 156 additions and 4 deletions

View File

@@ -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);
}
/**