Code Monkey home page Code Monkey logo

circleprogressview-1's Introduction

CircleProgressView

Download Jitpack CI API License Blog QQGroup

CircleProgressView for Android 是一个圆形的进度动画控件,动画效果纵享丝滑。

Gif 展示

Image

CircleProgressView自定义属性说明(进度默认渐变色)

属性 值类型 默认值 说明
cpvStrokeWidth dimension 12dp 笔画描边的宽度
cpvNormalColor color #FFC8C8C8 圆正常颜色
cpvProgressColor color #FF4FEAAC 圆进度颜色
cpvStartAngle integer 270 开始角度,默认十二点钟方向
cpvSweepAngle integer 360 扫描角度范围
cpvMax integer 100 进度最大值
cpvProgress integer 0 当前进度
cpvDuration integer 500 动画时长
cpvLabelText string 中间的标签文本,默认自动显示百分比
cpvLabelTextColor color #FF333333 文本字体颜色
cpvLabelTextSize dimension 30sp 文本字体大小
cpvShowLabel boolean true 是否显示文本
cpvShowTick boolean true 是否显示外环刻度
cpvCirclePadding dimension 10dp 外圆环刻度与内圆环间距
cpvTickSplitAngle integer 5 刻度间隔的角度大小
cpvBlockAngle integer 1 刻度的角度大小

引入

Maven:

<dependency>
  <groupId>com.king.view</groupId>
  <artifactId>circleprogressview</artifactId>
  <version>1.0.0</version>
  <type>pom</type>
</dependency>

Gradle:

implementation 'com.king.view:circleprogressview:1.0.0'

Lvy:

<dependency org='com.king.view' name='circleprogressview' rev='1.0.0'>
  <artifact name='$AID' ext='pom'></artifact>
</dependency>
如果Gradle出现compile失败的情况,可以在Project的build.gradle里面添加如下:(也可以使用上面的GitPack来complie)
allprojects {
    repositories {
        maven { url 'https://dl.bintray.com/jenly/maven' }
    }
}

引入的库:

compileOnly 'com.android.support:appcompat-v7:28.0.0'

示例

布局示例

    <com.king.view.circleprogressview.CircleProgressView
        android:id="@+id/cpv"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"/>

代码示例

    //显示进度动画,进度,动画时长
    circleProgressView.showAnimation(80,3000);
    //设置当前进度
    circleProgressView.setProgress(80);

更多使用详情,请查看app中的源码使用示例

v1.0.0:2019-2-17

  • CircleProgressView初始版本

赞赏

如果您喜欢CircleProgressView,或感觉CircleProgressView帮助到了您,可以点右上角“Star”支持一下,您的支持就是我的动力,谢谢 😃

也可以扫描下面的二维码,请作者喝杯咖啡 ☕

关于我

Name: Jenly

Email: jenly1314#gmail.com / jenly1314#vip.qq.com

CSDN: jenly121

Github: jenly1314

加入QQ群: 20867961

circleprogressview-1's People

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.