我们在android编程中往往需要横线和竖线的代码,同时textview下划线,我曾经也想了很多办法,最后查阅资料终于知道怎么操作了,所以分享出来!
画横线:
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:layout_below="@+id/rl_wallet"
android:layout_marginTop="20dp"
android:background="#000000" />画竖线:
<View
android:layout_width="1dip"
android:layout_height="fill_parent"
android:background="#EEEFFF"
android:layout_gravity="center_horizontal"
/>textview.getPaint().setFlags(Paint. UNDERLINE_TEXT_FLAG );
本文介绍如何在Android应用中实现横线、竖线及TextView下划线效果,提供具体XML代码实例,方便开发者快速实现所需视觉效果。

8198

被折叠的 条评论
为什么被折叠?



