android-process-button
android-process-button copied to clipboard
Action Process Button will show loading progress animation only on first time
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());
}