Android Draw Vertical Dashed line

Source: Internet
Author: User
Tags dashed line

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.