Skip to content
Advertisement

How to underline an EditText

I am having some problems to underline an EditText in AndroidStudio.

This is what I am looking for (this is just a photo, not my real text):

example screenshot

But I do not really know any property to do that.

My code right now is really simple. Just the “normal” one:

 <EditText
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:inputType="textPersonName"
        android:ems="10"
        android:layout_margin="16dp"
        android:id="@+id/tx_titulo"
        android:layout_alignParentTop="true"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true"
        android:text="@string/pt_titulo"
        android:layout_alignParentRight="true"
        android:layout_alignParentEnd="true"
        android:allowUndo="true"
        />

I do not want to underline just the text (in this case “Título”), but the whole PlainText

Does anybody know it? Greets.

Advertisement

Answer

It is default, but try to check your styles. Maybe there is a style that will override the style in the whole application. If there is, just remove it

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement