I am using textInputlayout and textInputEditText from material design. Everything works fine until i use some of the custom fonts from the resource file. When user starts typing on the textInputEditText from empty state to text state, there is a small jump in the bottom line/stroke. Apparently height of the component changes automatically when input field is empty field vs filled. This is not happening on OS version 12 or older in android. What could be the reason?
I am using material version 1.9.0
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="hint_text"
android:layout_marginTop="16dp">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="@font/pencilstudio" />
</com.google.android.material.textfield.TextInputLayout>
I tried setting the minimum height for textInputEditText and layout. But this doesn’t fix the issue fully for larger font and display size.
I don’t want the height jump when I use the custom fonts.
MottaMaadi Bench is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.