File tree 1 file changed +7
-0
lines changed
lib/java/com/google/android/material/textfield
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -440,6 +440,8 @@ public interface OnEndIconChangedListener {
440
440
441
441
@ ColorInt private int disabledColor ;
442
442
443
+ int originalEditTextMinimumHeight ;
444
+
443
445
// Only used for testing
444
446
private boolean hintExpanded ;
445
447
@@ -1562,6 +1564,8 @@ private void setEditText(EditText editText) {
1562
1564
Gravity .TOP | (editTextGravity & ~Gravity .VERTICAL_GRAVITY_MASK ));
1563
1565
collapsingTextHelper .setExpandedTextGravity (editTextGravity );
1564
1566
1567
+ originalEditTextMinimumHeight = ViewCompat .getMinimumHeight (editText );
1568
+
1565
1569
// Add a TextWatcher so that we know when the text input has changed.
1566
1570
this .editText .addTextChangedListener (
1567
1571
new TextWatcher () {
@@ -1574,6 +1578,9 @@ public void afterTextChanged(@NonNull Editable s) {
1574
1578
if (placeholderEnabled ) {
1575
1579
updatePlaceholderText (s );
1576
1580
}
1581
+ if (ViewCompat .getMinimumHeight (editText ) != originalEditTextMinimumHeight ) {
1582
+ editText .setMinimumHeight (originalEditTextMinimumHeight );
1583
+ }
1577
1584
}
1578
1585
1579
1586
@ Override
You can’t perform that action at this time.
0 commit comments