的中间留我想显示TextView的下方的虚线下划线,下面是我的代码Android的虚线下划线在TextView中
<TextView
android:id="@+id/contact_num"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="4dp"
android:text="1234567890"
android:background="@drawable/dashed_line"
android:layerType="software"
android:textSize="20dp" />
dashed_line.xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="line">
<stroke
android:color="@color/oceanBlue"
android:dashWidth="2dp"
android:dashGap="3dp"
android:width="1dp"/>
</shape>
任何人都可以帮助我下面的虚线到textview?
试图与drawableBottom也,但没有用
android:drawableBottom="@drawable/dashed_line"
尝试此链接https://mobikul.com/android-strike-textview/ –
@Srikanth看我的代码 –
嗨@ ND1010_,Vishva dave的代码工作,后来也会尝试你的代码。谢啦。 –