Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 52a35433 authored by David Sobreira Marques's avatar David Sobreira Marques
Browse files

Fixing indeterminate progress bar animation state.



When showing a progress bar instance more than once
it will not animate after the first time.

Change-Id: I5104c551d561755005e533f2ab5257454567bf71
Signed-off-by: default avatarDavid Sobreira Marques <dpsmarques@gmail.com>
parent 69acb6b7
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -934,4 +934,20 @@ public class ProgressBar extends View {
        setProgress(ss.progress);
        setSecondaryProgress(ss.secondaryProgress);
    }

    @Override
    protected void onAttachedToWindow() {
        super.onAttachedToWindow();
        if (mIndeterminate) {
            startAnimation();
        }
    }

    @Override
    protected void onDetachedFromWindow() {
        super.onDetachedFromWindow();
        if (mIndeterminate) {
            stopAnimation();
        }
    }
}