android-process-button icon indicating copy to clipboard operation
android-process-button copied to clipboard

Action Process Button will show loading progress animation only on first time

Open Badranh opened this issue 7 years ago • 0 comments

The button loading animation will work for only one click , I think we should add mProgress = 0;

  public void start(final ProcessButton button) {
        final Handler handler = new Handler();
        handler.postDelayed(new Runnable() {
            @Override
            public void run() {
                mProgress += 10;
                button.setProgress(mProgress);
                if (mProgress < 100) {
                    handler.postDelayed(this, generateDelay());
                } else {
                    mListener.onComplete();
                    mProgress = 0;
                }
            }
        }, generateDelay());
    }

Badranh avatar Jul 30 '18 09:07 Badranh