Fix Taskabr Divider Line traveling too far

Currently, all apps button and divider line overlaps each other when launching app from home. so here we are arbituraly making tasakbar divider line position in hotseat to be little off centered so icons don't over lap and divider line travels less to its position on taskbar.

Test: Manual
Bug: 308488785
Flag: LEGACY ENABLE_TASKBAR_PINNING DISABLED
Change-Id: I6cf9f3db50f34deb0c393ec1cfd0268e1b147758
This commit is contained in:
Jagrut Desai
2023-10-30 15:42:45 -07:00
parent 24231d9994
commit b7f4236776

View File

@@ -714,13 +714,19 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar
continue;
}
int positionInHotseat;
if (isAllAppsButton || isTaskbarDividerView) {
// Note that there is no All Apps button or taskbar divider view in the hotseat,
float positionInHotseat;
if (isAllAppsButton) {
// Note that there is no All Apps button in the hotseat,
// this position is only used as its convenient for animation purposes.
positionInHotseat = Utilities.isRtl(child.getResources())
? taskbarDp.numShownHotseatIcons
: -1;
} else if (isTaskbarDividerView) {
// Note that there is no taskbar divider view in the hotseat,
// this position is only used as its convenient for animation purposes.
positionInHotseat = Utilities.isRtl(child.getResources())
? taskbarDp.numShownHotseatIcons - 0.5f
: -0.5f;
} else if (child.getTag() instanceof ItemInfo) {
positionInHotseat = ((ItemInfo) child.getTag()).screenId;
} else {