Fix text sizes and alignment in drop target

Drop target button texts are being resized incorrectly.
When both buttons are visible, the text is considerably smaller compared
to only one visible button. This happens even for the default display and font scale 1.

Fix: 271279172
Test: manual. test all combinations of display size and font size.
Test: HomeScreenEditStateImageTest
Change-Id: Ib001dcf8b096c65b138946bdad49cf8199fb5b1d
This commit is contained in:
Jordan Silva
2023-03-28 00:33:08 +01:00
parent 5e43031ed0
commit 567372fbda
3 changed files with 7 additions and 10 deletions

View File

@@ -152,6 +152,7 @@ public class DropTargetBar extends FrameLayout
firstButton.setTextVisible(true);
firstButton.setIconVisible(true);
firstButton.measure(widthSpec, heightSpec);
firstButton.resizeTextToFit();
} else if (visibleCount == 2) {
DeviceProfile dp = mLauncher.getDeviceProfile();
int verticalPadding = dp.dropTargetVerticalPaddingPx;