Skip to content

Commit 002aa97

Browse files
committed
1、修复一个5.0以下Drawable位移错误的问题
2、修复cancel后Loading没有结束的问题 3、修复错误使用硬件加速的问题
1 parent 35fad62 commit 002aa97

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

Loadingbutton/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ android {
77
defaultConfig {
88
minSdkVersion 17
99
targetSdkVersion 28
10-
versionCode 104
11-
versionName "1.0.4"
10+
versionCode 105
11+
versionName "1.0.5"
1212
}
1313

1414
buildTypes {
@@ -24,7 +24,7 @@ dependencies {
2424
implementation fileTree(dir: 'libs', include: ['*.jar'])
2525

2626
compileOnly 'androidx.appcompat:appcompat:1.1.0'
27-
api 'com.github.FlodCoding:DrawableTextView:1.0.2'
27+
api 'com.github.FlodCoding:DrawableTextView:1.0.3'
2828

2929

3030

Loadingbutton/src/main/java/com/flod/loadingbutton/LoadingButton.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ public void onAnimationEnd(Animator animation) {
217217
/**
218218
* 开始收缩或恢复
219219
*
220-
* @param isReverse true:恢复false:收缩
220+
* @param isReverse true:恢复,且开始时停止Loading false:收缩,且结束时开始Loading
221221
* @param lastFrame 是否只显示最后一帧
222222
*/
223223
private void beginChangeSize(boolean isReverse, boolean lastFrame) {
@@ -355,6 +355,7 @@ private void cancelAllRunning(boolean withAnim) {
355355
if (enableShrink) {
356356
beginChangeSize(true, !withAnim);
357357
} else {
358+
stopLoading();
358359
toIde();
359360
}
360361
break;
@@ -730,7 +731,6 @@ private EndDrawable(@DrawableRes int completeResId, @DrawableRes int failResId)
730731
}
731732

732733
private void init() {
733-
setLayerType(LAYER_TYPE_HARDWARE, null);
734734
mPaint = new Paint(Paint.ANTI_ALIAS_FLAG | Paint.FILTER_BITMAP_FLAG);
735735
mCirclePath = new Path();
736736
mAppearAnimator = ObjectAnimator.ofFloat(this, "animValue", 1.0f);

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@
2323

2424
dependencies {
2525
//Androidx
26-
implementation 'com.github.FlodCoding:LoadingButton:1.0.4'
26+
implementation 'com.github.FlodCoding:LoadingButton:1.0.5'
2727

2828
//Support-appcompat
29-
implementation 'com.github.FlodCoding:LoadingButton:1.0.4-support'
29+
implementation 'com.github.FlodCoding:LoadingButton:1.0.5-support'
3030
}
3131

3232

app/build.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@ android {
44
compileSdkVersion 28
55
defaultConfig {
66
applicationId "com.flod.loadingbutton.app"
7-
minSdkVersion 19
7+
minSdkVersion 17
88
targetSdkVersion 28
99
versionCode 100
1010
versionName "1.0.0"
11-
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1211
}
1312
buildTypes {
1413
release {

0 commit comments

Comments
 (0)