how to show dash linebelow text view

android, android-layout

Solution

use

android:drawableBottom="@drawable/dotted"

instead

android:background="@drawable/dotted"

EDIT:

<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >

<item
    android:left="-5dp"
    android:right="-5dp"
    android:top="-5dp">
    <shape
        android:shape="rectangle">

        <stroke
            android:width="1dp"
            android:dashGap="5dp"
            android:dashWidth="5dp"
            android:color="@android:color/black" />
    </shape>
</item>

</layer-list>

Problem

this is my code below which show dash line on center of textview i want to show below the textview like this: How can I change this to show below the textview dash line ``` <?xml version="1.0" encoding="utf-8"?> <TableRow xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" > <TextView android:id="@+id/apprentTemp" android:textColor="#000000" android:background="@drawable/dotted" android:paddingLeft="10dp" android:gravity="left"/> <TextView android:id="@+id/localTime" android:textColor="#000000" android:background="@drawable/dotted" android:gravity="center"/> </TableRow> <---- dashed.xml --> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="line"> <stroke android:color="#000000" android:dashWidth="5px" android:dashGap="5px" /> </shape> ```

Original source