It seems that maxWidth has no effect on EditText. Could anyone shed some light on this?
<EditText
android:id="@+id/editTextFoo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:autofillHints="port"
android:ems="10"
android:maxWidth="100dp"
tools:targetApi="o" />
The above code results in the following:
If I set layout_width="100dp" as following:
<EditText
android:id="@+id/editTextFoo"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:autofillHints="port"
android:ems="10"
android:maxWidth="100dp"
tools:targetApi="o" />
the width is correct:
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…