Skip to content

⭕A progress view that you can use it when you are loading picture.

License

Notifications You must be signed in to change notification settings

samlss/DonutProgressView

Repository files navigation

DonutProgressView

A progress view that you can use it when you are loading picture(一个简洁的进度view).

Api reqeust MIT Licence Blog


DonutProgressView



中文

使用

在根目录的build.gradle添加这一句代码:

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

在app目录下的build.gradle添加依赖使用:

dependencies {
    implementation 'com.github.samlss:DonutProgressView:1.0'
}

布局中使用:

<com.iigo.library.DonutProgressView
        android:id="@+id/dpv_loading"
        app:progress="0"
        app:progressColor="@android:color/white"
        android:layout_centerInParent="true"
        android:layout_width="50dp"
        android:layout_height="50dp" />

代码中使用:

    donutProgressView.setProgress(progress); //设置进度
    donutProgressView.setColor(Color.RED); //设置进度颜色

属性说明:

属性 说明
progressColor 进度颜色
progress 进度大小,0-100

English

Use

Add it in your root build.gradle at the end of repositories:

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

Add it in your app build.gradle at the end of repositories:

dependencies {
    implementation 'com.github.samlss:DonutProgressView:1.0'
}

in layout.xml:

<com.iigo.library.DonutProgressView
        android:id="@+id/dpv_loading"
        app:progress="0"
        app:progressColor="@android:color/white"
        android:layout_centerInParent="true"
        android:layout_width="50dp"
        android:layout_height="50dp" />

in java code:

 donutProgressView.setProgress(progress); //set progress
 donutProgressView.setColor(Color.RED); //set the progress color

Attributes description:

attr description
progressColor the progress color
progress the progress, [0 -100]

About

⭕A progress view that you can use it when you are loading picture.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages