From 73bf653ef22efebd052f882a2303ee9717ea7e24 Mon Sep 17 00:00:00 2001 From: leticiars Date: Thu, 6 May 2021 14:18:10 -0400 Subject: [PATCH] Automated g4 rollback of changelist 372177002 PiperOrigin-RevId: 372384266 --- .../google/android/material/textfield/TextInputLayout.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/java/com/google/android/material/textfield/TextInputLayout.java b/lib/java/com/google/android/material/textfield/TextInputLayout.java index 0fb0a1c62..755655f63 100644 --- a/lib/java/com/google/android/material/textfield/TextInputLayout.java +++ b/lib/java/com/google/android/material/textfield/TextInputLayout.java @@ -4077,9 +4077,9 @@ public class TextInputLayout extends LinearLayout { final RectF cutoutBounds = tmpRectF; collapsingTextHelper.getCollapsedTextActualBounds( cutoutBounds, editText.getWidth(), editText.getGravity()); - applyCutoutPadding(cutoutBounds); boxLabelCutoutWidth = boxStrokeWidthPx; - cutoutBounds.bottom = boxLabelCutoutWidth; + cutoutBounds.bottom = cutoutBounds.top + boxLabelCutoutWidth; + applyCutoutPadding(cutoutBounds); // Offset the cutout bounds by the TextInputLayout's left and top paddings to ensure that the // cutout is inset relative to the TextInputLayout's bounds. cutoutBounds.offset(-getPaddingLeft(), -getPaddingTop()); @@ -4102,7 +4102,6 @@ public class TextInputLayout extends LinearLayout { private void applyCutoutPadding(@NonNull RectF cutoutBounds) { cutoutBounds.left -= boxLabelCutoutPaddingPx; - cutoutBounds.top -= boxLabelCutoutPaddingPx; cutoutBounds.right += boxLabelCutoutPaddingPx; }