android xml中设置水平虚线及竖直虚线
生活随笔
收集整理的這篇文章主要介紹了
android xml中设置水平虚线及竖直虚线
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
水平線背景
<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android"android:shape="line"><strokeandroid:width="1dp"android:color="@color/colorAccent"android:dashGap="4dp"android:dashWidth="6dp"/> </shape>豎直虛線
<?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"><itemandroid:left="-600dp"android:right="-600dp"> ---》 讓其居中顯示<rotate android:drawable="@drawable/line_stroke"android:visible="true"android:fromDegrees="90"/></item> </layer-list>引用
<TextViewandroid:layout_width="80dp"android:layout_height="match_parent"android:layout_centerVertical="true"android:layerType="software"android:text="sss" android:background="@drawable/line_vertical" />總結
以上是生活随笔為你收集整理的android xml中设置水平虚线及竖直虚线的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 复变函数在计算机科学中的应用,复变函数的
- 下一篇: PHP 执行系统外部命令 system(