Skip to content

About

a custom view for dash line with several colors

Topics

Resources

Stars

2 stars

Watchers

2 watching

Forks

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Android-DashLine

a custom view for dash line with several colors

It's easy to use.

in xml

<com.arjinmc.dashcolorline.DashLine
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:dashGap="6dp"
        app:dashWidth="50dp"
        app:orientation="horizontal"
        app:thickness="10dp" />

You can change your colors by edite DashLine.java

private int[] mColors = {Color.RED, Color.GREEN, Color.BLUE, Color.YELLOW};

or in Activity/Fragment/View

 ((DashLine) findViewById(R.id.dashline_h))
                .setColors(Color.GRAY, Color.parseColor("#23d290"));

You also can use setXXXX to change these attributes as above in the xml file.

If you set the dashGap to zero,you will see a solid line.

About

a custom view for dash line with several colors

Topics

Resources

Stars

2 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages