Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Commit 768ecbc

Browse files
committed
fix bug color of RotateLoading
1 parent 8a54520 commit 768ecbc

4 files changed

Lines changed: 8 additions & 6 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Usage
2323
gradle
2424

2525
```
26-
compile 'com.victor:lib:1.0.0'
26+
compile 'com.victor:lib:1.0.1'
2727
```
2828

2929

example/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ android {
2222
dependencies {
2323
compile fileTree(dir: 'libs', include: ['*.jar'])
2424
compile project(':lib')
25-
compile 'com.android.support:support-v4:22.2.1'
25+
compile 'com.android.support:support-v4:23.0.1'
2626
}

lib/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ android {
99
minSdkVersion 11
1010
targetSdkVersion 22
1111
versionCode 1
12-
versionName "1.0.0"
12+
versionName "1.0.1"
1313
}
1414
buildTypes {
1515
release {
@@ -23,4 +23,4 @@ dependencies {
2323
compile fileTree(dir: 'libs', include: ['*.jar'])
2424
}
2525

26-
//apply from: "../bintrayUpload.gradle"
26+
apply from: "../bintrayUpload.gradle"

lib/src/main/java/com/victor/loading/rotate/RotateLoading.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ public class RotateLoading extends View {
4343

4444
private boolean isStart = false;
4545

46+
private int color;
47+
4648
public RotateLoading(Context context) {
4749
super(context);
4850
initView(context, null);
@@ -59,7 +61,7 @@ public RotateLoading(Context context, AttributeSet attrs, int defStyleAttr) {
5961
}
6062

6163
private void initView(Context context, AttributeSet attrs) {
62-
int color = Color.WHITE;
64+
color = Color.WHITE;
6365
width = dpToPx(context, DEFAULT_WIDTH);
6466
shadowPosition = dpToPx(getContext(), DEFAULT_SHADOW_POSITION);
6567

@@ -102,7 +104,7 @@ protected void onDraw(Canvas canvas) {
102104
canvas.drawArc(shadowRectF, topDegree, arc, false, mPaint);
103105
canvas.drawArc(shadowRectF, bottomDegree, arc, false, mPaint);
104106

105-
mPaint.setColor(Color.WHITE);
107+
mPaint.setColor(color);
106108
canvas.drawArc(loadingRectF, topDegree, arc, false, mPaint);
107109
canvas.drawArc(loadingRectF, bottomDegree, arc, false, mPaint);
108110

0 commit comments

Comments
 (0)