# SectorProgressView
**Repository Path**: HarmonyOS-tpc/SectorProgressView
## Basic Information
- **Project Name**: SectorProgressView
- **Description**: a simple progress prompt or chart widget of android using circle and a sector
- **Primary Language**: Unknown
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 1
- **Forks**: 0
- **Created**: 2021-04-01
- **Last Updated**: 2024-11-22
## Categories & Tags
**Categories**: harmonyos-progress
**Tags**: None
## README
该三方开源库从github fork过来
fork地址:https://github.com/timqi/SectorProgressView
fork版本号/日期:0.9.9 / 2021/2/7
SectorProgressView
==================
效果展示
添加库的依赖
方式一: 添加har包到lib文件夹内 在entry的gradle内添加如下代码 implementation fileTree(dir: 'libs', include: ['.jar', '.har'])
方式二: allprojects { repositories{ mavenCentral() } } implementation 'io.openharmony.tpc.thirdlib:SectorProgressView:1.0.0'
How to use:
===========
## The ColorfulRingProgressView
- Define views in xml
```xml
```
- parameters description

- You can custom view using java code
```java
crpv = (ColorfulRingProgressView) findViewById(R.id.crpv);
crpv.setPercent(75);
crpv.setStartAngle(0);
crpv.setBgColor(0xffe1e1e1);
crpv.setFgColorStart(0xffffe400);
crpv.setFgColorEnd(0xffff4800);
crpv.setStrokeWidthDp(21);
```
## The SectorProgressView
- Define views in xml
```xml
```
- You can custom view using java code
```java
spv = (SectorProgressView) findViewById(R.id.spv);
spv.setPercent(25);
spv.setStartAngle(0);
spv.setBgColor(0xffe5e5e5);
spv.setFgColor(0xffff765c);
```
## Indeterminate status
This library add a API for indeterminate status of SectorProgressView and ColorfulRingProgressView. Config your angle or percent params and invoke animateIndeterminate
```java
animateIndeterminate()
// if you want custom the duration or TimeInterpolator
animateIndeterminate(int durationOneCircle, TimeInterpolator interpolator)
// to stop animate
stopAnimateIndeterminate()
```
download demo apk to have a taste.
Integration
============
- Using gradle. Add the dependency in your app.gradle
```
Author
========
License
=======
Copyright 2017 Tim Qi
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```