Created
September 29, 2017 06:41
-
-
Save vipulasri/cbfa0f131f659e9bdc7646f2c62fef02 to your computer and use it in GitHub Desktop.
Spectrum AVD
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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