Skip to content

Commit 8335476

Browse files
committed
发布v1.2.0
1 parent 1291d19 commit 8335476

File tree

11 files changed

+155
-107
lines changed

11 files changed

+155
-107
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
## 版本日志
22

3+
#### v1.2.0 2025-2-7
4+
* 新增属性:`arcNormalStrokeWidth``arcProgressStrokeWidth`(废弃属性:`arcStrokeWidth`
5+
* 修复BUG:最大值多次动态变化后,会影响到进度拖动问题。([#14](https://github.com/jenly1314/ArcSeekBar/issues/14)
6+
* 优化细节
7+
38
#### v1.1.1:2024-7-17
49
* 优化细节
510

README.md

Lines changed: 51 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -34,46 +34,48 @@ ArcSeekBar for Android 是一个弧形的拖动条进度控件,配置参数完
3434
3535
2. 在Module的 **build.gradle** 里面添加引入依赖项
3636
```gradle
37-
implementation 'com.github.jenly1314:arcseekbar:1.1.1'
37+
implementation 'com.github.jenly1314:arcseekbar:1.2.0'
3838
```
3939

4040
## 使用
4141

4242
### ArcSeekBar自定义属性说明(进度默认为渐变色)
43-
| 属性 | 值类型 | 默认值 | 说明 |
44-
| :------| :------ |:-------------------------------------|:--------------------------------------------|
45-
| arcStrokeWidth | dimension | 12dp | 画笔描边的宽度 |
46-
| arcStrokeCap | enum | ROUND | 画笔的线冒样式 |
47-
| arcNormalColor | color | <font color=#C8C8C8>#FFC8C8C8</font> | 弧形正常颜色 |
48-
| arcProgressColor | color | <font color=#4FEAAC>#FF4FEAAC</font> | 弧形进度颜色 |
49-
| arcStartAngle | integer | 270 | 开始角度,默认十二点钟方向 |
50-
| arcSweepAngle | integer | 360 | 扫描角度范围 |
51-
| arcMax | integer | 100 | 进度最大值 |
52-
| arcProgress | integer | 0 | 当前进度 |
53-
| arcDuration | integer | 500 | 动画时长 |
54-
| arcLabelText | string | | 中间的标签文本,默认自动显示百分比 |
55-
| arcLabelTextColor | color | <font color=#333333>#FF333333</font> | 文本字体颜色 |
56-
| arcLabelTextSize | dimension | 30sp | 文本字体大小 |
57-
| arcLabelPaddingTop | dimension | 0dp | 文本居顶边内间距 |
58-
| arcLabelPaddingBottom | dimension | 0dp | 文本居底边内间距 |
59-
| arcLabelPaddingLeft | dimension | 0dp | 文本居左边内间距 |
60-
| arcLabelPaddingRight | dimension | 0dp | 文本居右边内间距 |
61-
| arcShowLabel | boolean | true | 是否显示文本 |
62-
| arcShowTick | boolean | true | 是否显示环刻度 |
63-
| arcTickStrokeWidth | dimension | 10dp | 刻度画笔宽度 |
64-
| arcTickPadding | dimension | 2dp | 环刻度与环间距 |
65-
| arcTickSplitAngle | integer | 5 | 刻度间隔的角度大小 |
66-
| arcBlockAngle | integer | 1 | 刻度的角度大小 |
67-
| arcTickOffsetAngle | integer | 0 | 刻度偏移的角度大小 |
68-
| arcThumbStrokeWidth | dimension | 10dp | 拖动按钮画笔宽度 |
69-
| arcThumbColor | color | <font color=#E8D30F>#FFE8D30F</font> | 拖动按钮颜色 |
70-
| arcThumbRadius | dimension | 8dp | 拖动按钮半径 |
71-
| arcThumbRadiusEnlarges | dimension | 2dp | 触摸时按钮半径放大量 |
72-
| arcShowThumb | boolean | true | 是否显示拖动按钮 |
73-
| arcThumbDrawable | reference | | 拖动按钮图片(arcThumbDrawable的优先级高于arcThumbColor) |
74-
| arcAllowableOffsets | dimension | 10dp | 触摸时可偏移距离:偏移量越大,触摸精度越小 |
75-
| arcEnabledDrag | boolean | true | 是否启用通过拖动改变进度 |
76-
| arcEnabledSingle | boolean | true | 是否启用通过点击改变进度 |
43+
| 属性 | 值类型 | 默认值 | 说明 |
44+
|:-----------------------| :------ |:-------------------------------------|:---------------------------------------------------------------|
45+
| ~~arcStrokeWidth~~ | dimension | 12dp | 画笔描边的宽度(已废弃,改用`arcNormalStrokeWidth``arcProgressStrokeWidth`|
46+
| arcNormalStrokeWidth | dimension | 12dp | 弧形正常画笔描边的宽度(v1.2.0新增) |
47+
| arcProgressStrokeWidth | dimension | 12dp | 弧形进度条画笔描边的宽度(v1.2.0新增) |
48+
| arcStrokeCap | enum | ROUND | 画笔的线冒样式 |
49+
| arcNormalColor | color | <font color=#C8C8C8>#FFC8C8C8</font> | 弧形正常颜色 |
50+
| arcProgressColor | color | <font color=#4FEAAC>#FF4FEAAC</font> | 弧形进度颜色 |
51+
| arcStartAngle | integer | 270 | 开始角度,默认十二点钟方向 |
52+
| arcSweepAngle | integer | 360 | 扫描角度范围 |
53+
| arcMax | integer | 100 | 进度最大值 |
54+
| arcProgress | integer | 0 | 当前进度 |
55+
| arcDuration | integer | 500 | 动画时长 |
56+
| arcLabelText | string | | 中间的标签文本,默认自动显示百分比 |
57+
| arcLabelTextColor | color | <font color=#333333>#FF333333</font> | 文本字体颜色 |
58+
| arcLabelTextSize | dimension | 30sp | 文本字体大小 |
59+
| arcLabelPaddingTop | dimension | 0dp | 文本居顶边内间距 |
60+
| arcLabelPaddingBottom | dimension | 0dp | 文本居底边内间距 |
61+
| arcLabelPaddingLeft | dimension | 0dp | 文本居左边内间距 |
62+
| arcLabelPaddingRight | dimension | 0dp | 文本居右边内间距 |
63+
| arcShowLabel | boolean | true | 是否显示文本 |
64+
| arcShowTick | boolean | true | 是否显示环刻度 |
65+
| arcTickStrokeWidth | dimension | 10dp | 刻度画笔宽度 |
66+
| arcTickPadding | dimension | 2dp | 环刻度与环间距 |
67+
| arcTickSplitAngle | integer | 5 | 刻度间隔的角度大小 |
68+
| arcBlockAngle | integer | 1 | 刻度的角度大小 |
69+
| arcTickOffsetAngle | integer | 0 | 刻度偏移的角度大小 |
70+
| arcThumbStrokeWidth | dimension | 10dp | 拖动按钮画笔宽度 |
71+
| arcThumbColor | color | <font color=#E8D30F>#FFE8D30F</font> | 拖动按钮颜色 |
72+
| arcThumbRadius | dimension | 8dp | 拖动按钮半径 |
73+
| arcThumbRadiusEnlarges | dimension | 2dp | 触摸时按钮半径放大量 |
74+
| arcShowThumb | boolean | true | 是否显示拖动按钮 |
75+
| arcThumbDrawable | reference | | 拖动按钮图片(arcThumbDrawable的优先级高于arcThumbColor) |
76+
| arcAllowableOffsets | dimension | 10dp | 触摸时可偏移距离:偏移量越大,触摸精度越小 |
77+
| arcEnabledDrag | boolean | true | 是否启用通过拖动改变进度 |
78+
| arcEnabledSingle | boolean | true | 是否启用通过点击改变进度 |
7779

7880

7981
### 示例
@@ -89,26 +91,36 @@ ArcSeekBar for Android 是一个弧形的拖动条进度控件,配置参数完
8991

9092
代码示例
9193
```Java
92-
//进度改变监听
94+
// 进度改变监听
9395
arcSeekBar.setOnChangeListener(listener);
94-
//设置进度
96+
97+
// 设置进度颜色;传多个颜色时则表示为渐变色(设置渐变色时尽量保证首尾同色)
98+
arcSeekBar.setProgressColor(color);
99+
100+
// 设置进度
95101
arcSeekBar.setProgress(progress);
96-
//显示进度动画(进度,动画时长)
102+
103+
// 显示进度动画(进度,动画时长)
97104
arcSeekBar.showAnimation(80,3000);
98105

106+
99107
```
100108
更多使用详情,请查看[app](app)中的源码使用示例或直接查看 [API帮助文档](https://jenly1314.github.io/ArcSeekBar/api/)
101109

102110
## 相关推荐
103111

104112
- [CircleProgressView](https://github.com/jenly1314/CircleProgressView) 一个圆形的进度动画控件,动画效果纵享丝滑。
113+
- [SpinCounterView](https://github.com/jenly1314/SpinCounterView) 一个类似码表变化的旋转计数器动画控件。
114+
- [RadarView](https://github.com/jenly1314/RadarView) 一个雷达扫描动画后,然后展示得分效果的控件。
105115

106116
<!-- end -->
107117

108118
## 版本日志
109119

110-
#### 待发布版本([提前体验](test.md)
120+
#### v1.2.0 2025-2-7
121+
* 新增属性:`arcNormalStrokeWidth``arcProgressStrokeWidth`(废弃属性:`arcStrokeWidth`
111122
* 修复BUG:最大值多次动态变化后,会影响到进度拖动问题。([#14](https://github.com/jenly1314/ArcSeekBar/issues/14)
123+
* 优化细节
112124

113125
#### [查看更多版本日志](CHANGELOG.md)
114126

app/release/app-release.apk

548 KB
Binary file not shown.

app/release/output-metadata.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
"type": "SINGLE",
1212
"filters": [],
1313
"attributes": [],
14-
"versionCode": 5,
15-
"versionName": "1.1.0",
14+
"versionCode": 7,
15+
"versionName": "1.2.0",
1616
"outputFile": "app-release.apk"
1717
}
1818
],

app/src/main/java/com/king/view/arcseekbar/app/MainActivity.java

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
package com.king.view.arcseekbar.app;
22

3-
import androidx.appcompat.app.AppCompatActivity;
4-
import androidx.core.content.ContextCompat;
5-
6-
import android.graphics.Color;
73
import android.os.Bundle;
8-
import android.util.Log;
94
import android.view.View;
105
import android.widget.CheckBox;
116
import android.widget.CompoundButton;
127

13-
import com.king.view.arcseekbar.ArcSeekBar;
8+
import androidx.appcompat.app.AppCompatActivity;
149

10+
import com.king.view.arcseekbar.ArcSeekBar;
1511

12+
/**
13+
* 示例
14+
*
15+
* @author <a href="mailto:[email protected]">Jenly</a>
16+
* <p>
17+
* <a href="https://github.com/jenly1314">Follow me</a>
18+
*/
1619
public class MainActivity extends AppCompatActivity {
1720

1821
ArcSeekBar arcSeekBar1;
@@ -38,13 +41,13 @@ public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
3841
}
3942

4043

41-
public void onClick(View v){
42-
switch (v.getId()){
44+
public void onClick(View v) {
45+
switch (v.getId()) {
4346
case R.id.btn1:
44-
arcSeekBar2.showAnimation(arcSeekBar2.getProgress() == 100 ? 0 :arcSeekBar2.getProgress(),100,3000);
47+
arcSeekBar2.showAnimation(arcSeekBar2.getProgress() == 100 ? 0 : arcSeekBar2.getProgress(), 100, 3000);
4548
break;
4649
case R.id.btn2:
47-
arcSeekBar2.showAnimation(arcSeekBar2.getProgress() == 0 ? 100 :arcSeekBar2.getProgress(),0,3000);
50+
arcSeekBar2.showAnimation(arcSeekBar2.getProgress() == 0 ? 100 : arcSeekBar2.getProgress(), 0, 3000);
4851
break;
4952
}
5053
}

app/src/main/res/layout/activity_main.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,16 @@
1616
app:arcLabelPaddingBottom="10dp"
1717
app:arcTickOffsetAngle="3"
1818
app:arcThumbDrawable="@drawable/ic_dog"
19+
app:arcNormalStrokeWidth="8dp"
20+
app:arcProgressStrokeWidth="12dp"
1921
app:layout_constraintLeft_toLeftOf="parent"
2022
app:layout_constraintRight_toRightOf="parent"
2123
app:layout_constraintTop_toTopOf="parent" />
2224
<com.king.view.arcseekbar.ArcSeekBar
2325
android:id="@+id/arcSeekBar2"
2426
android:layout_width="wrap_content"
2527
android:layout_height="wrap_content"
28+
android:layout_marginTop="10dp"
2629
app:arcEnabledDrag="false"
2730
app:arcEnabledSingle="false"
2831
app:arcShowThumb="false"

0 commit comments

Comments
 (0)