4

I noticed after updating my libraries to the most up to date version that code that uses ems on TextInputEditText does not work anymore. I could not find the reason behind.

The code that worked until the update and now doesn't looks like this (What I mean is that the TextView is not as wide as EMS suggests anymore, but defaults to minimum width)

<com.google.android.material.textfield.TextInputLayout
                android:id="@+id/til"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="10dp"
                android:layout_marginTop="10dp"
                android:layout_marginEnd="10dp"
                android:hint="Some hint"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="parent">

                <com.google.android.material.textfield.TextInputEditText
                    android:id="@+id/tiet"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:autofillHints="Some Hint"
                    android:imeOptions="actionNext"
                    android:importantForAutofill="yes"
                    android:inputType="text"
                    android:ems="7" />
</com.google.android.material.textfield.TextInputLayout>
Avinta
  • 678
  • 1
  • 9
  • 26

0 Answers0