From 9fb7359a3ea1d52ab4d236f3557c13876a6e293f Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Thu, 11 Jun 2020 21:47:28 -0700 Subject: [PATCH] Use startAnimation() instead of setAnimation() --- .../com/limelight/grid/assets/CachedAppAssetLoader.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/limelight/grid/assets/CachedAppAssetLoader.java b/app/src/main/java/com/limelight/grid/assets/CachedAppAssetLoader.java index 53fbbe39..ea649fbc 100644 --- a/app/src/main/java/com/limelight/grid/assets/CachedAppAssetLoader.java +++ b/app/src/main/java/com/limelight/grid/assets/CachedAppAssetLoader.java @@ -198,7 +198,7 @@ public class CachedAppAssetLoader { LoaderTask task = new LoaderTask(imageView, prgView, false); AsyncDrawable asyncDrawable = new AsyncDrawable(imageView.getResources(), noAppImageBitmap, task); imageView.setImageDrawable(asyncDrawable); - imageView.setAnimation(AnimationUtils.loadAnimation(imageView.getContext(), R.anim.boxart_fadein)); + imageView.startAnimation(AnimationUtils.loadAnimation(imageView.getContext(), R.anim.boxart_fadein)); imageView.setVisibility(View.VISIBLE); task.executeOnExecutor(networkExecutor, tuple); } @@ -232,18 +232,18 @@ public class CachedAppAssetLoader { public void onAnimationEnd(Animation animation) { // Fade in the new box art imageView.setImageBitmap(bitmap.bitmap); - imageView.setAnimation(AnimationUtils.loadAnimation(imageView.getContext(), R.anim.boxart_fadein)); + imageView.startAnimation(AnimationUtils.loadAnimation(imageView.getContext(), R.anim.boxart_fadein)); } @Override public void onAnimationRepeat(Animation animation) {} }); - imageView.setAnimation(fadeOutAnimation); + imageView.startAnimation(fadeOutAnimation); } else { // View is invisible already, so just fade in the new art imageView.setImageBitmap(bitmap.bitmap); - imageView.setAnimation(AnimationUtils.loadAnimation(imageView.getContext(), R.anim.boxart_fadein)); + imageView.startAnimation(AnimationUtils.loadAnimation(imageView.getContext(), R.anim.boxart_fadein)); imageView.setVisibility(View.VISIBLE); } }