实线
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:background="#FFFFFF"/>
虚线
<View
android:layout_width="match_parent"
android:layout_height="4px"
android:layerType="software"
android:background="@drawable/bg_dash_line"/>
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="line">
<stroke
android:width="3px"
android:color="#FFFFFF"
android:dashWidth="10px"
android:dashGap="10px" />
</shape>
显示一条虚线,width为线条的高度,dashWidth为破折线的宽度,dashGap为破折线之间的空隙的宽度,当dashGap=0时,就是实线
982

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



