Reference: http://blog.csdn.net/zhao2017/article/details/73866460
1. It's easier to write a dashed line in Android, but it's a little more troublesome to write a dashed line:
The write dashed line needs to be rotated:
The rotation angle is set from 90 to 90.
<RotateXmlns:android="Http://schemas.android.com/apk/res/android"android:fromdegrees="90"android:todegrees=">"<ShapeAndroid:shape= "line" > <stroke android:width=" 1DP "android:color= "#ebebeb" android:dashgap= "1DP" android:dashwidth= "2DP"/> <size android:width= "200DP" android:height=" 3DP "></ size> </shape> </ROTATE>
The width of the view can then be set to a large extent, so that the surrounding view will not affect its display.
The vertical dashed line is used in the actual place.
<view android:id=" @+id/view "android:layout_width=" 100DP "android:layertype= "Software" Android:layout_height= "match_parent" android:layout_ Marginleft= " -40DP" android:layout_marginright= " -10DP" android:layout_torightof= "@id/tv_ Number "android:background=" @drawable/main_red_pck_dash_ Line "> </VIEW>
Android Draw Vertical Dashed line