XML:
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/name_inputLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
app:endIconMode="clear_text"
app:hintEnabled="false">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/name_editText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Name"
android:inputType="text"
android:paddingHorizontal="40dp"/>
</com.google.android.material.textfield.TextInputLayout>
Result:
Workaround: I have to use paddingStart and paddingEnd to achieve the same effect.
