<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="line"> <stroke android:color="@color/context_text_color" android:width="@dimen/line_height_1" android:dashWidth="@dimen/drawablePadding_2" android:dashGap="@dimen/drawablePadding_2"/> <!-- <size android:height="@dimen/drawablePadding_2"/>--> </shape>
<View android:layout_width="match_parent" android:layout_height="@dimen/drawablePadding_2" android:background="@drawable/shape_dot" android:layerType="software"/>
总结:view的height一定要大于stroke的width