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