Merge "Created a helper method that calculates the hotseat icons shift X." into main

This commit is contained in:
Mykola Podolian
2024-10-16 00:12:44 +00:00
committed by Android (Google) Code Review
4 changed files with 48 additions and 34 deletions
@@ -23,7 +23,6 @@ import static com.android.launcher3.LauncherAnimUtils.SCALE_PROPERTY;
import static com.android.launcher3.LauncherAnimUtils.VIEW_ALPHA;
import static com.android.launcher3.LauncherAnimUtils.VIEW_TRANSLATE_X;
import static com.android.launcher3.LauncherAnimUtils.VIEW_TRANSLATE_Y;
import static com.android.launcher3.Utilities.isRtl;
import static com.android.launcher3.Utilities.mapRange;
import static com.android.launcher3.anim.AnimatedFloat.VALUE;
import static com.android.launcher3.anim.AnimatorListeners.forEndCallback;
@@ -938,10 +937,12 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar
mTaskbarView.isDividerForRecents(), recentTaskIndex);
if (positionInHotseat == ERROR_POSITION_IN_HOTSEAT_NOT_FOUND) continue;
float hotseatAdjustedBorderSpace =
launcherDp.getHotseatAdjustedBorderSpaceForBubbleBar(child.getContext());
float hotseatIconCenter;
if (bubbleBarHasBubbles() && hotseatAdjustedBorderSpace != 0) {
if (launcherDp.shouldAdjustHotseatForBubbleBar(child.getContext(),
bubbleBarHasBubbles())) {
float hotseatAdjustedBorderSpace =
launcherDp.getHotseatAdjustedBorderSpaceForBubbleBar(child.getContext());
hotseatIconCenter = hotseatPadding.left + hotseatCellSize
+ (hotseatCellSize + hotseatAdjustedBorderSpace) * positionInHotseat
+ hotseatCellSize / 2f;