TextInputLayout prefix has a small but noticeable spacing to the subsequent text in the TextInputEditText.
In the following image, The first www is the prefix, the following are the regular text. I want to remove the spacing shown in the circle

My code:
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/text_input_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:prefixText="www"
app:prefixTextColor="@color/black">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/text_input_edit_text"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
Thank you!
You can override the material_input_text_to_prefix_suffix_padding dimension in your dimens.xml file
Something like:
<dimen name="material_input_text_to_prefix_suffix_padding">0dp</dimen>

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With