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


水平虚线

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>

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM