色付きのプレースホルダーソリューションの別の方法として、実際の画像を読み込むまでプレースホルダーとしてサムネイル画像(100 X 100 ピクセルのみの場合があります) を表示する方法があります。
私はZingooでそれを行い、それについてブログ投稿を行いました. Picassoを使用すると、次のように実行できます。
Transformation blurTransformation = new Transformation() {
@Override
public Bitmap transform(Bitmap source) {
Bitmap blurred = Blur.fastblur(LiveImageView.this.context, source, 10);
source.recycle();
return blurred;
}
@Override
public String key() {
return "blur()";
}
};
Picasso.with(context)
.load(thumbUrl) // thumbnail url goes here
.placeholder(R.drawable.placeholder)
.resize(imageViewWidth, imageViewHeight)
.transform(blurTransformation)
.into(imageView, new Callback() {
@Override
public void onSuccess() {
Picasso.with(context)
.load(url) // image url goes here
.resize(imageViewWidth, imageViewHeight)
.placeholder(imageView.getDrawable())
.into(imageView);
}
@Override
public void onError() {
}
});
Blurクラスを含む投稿自体の詳細。