Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6c345f4d authored by Brandon Dayauon's avatar Brandon Dayauon
Browse files

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
parent fb607d67
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -814,6 +814,8 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver,
        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()) {