There is a solution to how to emphasize the usual line.

String htmlTaggedString = "<u>адреса</u>"; Spanned textSpan = android.text.Html.fromHtml(htmlTaggedString); tv_adr.setText(textSpan); 

But there is no dotted underscore tag in HTML and this causes difficulties in solving.

    2 answers 2

    You can do this:

    dashed.xml

     <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="line" > <stroke android:dashGap="2dip" android:dashWidth="2dip" android:color="@android:color/black" /> <size android:width="60dp" android:height="6dp"/> </shape> 

    then

     android:drawableBottom="@drawable/dashed" 

    • I have a solid line, the text is underlined. - Gennady
    • Not working this answer. - Gennady
    • Smart are all here) stackoverflow.com/a/18508609/5698345 - Flippy
    • @ SergeyGrushin, what exactly embarrassed you? - katso

    But this is a working answer.

     <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item> <shape android:shape="rectangle" > <solid android:color="@android:color/transparent" /> </shape> </item> <item android:top="-2dp" android:right="-2dp" android:left="-2dp"> <shape> <solid android:color="@android:color/transparent" /> <stroke android:dashGap="10px" android:dashWidth="10px" android:width="1dp" android:color="#ababb2" /> </shape> </item> </layer-list>