Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove bottom border from TextInputLayout android

I have added TextInputLayout with TextInputEditText. But when I start typing the bottom border is automatically display.

     <com.google.android.material.textfield.TextInputLayout
        android:id="@+id/input_layout_etText"
        android:layout_width="match_parent"
        android:background="@null"
        app:boxBackgroundMode="none"
        app:boxStrokeWidth="0dp"
        android:layout_height="wrap_content">
    <com.google.android.material.textfield.TextInputEditText
        android:id="@+id/etText"
        android:layout_width="match_parent"
        android:layout_height="@dimen/_35sdp"
        android:layout_gravity="center"
        android:imeOptions="actionNext"
        android:background="@null"
        android:maxLines="1"
        android:paddingLeft="@dimen/_5sdp"
        android:paddingRight="@dimen/_5sdp"
        android:textColor="@color/colorBlack"
        android:textSize="@dimen/_11sdp" />
    </com.google.android.material.textfield.TextInputLayout>
like image 795
Pratik Satani Avatar asked May 06 '26 02:05

Pratik Satani


1 Answers

Use the below code to remove the line.

<com.google.android.material.textfield.TextInputLayout
       app:boxStrokeWidth="0dp"
       app:boxStrokeWidthFocused="0dp"
       ...>
like image 166
Mehul Kabaria Avatar answered May 08 '26 17:05

Mehul Kabaria



Donate For Us

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