commit | 6c345f4d4c7cf78d2a1760994bc4c12fc1e99499 | [log] [tgz] |
---|---|---|
author | Brandon Dayauon <brdayauon@google.com> | Tue Oct 03 16:38:42 2023 -0700 |
committer | Brandon Dayauon <brdayauon@google.com> | Wed Oct 04 16:44:03 2023 -0700 |
tree | bff117ed724858ec5d38f4ebf7db319160869183 | |
parent | fb607d67b29774eb21f917148bd4b719c2e2ed68 [diff] |
Fix text jumping from one line -> two line when scrolling The issue this happens is because the paint letter spacing can change during checkForEllipsis() so during vertical calculation for two line, set the paint letter spacing to the MIN_LETTER_SPACING that is used in checkForELlipsis() bug: 303319642 Test: After: https://drive.google.com/file/d/14YfmEWNpmllSAdLeUamUpewa8ljbqXAU/view?usp=sharing before: https://drive.google.com/file/d/14Y_I-iuyOGHCr809AlqNL8o1IdFjk3_8/view?usp=sharing Flag: disabled Change-Id: I1f56a9e9d22ab45b0491e5fa65b5bfc5b10fc720
diff --git a/src/com/android/launcher3/BubbleTextView.java b/src/com/android/launcher3/BubbleTextView.java index ab9836f..8b16a5d 100644 --- a/src/com/android/launcher3/BubbleTextView.java +++ b/src/com/android/launcher3/BubbleTextView.java
@@ -814,6 +814,8 @@ float currentWordWidth, runningWidth = 0; CharSequence currentWord; StringBuilder newString = new StringBuilder(); + // TODO: Remove when ENABLE_ICON_LABEL_AUTO_SCALING feature flag is being cleaned up. + paint.setLetterSpacing(MIN_LETTER_SPACING); int stringPtr = 0; for (int i = 0; i < breakPoints.size()+1; i++) { if (i < breakPoints.size()) {