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

Commit 1c7122ff authored by Brandon Dayauon's avatar Brandon Dayauon
Browse files

Update height of predictionRow + 4dp to be aligned with NL app suggestions height.

spec: https://screenshot.googleplex.com/9VsQXxmsuZvoj7Y
Add 4dp to the existing height when using two lines. Need to do this for prediction row as well so that
animation is smooth and doesn't show jumpiness.

bug: 378472318
Test: photos:
before: https://screenshot.googleplex.com/7F8FNdnrngpuSUe
after: https://screenshot.googleplex.com/63vttsfptSqwE7c
Flag: NONE increasing height
Change-Id: I2076160efe3596cc8673d32b5066ec2103f71eb0
parent 4674c3bb
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@ public class PredictionRowView<T extends Context & ActivityContext>
    // Vertical padding of the icon that contributes to the expected cell height.
    private final int mVerticalPadding;
    // Extra padding that is used in the top app rows (prediction and search) that is not used in
    // the regular A-Z list. This only applies to single line label.
    // the regular A-Z list.
    private final int mTopRowExtraHeight;

    // Helper to drawing the focus indicator.
@@ -140,7 +140,7 @@ public class PredictionRowView<T extends Context & ActivityContext>
        // is not enabled. Otherwise, the extra height will increase by just the textHeight.
        int extraHeight = (Flags.enableTwolineToggle() &&
                LauncherPrefs.ENABLE_TWOLINE_ALLAPPS_TOGGLE.get(getContext()))
                ? textHeight : mTopRowExtraHeight;
                ? (textHeight + mTopRowExtraHeight) : mTopRowExtraHeight;
        totalHeight += extraHeight;
        return getVisibility() == GONE ? 0 : totalHeight + getPaddingTop() + getPaddingBottom();
    }