Closed mauriciogior closed 7 years ago
Maybe your emulator not support AnimationDrawable well, the default animation just defined in the xml spinner
@mauriciogior the compileSdkVersion that you are using is lower 23 ?
@dinuscxj I'm using 24.
@mauriciogior 👌!
@mauriciogior I get it. the line 65 ~ 66 of the RefreshView need to reverse the order. The refreshing animation is always static, because the AnimationDrawable is not yet fully attached to the window. if you want to learn more, you can click the link
change the following code
@Override
public void refreshing() {
clearAnimation();
AnimationDrawable drawable = (AnimationDrawable) getResources().getDrawable(R.drawable.spinner);
drawable.start();
this.setImageDrawable(drawable);
}
to
@Override
public void refreshing() {
clearAnimation();
AnimationDrawable drawable = (AnimationDrawable) getResources().getDrawable(R.drawable.spinner);
this.setImageDrawable(drawable);
drawable.start();
}
The refreshing animation is always static. Here is an example:
Ps: only happens on emulator.