I want to create TextInputLayout without a gap between the underline and edge of the box
can remove this gap?
image here:
<com.google.android.material.textfield.TextInputLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:id="@+id/tilSearch"
android:hint="@string/search_location"
app:errorEnabled="false"
app:errorTextColor="@color/red"
app:helperTextEnabled="true">
<EditText
android:id="@+id/edtSearch"
android:layout_width="match_parent"
android:layout_height="@dimen/_60dp"
android:importantForAutofill="no"
android:inputType="text"
tools:ignore="LabelFor" />
</com.google.android.material.textfield.TextInputLayout>
2
Answers
I've solved my issue using scaleX attribute
android:scaleX="1.02"
. There might be some better way, but I couldn't find any.attr_android:scaleX
This will be the result: result
You can actually remove this underline using these attributes instead removing gap. removing gap will create double line into the layout. so instead remove that gap remove underline in the editText..