项目作者: shimaami

项目描述 :
Progress view with arc, line and circle shapes and gradient effect
高级语言: Java
项目地址: git://github.com/shimaami/AndroidProgressView.git
创建时间: 2018-09-15T14:57:01Z
项目社区:https://github.com/shimaami/AndroidProgressView

开源协议:

下载


AndroidProgressView

Progress view with arc, line and circle shapes and gradient effect

[New] Kotlin version

Check here

Attributes

Name Description Type Default Range
pvDirection Direction of the progress enum fromLeft (clockwise) fromLeft, fromRight
pvShape Shape of the progress view enum arc arc, circle, line
pvProgress Progress value float 0 0 to 1
pvBackgroundColor Progress background color color Color.BLACK -
pvProgressColor Progress color color Color.RED -
pvBackgroundWidth Progress background width dimension 2dp -
pvProgressWidth Progress width dimension 10dp -
pvAnimateDuration Animation duration integer 1500 -

Home To Install

  1. allprojects {
  2. repositories {
  3. ...
  4. jcenter()
  5. }
  6. }
  1. implementation 'com.shimaami.android:progressview:1.0.1'

If you have problems with appcompat use

  1. implementation ("com.shimaami.android:progressview:1.0") {
  2. exclude module: "appcompat-v7"
  3. }

Home To Use

XML

  1. <com.progress.progressview.ProgressView
  2. android:id="@+id/progressView"
  3. android:layout_width="wrap_content"
  4. android:layout_height="150dp"
  5. android:layout_gravity="center_horizontal"
  6. app:pvDirection="fromLeft"
  7. app:pvShape="arc"
  8. app:pvProgress="1" ></com.progress.progressview.ProgressView>

Apply gradient effect

  1. int[] colorList = new int[]{Color.GREEN, Color.YELLOW, Color.RED};
  2. mProgressView.applyGradient(colorList);