# RingStatisticsView
**Repository Path**: GodHai/RingStatisticsView
## Basic Information
- **Project Name**: RingStatisticsView
- **Description**: No description available
- **Primary Language**: Unknown
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2021-02-18
- **Last Updated**: 2021-02-18
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# RingStatisticsView
### 环形百分比统计图,不多说先上图


# gradle
```
compile 'com.ebanswers:ringstatisticsview:1.0'
```
# 使用
```
//在布局中
//在Activity中
RingStatisticsView ringStatisticsView = (RingStatisticsView) findViewById(R.id.id_rsv);
ringStatisticsView.setPercentAndColors(new float[]{0.2f,0.2f,0.3f,0.3f},new int[]{Color.parseColor("#F9AA28"),Color.parseColor("#009752"), Color.parseColor("#2EC1FB"), Color.parseColor("#FA6723")});
ringStatisticsView.refresh();
```
# 自定义属性说明
```
//设置环形宽度
//设置中间标题文字
//设置中间数字
//设置中间标题文字颜色
//设置中间数字颜色
//设置中间文字尺寸
//设置中间数字尺寸
//设置百分比文字尺寸
```
# 代码中动态设置属性
```
public void setRingWidth(float ringWindth) {
mRingWidth = ringWindth;
}
public void setCenterText(String text) {
mstr_total_text = text;
}
public void setCenterNumber(String number) {
mstr_total_number = number;
}
public void setCenterTextColor(int color) {
mTextColor1 = color;
}
public void setCenterNumberColor(int color) {
mTextColor2 = color;
}
public void setCenterTextSize(int size) {
textSize1 = size;
}
public void setCenterNumberSize(int size) {
textSize2 = size;
}
public void setPercentTextSize(int size) {
textSize3 = size;
}
public void refresh() {
postInvalidate();
}
```