String displayed below textview not showing

I have a textview, I want to show the line below it. For this, I use the drawableBottom attribute. Here is my code

<TextView android:id="@+id/total" android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="right" android:text="TextView" android:drawableBottom="@drawable/dividerline"/> 

here is my dividerline.xml

 <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="line"> <stroke android:width="70dp" android:color="@android:color/black" /> <size android:height="1dp" /> <solid android:color="@android:color/black" /> </shape> 

I get no errors. Just when I launch the application, the line below does not appear below the text.

Are you using the drawableBottom attribute incorrectly? Looking forward to some help :)

+7
source share
2 answers

Try the following:

 <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" > <size android:height="1dp" android:width="70dp" /> <solid android:color="@android:color/black" /> </shape> 
+13
source

Use Linkify

 phone_no.setText("1222446"); Linkify.addLinks(phone_no, Linkify.ALL); 

It will automatically display the line below textview

-2
source

All Articles