diff options
Diffstat (limited to 'quickstep/src/com/android/launcher3/taskbar/TaskbarViewController.java')
-rw-r--r-- | quickstep/src/com/android/launcher3/taskbar/TaskbarViewController.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarViewController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarViewController.java index ed09fa5984..ff04799c92 100644 --- a/quickstep/src/com/android/launcher3/taskbar/TaskbarViewController.java +++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarViewController.java @@ -60,6 +60,7 @@ public class TaskbarViewController { this::updateTranslationY); private final AnimatedFloat mTaskbarIconTranslationYForStash = new AnimatedFloat( this::updateTranslationY); + private AnimatedFloat mTaskbarNavButtonTranslationY; private final TaskbarModelCallbacks mModelCallbacks; @@ -88,6 +89,8 @@ public class TaskbarViewController { mModelCallbacks.init(controllers); LauncherAppState.getInstance(mActivity).getModel().addCallbacksAndLoad(mModelCallbacks); + mTaskbarNavButtonTranslationY = + controllers.navbarButtonsViewController.getTaskbarNavButtonTranslationY(); } public void onDestroy() { @@ -214,6 +217,7 @@ public class TaskbarViewController { int offsetY = launcherDp.getTaskbarOffsetY(); setter.setFloat(mTaskbarIconTranslationYForHome, VALUE, -offsetY, LINEAR); + setter.setFloat(mTaskbarNavButtonTranslationY, VALUE, -offsetY, LINEAR); int collapsedHeight = mActivity.getDefaultTaskbarWindowHeight(); int expandedHeight = Math.max(collapsedHeight, @@ -238,6 +242,14 @@ public class TaskbarViewController { return controller; } + public void onRotationChanged(DeviceProfile deviceProfile) { + if (areIconsVisible()) { + // We only translate on rotation when on home + return; + } + mTaskbarNavButtonTranslationY.updateValue(-deviceProfile.getTaskbarOffsetY()); + } + /** * Callbacks for {@link TaskbarView} to interact with its controller. */ |