0

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.

2
  • Any fix for this? Commented Jun 8, 2024 at 8:37
  • This question is difficult to understand. I think what might help here is a screenshot showing what's expected versus what's actually happening. Commented Jul 10, 2024 at 15:33

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.