1

i need some help for textview style. I need textview with underline. I made some layout xmls. But cant get any succes. Here what i got I want have to make that line at the same line with edittexts bottom line. Here my xml

 <?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
   <item
        android:left="2dp"
        android:right="10dp"
        android:top="20dp">
        <shape android:shape="line" >
            <stroke
                android:width="1dp"
                android:color="@color/colorPrimary"/>

            <padding
                android:bottom="0dp"
                android:left="5dp"
                android:right="5dp"
                android:top="0dp" />
        </shape>
    </item>

</layer-list>

How i can do it.

1 Answers1

0

set drawable as background to your Textview:

<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
    <shape android:shape="rectangle">
        <solid android:color="@android:color/holo_red_dark" />

    </shape>
</item>

<item android:bottom="2dp">
    <shape android:shape="rectangle">
        <solid android:color="#ffffff" />
    </shape>
</item>

</layer-list>
Pradeep Gupta
  • 1,770
  • 1
  • 9
  • 23