Skip to content

Commit

Permalink
[TextInputLayout] Fixed regression bug of prefix spacing being shown …
Browse files Browse the repository at this point in the history
…and making expanded label be in the wrong position when text field is not focused.

Resolves #2612

PiperOrigin-RevId: 437745108
(cherry picked from commit 784f901)
  • Loading branch information
leticiarossi authored and dsn5ft committed Apr 19, 2022
1 parent ebc9d19 commit 4d78879
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -3995,7 +3995,8 @@ boolean updateDummyDrawables() {
}

private boolean shouldUpdateStartDummyDrawable() {
return (getStartIconDrawable() != null || getPrefixText() != null)
return (getStartIconDrawable() != null
|| (getPrefixText() != null && getPrefixTextView().getVisibility() == VISIBLE))
&& (startLayout.getMeasuredWidth() > 0);
}

Expand Down

0 comments on commit 4d78879

Please sign in to comment.