【发布时间】:2014-09-23 17:30:39
【问题描述】:
我试过用这个方法:
bmp = (Bitmap) Picasso.with(Feed.this).load(IMAGE_URL+loadImageUrl).resize(width, width).get();
但即使我取出(位图)类型转换,我也会收到“Picasso DownloadResponseException”
我也试过了:
Picasso.with(Feed.this).load(IMAGE_URL+image).resize(width, width).into(target);
有
private Target target = new Target() {
@Override
public void onBitmapFailed(Drawable arg0) {
// TODO Auto-generated method stub
Log.d("FAILED", "Bitmap Failed");
}
@Override
public void onPrepareLoad(Drawable arg0) {
// TODO Auto-generated method stub
}
@Override
public void onBitmapLoaded(Bitmap bmp, LoadedFrom arg1) {
RoundedCornersDrawable drawable = new RoundedCornersDrawable(getResources(), bmp);
theImage.setImageDrawable(drawable);
}
};
但它什么也没给我,图像没有加载它只是保持空白,并且 BitmapFailed 方法下的日志消息没有出现......存储在我的服务器上的图像类型为“jpg”。
请帮帮我
【问题讨论】:
标签: android bitmap imageview remote-server picasso