1
     <EditText
        android:id="@+id/idLogin"
        android:layout_below="@+id/signintitle"
        android:layout_marginTop="20dp"
        android:fontFamily="@font/calibri_bold"
        android:background="@drawable/editbox"
        android:gravity="center"
        android:textColor="@color/slogan_color"
        android:textSize="20sp"
        android:hint="@string/id"
        android:inputType="text|textNoSuggestions"
        android:textCursorDrawable="@null"
        android:textColorHint="@color/slogan_color"
        android:layout_centerHorizontal="true"
        android:layout_width="350dp"
        android:layout_height="45dp" />

I have a background drawable already, so how can I remove the edittext underline?Check the image for more details.

Any help is appreciated!

enter image description here

Sekiro
  • 1,537
  • 1
  • 7
  • 21
Kayes Fahim
  • 672
  • 5
  • 16

1 Answers1

0

Try this

txtEmail = (EditText) findViewById(R.id.txtEmail); txtEmail.setInputType(InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);

if this not work try this one

android:inputType="textVisiblePassword"

or

.setInputType(InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD);
code4rox
  • 941
  • 9
  • 34
  • `android:inputType="textVisiblePassword"` work for me. Also try convert `EditText` to `AppCompatEditText` – code4rox Jan 29 '21 at 10:43