Closed IgoBobrov closed 2 years ago
android:ems="8"
is also not working with com.google.android.material:material:1.4.0
I'll work on this to solve the issue.
In which xml file this above code is present?
In which xml file this above code is present?
I have multiple layout files in my app. In each layout file the issue is coming. I think the issue is only with material:1.4.0. With v1.3.0 its working fine
Okay, let me check!
minEms
and maxEms
should work now, they need to be set on the TextInputLayout
(which should use android:layout_width="wrap_content"
) and not the TextInputEditText
though.
<com.google.android.material.textfield.TextInputLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minEms="10">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</com.google.android.material.textfield.TextInputLayout>
The issue is not solved it seems. I am using com.google.android.material:material:1.5.0
below is my TextInputLayout xml contents
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/textInputLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:minEms="10"
android:hint="Name"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/button">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</com.google.android.material.textfield.TextInputLayout>
Its still not working
Sorry for not specifying it in my previous comment, the fix should be part of the next release.
no funciona en la version 'com.google.android.material:material:1.6.0-alpha02'
The issue is not solved it seems. I am using
com.google.android.material:material:1.5.0
below is my TextInputLayout xml contents<com.google.android.material.textfield.TextInputLayout android:id="@+id/textInputLayout" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="20dp" android:minEms="10" android:hint="Name" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintTop_toBottomOf="@+id/button"> <com.google.android.material.textfield.TextInputEditText android:layout_width="match_parent" android:layout_height="wrap_content" /> </com.google.android.material.textfield.TextInputLayout>
Its still not working
Tested in version 1.6.0 and working as expected
Description: TextInputEditText minEms is not working, on 1.3.0 ver all works fine
Expected behavior: minEms must set width of TextInputEditText by value
Source code: <com.google.android.material.textfield.TextInputEditText android:id="@+id/etPhoneNumber" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/edit_text_background" android:inputType="phone" android:maxLines="1" android:minEms="9" android:padding="6dp" android:singleLine="true" android:textCursorDrawable="@drawable/edit_text_cursor" android:textSize="@dimen/text_size_extra_large" />
Android API version: 28, 29
Material Library version: 1.4.0-rc01
Device: Xiaomi MI11, emulator API 28, Android Studio Layout Editor also