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 committed 2023-03-21 10:25:48 -07:00
1 parent 149246f077
commit 3344ec7004
11 files changed
+156 -4

No files matched your search

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