From 246fa677b36dff2f95706a86d4d37ad939a76702 Mon Sep 17 00:00:00 2001 From: rightnao Date: Thu, 26 Sep 2024 22:05:02 +0000 Subject: [PATCH] [TextInputLayout] Start outline cutout bounds at a y location of 0 to encompass any possible vertical shifts due to a size difference between the placeholder text and the edit text PiperOrigin-RevId: 679308079 --- .../com/google/android/material/textfield/TextInputLayout.java | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/java/com/google/android/material/textfield/TextInputLayout.java b/lib/java/com/google/android/material/textfield/TextInputLayout.java index 5adc9a4acf4..33d8983b322 100644 --- a/lib/java/com/google/android/material/textfield/TextInputLayout.java +++ b/lib/java/com/google/android/material/textfield/TextInputLayout.java @@ -4259,6 +4259,7 @@ private void openCutout() { // drawing area. cutoutBounds.offset( -getPaddingLeft(), -getPaddingTop() - cutoutBounds.height() / 2 + boxStrokeWidthPx); + cutoutBounds.top = 0; ((CutoutDrawable) boxBackground).setCutout(cutoutBounds); }