Android实现水平虚线和竖直虚线

时间:2021-03-09 13:55:09   收藏:0   阅读:0

水平虚线

shape:   line-horizontal.xml 

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="line">
<stroke
android:width="1dp"
android:color="#747474"
android:dashWidth="6dp"
android:dashGap="3dp" />
</shape>

 


竖直虚线
shape:   line-vertical.xml

<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:left="-600dp"
android:right="-600dp">
<rotate android:drawable="@drawable/line_horizontal"
android:visible="true"
android:fromDegrees="90"/>
</item>
</layer-list>

 

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!