Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

lixuegithub/DashView

Open more actions menu
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DashView

###一个在Android上实现绘制虚线的控件,可以指定虚线的样式以及方向

##效果图

###水平虚线

img

###竖直虚线

img

#引入

dependencies {
    compile 'com.fang:dashview:v1.0.0'
}

##使用

 <com.fang.dashview.DashView
        android:layout_marginLeft="40dp"
        android:layout_width="wrap_content"
        android:layout_height="300dp"
        app:dashWidth="2dp"
        app:lineWidth="4dp"
        app:lineColor="@android:color/holo_green_light"
        app:dashOrientation="1"
        app:lineHeight="1dp"
        />

###属性介绍

dashWidth:两段线段之间的间距
lineWidth:每条线段宽度
lineColor:线段颜色
dashOrientation:虚线方向 0水平1竖直
lineHeight:线段高度

##注意事项 当设定虚线的方向时,对应方向的wrap_content显示效果为match_parent,因为在实际情况中,虚线的尺寸总是固定的数值。

About

一个在Android上实现绘制虚线的控件,可以指定虚线的样式和方向

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Java 100.0%
Morty Proxy This is a proxified and sanitized view of the page, visit original site.