Adjusting Taskbar Icons for larger display size

Bug: 323948193
Test: Manual
Flag: NONE

Change-Id: I0bdfcaebf3de050ac850fe42c061c82ffebdb7c2
This commit is contained in:
Jagrut Desai
2024-03-29 11:07:09 -07:00
parent 9f0042b2c8
commit e6f349b3dd
3 changed files with 85 additions and 38 deletions

View File

@@ -337,11 +337,6 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar
private void updateTaskbarIconTranslationXForPinning() {
View[] iconViews = mTaskbarView.getIconViews();
float scale = mTaskbarIconTranslationXForPinning.value;
float taskbarCenterX =
mTaskbarView.getLeft() + (mTaskbarView.getRight() - mTaskbarView.getLeft()) / 2.0f;
float finalMarginScale = mapRange(scale, 0f, mTransientIconSize - mPersistentIconSize);
float transientTaskbarAllAppsOffset = mActivity.getResources().getDimension(
mTaskbarView.getAllAppsButtonTranslationXOffset(true));
float persistentTaskbarAllAppsOffset = mActivity.getResources().getDimension(
@@ -354,6 +349,17 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar
allAppIconTranslateRange *= -1;
}
if (mActivity.isThreeButtonNav()) {
((IconButtonView) mTaskbarView.getAllAppsButtonView())
.setTranslationXForTaskbarAllAppsIcon(allAppIconTranslateRange);
return;
}
float taskbarCenterX =
mTaskbarView.getLeft() + (mTaskbarView.getRight() - mTaskbarView.getLeft()) / 2.0f;
float finalMarginScale = mapRange(scale, 0f, mTransientIconSize - mPersistentIconSize);
float halfIconCount = iconViews.length / 2.0f;
for (int iconIndex = 0; iconIndex < iconViews.length; iconIndex++) {
View iconView = iconViews[iconIndex];