progressbar add animatedimagedrawable support

This commit is contained in:
houzh 2023-09-21 19:03:07 +08:00
parent 30e98175b0
commit 3690137d1a
2 changed files with 4 additions and 0 deletions

View File

@ -15,6 +15,7 @@
#include <drawables/rotatedrawable.h>
#include <drawables/clipdrawable.h>
#include <drawables/animatedrotatedrawable.h>
#include <drawables/animatedimagedrawable.h>
#include <drawables/drawablecontainer.h>
#include <drawables/levellistdrawable.h>
#include <drawables/layerdrawable.h>

View File

@ -598,6 +598,9 @@ void ProgressBar::stopAnimation() {
if (dynamic_cast<AnimatedRotateDrawable*>(mIndeterminateDrawable)) {
((AnimatedRotateDrawable*) mIndeterminateDrawable)->stop();
mShouldStartAnimationDrawable = false;
}else if(dynamic_cast<AnimatedImageDrawable*>(mIndeterminateDrawable)){
((AnimatedImageDrawable*) mIndeterminateDrawable)->stop();
mShouldStartAnimationDrawable = false;
}
postInvalidate();
}