mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-26 22:43:05 +00:00
Use startAnimation() instead of setAnimation()
This commit is contained in:
parent
4a5de26406
commit
9fb7359a3e
@ -198,7 +198,7 @@ public class CachedAppAssetLoader {
|
|||||||
LoaderTask task = new LoaderTask(imageView, prgView, false);
|
LoaderTask task = new LoaderTask(imageView, prgView, false);
|
||||||
AsyncDrawable asyncDrawable = new AsyncDrawable(imageView.getResources(), noAppImageBitmap, task);
|
AsyncDrawable asyncDrawable = new AsyncDrawable(imageView.getResources(), noAppImageBitmap, task);
|
||||||
imageView.setImageDrawable(asyncDrawable);
|
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);
|
imageView.setVisibility(View.VISIBLE);
|
||||||
task.executeOnExecutor(networkExecutor, tuple);
|
task.executeOnExecutor(networkExecutor, tuple);
|
||||||
}
|
}
|
||||||
@ -232,18 +232,18 @@ public class CachedAppAssetLoader {
|
|||||||
public void onAnimationEnd(Animation animation) {
|
public void onAnimationEnd(Animation animation) {
|
||||||
// Fade in the new box art
|
// Fade in the new box art
|
||||||
imageView.setImageBitmap(bitmap.bitmap);
|
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
|
@Override
|
||||||
public void onAnimationRepeat(Animation animation) {}
|
public void onAnimationRepeat(Animation animation) {}
|
||||||
});
|
});
|
||||||
imageView.setAnimation(fadeOutAnimation);
|
imageView.startAnimation(fadeOutAnimation);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// View is invisible already, so just fade in the new art
|
// View is invisible already, so just fade in the new art
|
||||||
imageView.setImageBitmap(bitmap.bitmap);
|
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);
|
imageView.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user