Skip to content

Instantly share code, notes, and snippets.

@vipulasri
Created September 29, 2017 06:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vipulasri/cbfa0f131f659e9bdc7646f2c62fef02 to your computer and use it in GitHub Desktop.
Save vipulasri/cbfa0f131f659e9bdc7646f2c62fef02 to your computer and use it in GitHub Desktop.
Spectrum AVD
@BindView(R.id.image_progress)
AppCompatImageView mLoadingProgress;
private AnimatedVectorDrawableCompat mAVD = AnimatedVectorDrawableCompat.create(getContext(), R.drawable.avd_spectrum_logo);
if (mLoadingProgress != null && mAVD != null) {
mLoadingProgress.setImageDrawable(mAVD);
mAVD.start();
mAVD.registerAnimationCallback(new Animatable2Compat.AnimationCallback() {
@Override
public void onAnimationEnd(Drawable drawable) {
//super.onAnimationEnd(drawable);
mLoadingProgress.post(new Runnable() {
@Override
public void run() {
mAVD.start();
}
});
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment