How to remove underline below EditText indicator?

set the background color of EditText to white.

You can set the background color of your screen to EditText background, if both screen background color and EditText background color are same means EditText underline won't be visible.

android:background="#FFFFFF" 

If you are using the material components TextInputLayout, setting the background color to something else doesn't remove the underline, the solution is to set the BoxBackgroundMode like this (kotlin): myTextInputLayout.boxBackgroundMode = TextInputLayout.BOX_BACKGROUND_NONE

or in xml: app:boxBackgroundMode="none"

I think that this change on the component was made to make the underline 'work' with a custom background color


Make background like this android:background="@null" of your editText

Tags:

Android