Skip to content

Commit d16c29d

Browse files
version 1.10.0
1 parent f22ad2f commit d16c29d

File tree

5 files changed

+18
-6
lines changed

5 files changed

+18
-6
lines changed

app/src/main/java/br/com/simplepass/loadingbutton/MainActivity.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,11 @@ class MainActivity : AppCompatActivity() {
7878
bitmap)
7979
}
8080

81-
val runnableRevert = { circularProgressButton.revertAnimation { circularProgressButton.text = "Seu texto aqui!" } }
81+
val runnableRevert = { circularProgressButton.revertAnimation {
82+
circularProgressButton.text = "Seu texto aqui!"
83+
circularProgressButton.setSpinningBarColor(Color.MAGENTA)
84+
}
85+
}
8286

8387
circularProgressButton.revertAnimation()
8488

loading-button-android/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ apply plugin: 'com.jfrog.bintray'
44
apply plugin: 'com.github.dcendents.android-maven'
55

66
//Bintray depends on this global variable to set the library version!
7-
version = '1.9.0'
7+
version = '1.10.0'
88
group = 'br.com.simplepass'
99

1010
android {
@@ -15,7 +15,7 @@ android {
1515
minSdkVersion 17
1616
targetSdkVersion 26
1717
versionCode 6
18-
versionName "1.9.0"
18+
versionName "1.10.0"
1919
}
2020
buildTypes {
2121
release {
@@ -70,7 +70,7 @@ install {
7070
packaging 'aar'
7171
groupId 'br.com.simplepass'
7272
artifactId 'loading-button-android'
73-
version '1.9.0'
73+
version '1.10.0'
7474

7575
licenses {
7676
license {

loading-button-android/src/main/java/br/com/simplepass/loading_button_lib/animatedDrawables/CircularAnimatedDrawable.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,8 @@
1212
import android.graphics.RectF;
1313
import android.graphics.drawable.Animatable;
1414
import android.graphics.drawable.Drawable;
15-
import android.util.Log;
1615
import android.view.View;
1716
import android.view.animation.AccelerateDecelerateInterpolator;
18-
import android.view.animation.DecelerateInterpolator;
1917
import android.view.animation.Interpolator;
2018
import android.view.animation.LinearInterpolator;
2119

@@ -77,7 +75,10 @@ protected void onBoundsChange(Rect bounds) {
7775
fBounds.right = bounds.right - mBorderWidth / 2f - .5f;
7876
fBounds.top = bounds.top + mBorderWidth / 2f + .5f;
7977
fBounds.bottom = bounds.bottom - mBorderWidth / 2f - .5f;
78+
}
8079

80+
public void setLoadingBarColor(int color) {
81+
mPaint.setColor(color);
8182
}
8283

8384
/**

loading-button-android/src/main/java/br/com/simplepass/loading_button_lib/customViews/CircularProgressButton.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,9 @@ private void loadGradientDrawable(Drawable drawable) {
182182
@Override
183183
public void setSpinningBarColor(int color) {
184184
mParams.mSpinningBarColor = color;
185+
if (mAnimatedDrawable != null) {
186+
mAnimatedDrawable.setLoadingBarColor(color);
187+
}
185188
}
186189

187190
@Override
@@ -262,6 +265,7 @@ private void drawIndeterminateProgress(Canvas canvas) {
262265
}
263266
}
264267

268+
265269
/**
266270
* Stops the animation and sets the button in the STOPED state.
267271
*/

loading-button-android/src/main/java/br/com/simplepass/loading_button_lib/customViews/CircularProgressImageButton.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,9 @@ public void setBackgroundResource (@ColorRes int resid) {
176176
@Override
177177
public void setSpinningBarColor(int color) {
178178
mParams.mSpinningBarColor = color;
179+
if (mAnimatedDrawable != null) {
180+
mAnimatedDrawable.setLoadingBarColor(color);
181+
}
179182
}
180183

181184
@Override

0 commit comments

Comments
 (0)