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() {
429429 * @param isSuccess 是否加载成功,将参数传递给回调{@link OnLoadingListener#onCompleted(boolean)} ()},
430430 */
431431 public void complete (boolean isSuccess ) {
432-
432+ stopLoading ();
433433 if (mEndDrawable != null ) {
434434 if (mShrinkAnimator .isRunning ())
435435 mShrinkAnimator .end ();
436- stopLoading ();
436+
437437 mEndDrawable .show (isSuccess );
438438 } else {
439439 //No EndDrawable,enableShrink
440440 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+ }
446448
449+ else {
450+ if (mOnLoadingListener != null ) {
451+ mOnLoadingListener .onCompleted (isSuccess );
452+ }
453+ }
447454 } else {
448455 //No EndDrawable,disableShrink
449- stopLoading ();
450456 if (mOnLoadingListener != null ) {
451457 mOnLoadingListener .onCompleted (isSuccess );
452458 }
453- toIde ();
459+
460+ if (enableRestore )
461+ toIde ();
454462 }
455463
456464
You can’t perform that action at this time.
0 commit comments