File tree Expand file tree Collapse file tree 1 file changed +17
-9
lines changed
Loadingbutton/src/main/java/com/flod/loadingbutton Expand file tree Collapse file tree 1 file changed +17
-9
lines changed Original file line number Diff line number Diff line change @@ -429,28 +429,36 @@ public void start() {
429
429
* @param isSuccess 是否加载成功,将参数传递给回调{@link OnLoadingListener#onCompleted(boolean)} ()},
430
430
*/
431
431
public void complete (boolean isSuccess ) {
432
-
432
+ stopLoading ();
433
433
if (mEndDrawable != null ) {
434
434
if (mShrinkAnimator .isRunning ())
435
435
mShrinkAnimator .end ();
436
- stopLoading ();
436
+
437
437
mEndDrawable .show (isSuccess );
438
438
} else {
439
439
//No EndDrawable,enableShrink
440
440
this .isFail = !isSuccess ;
441
- if (enableRestore ) {
442
- if (curStatus == STATUS .LOADING )
443
- beginShrink (true , false );
444
- else
445
- beginShrink (true , true );
441
+ if (enableShrink ) {
442
+ if (enableRestore )
443
+ if (curStatus == STATUS .LOADING ) {
444
+ beginShrink (true , false );
445
+ } else {
446
+ beginShrink (true , true );
447
+ }
446
448
449
+ else {
450
+ if (mOnLoadingListener != null ) {
451
+ mOnLoadingListener .onCompleted (isSuccess );
452
+ }
453
+ }
447
454
} else {
448
455
//No EndDrawable,disableShrink
449
- stopLoading ();
450
456
if (mOnLoadingListener != null ) {
451
457
mOnLoadingListener .onCompleted (isSuccess );
452
458
}
453
- toIde ();
459
+
460
+ if (enableRestore )
461
+ toIde ();
454
462
}
455
463
456
464
You can’t perform that action at this time.
0 commit comments