-  - The Android Arsenal – Views

As you might have guessed it’s a line and it’s dotted.

-  - The Android Arsenal – Views

Import

Sptep 1. Add jitpack to your root build.gradle:

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}

Step 2. Add the dependency:

dependencies {
    implementation 'com.github.ghedeon:dottedLineView:1.0.0'
}

Usage

XML:
<com.ghedeon.dottedlineview.DottedLineView
        :layout_width="12dp"
        android:layout_height="match_parent"
        app:radius="4dp"
        app:minGap="8dp"
        app:color="@color/colorAccent" />
Programmatically:
with(dotted_line as DottedLineView) {
            color = Color.BLACK
            radius = 16f
            gap = 16f
        }
Supported attributes:
attr description
radius dot radius
minGap gap between dots
color dots color



Source link

LEAVE A REPLY

Please enter your comment!
Please enter your name here