Fix Taskbar All Apps Button to be Fixed in Minimal Taskbar State

Test: Manual
Bug: 346387672
Flag: NONE taskbar all apps is not behind a flag
Change-Id: Iea63ccf57354a1e2941bd51f7f6f9e69187c4545
This commit is contained in:
Jagrut Desai
2024-06-10 13:08:15 -07:00
parent a39a4695af
commit 31a65a08dc
@@ -347,6 +347,11 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar
float allAppIconTranslateRange = mapRange(scale, transientTaskbarAllAppsOffset,
persistentTaskbarAllAppsOffset);
// no x translation required when all apps button is the only icon in taskbar.
if (iconViews.length <= 1) {
allAppIconTranslateRange = 0f;
}
if (mIsRtl) {
allAppIconTranslateRange *= -1;
}
@@ -377,7 +382,7 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar
-finalMarginScale * (iconIndex - halfIconCount));
}
if (iconView.equals(mTaskbarView.getAllAppsButtonView()) && iconViews.length > 1) {
if (iconView.equals(mTaskbarView.getAllAppsButtonView())) {
((IconButtonView) iconView).setTranslationXForTaskbarAllAppsIcon(
allAppIconTranslateRange);
}