1 Star 0 Fork 11

rohit / CircleProgressView

forked from Jenly / CircleProgressView 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

CircleProgressView

Download JCenter JitPack CI CircleCI API License Blog QQGroup

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

CircleProgressView 不能满足你的需求?

也许你想要的是 ArcSeekBar

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 刻度的角度大小
cpvTurn boolean false 是否旋转
cpvCapRound boolean true 是否是圆形线冒(圆角弧度)
cpvLabelPaddingLeft dimension 0dp 文本居左边内间距
cpvLabelPaddingTop dimension 0dp 文本居顶边内间距
cpvLabelPaddingRight dimension 0dp 文本居右边内间距
cpvLabelPaddingBottom dimension 0dp 文本居底边内间距

引入

Maven:

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

Gradle:

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

Lvy:

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

示例

布局示例

    <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);
    //设置进度改变监听
    circleProgressView.setOnChangeListener(onChangeListener);   

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

版本记录

v1.1.2:2020-12-2

  • 优化设置渐变色过程处理

v1.1.1:2020-4-2

  • 新增cpvLabelPadding..相关属性

v1.1.0:2019-8-19

  • 移除appcompat依赖

v1.0.1:2019-5-23

  • 新增cpvTurn属性(是否旋转)

v1.0.0:2019-2-17

  • CircleProgressView初始版本

赞赏

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

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

关于我

Name: Jenly

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

CSDN: jenly121

CNBlogs: jenly

GitHub: jenly1314

Gitee: jenly1314

加入QQ群: 20867961

The MIT License (MIT) Copyright (c) 2017 Jenly Yu Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

CircleProgressView是一个圆形渐变的进度动画控件,动画效果纵享丝滑。 展开 收起
Android
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Android
1
https://gitee.com/rohity/CircleProgressView.git
git@gitee.com:rohity/CircleProgressView.git
rohity
CircleProgressView
CircleProgressView
master

搜索帮助