@Override
public void onBitmapLoaded(Bitmap bitmap, Picasso.LoadedFrom from) {
final Drawable resultDrawable;
if (from == Picasso.LoadedFrom.MEMORY) {
resultDrawable = new BitmapDrawable(getResources(), bitmap);
} else {
TransitionDrawable transitionDrawable = new TransitionDrawable(
new Drawable[]{iconDrawable, new BitmapDrawable(getResources(), bitmap)});
transitionDrawable.startTransition(300);
resultDrawable = transitionDrawable;
}
resultDrawable.setCallback(this);
resultDrawable.setBounds(iconDrawable.getBounds());
iconDrawable = resultDrawable;
invalidate();
}
GameItemView.java 文件源码
java
阅读 21
收藏 0
点赞 0
评论 0
项目:recycler-view-optimization
作者:
评论列表
文章目录