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:
@@ -84,6 +84,9 @@ public class StashedHandleViewController implements TaskbarControllers.LoggableT
|
||||
private boolean mIsStashed;
|
||||
private boolean mTaskbarHidden;
|
||||
|
||||
private float mTranslationYForSwipe;
|
||||
private float mTranslationYForStash;
|
||||
|
||||
public StashedHandleViewController(TaskbarActivityContext activity,
|
||||
StashedHandleView stashedHandleView) {
|
||||
mActivity = activity;
|
||||
@@ -254,7 +257,20 @@ public class StashedHandleViewController implements TaskbarControllers.LoggableT
|
||||
* Sets the translation of the stashed handle during the swipe up gesture.
|
||||
*/
|
||||
protected void setTranslationYForSwipe(float transY) {
|
||||
mStashedHandleView.setTranslationY(transY);
|
||||
mTranslationYForSwipe = transY;
|
||||
updateTranslationY();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the translation of the stashed handle during the spring on stash animation.
|
||||
*/
|
||||
protected void setTranslationYForStash(float transY) {
|
||||
mTranslationYForStash = transY;
|
||||
updateTranslationY();
|
||||
}
|
||||
|
||||
private void updateTranslationY() {
|
||||
mStashedHandleView.setTranslationY(mTranslationYForSwipe + mTranslationYForStash);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user