的中间留我想显示TextView的下方的虚线下划线,下面是我的代码Android的虚线下划线在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
android:shape="line">
android:color="@color/oceanBlue"
android:dashWidth="2dp"
android:dashGap="3dp"
android:width="1dp"/>
和TextView中看起来如上
任何人都可以帮助我下面的虚线到textview?
试图与drawableBottom也,但没有用
android:drawableBottom="@drawable/dashed_line"
+0
尝试此链接https://mobikul.com/android-strike-textview/ –
+0
@Srikanth看我的代码 –
+0
嗨@ ND1010_,Vishva dave的代码工作,后来也会尝试你的代码。谢啦。 –