我正在尝试将位图加载到arraylist,如下所示:
Picasso.with(context).load(url).into(new Target(){
@Override
public void onBitmapLoaded(Bitmap bitmap, Picasso.LoadedFrom from) {
//mainLayout.setBackground(new BitmapDrawable(context.getResources(), bitmap));
photos.add(bitmap);
}
@Override
public void onBitmapFailed(final Drawable errorDrawable) {
Log.d("TAG", "FAILED");
}
@Override
public void onPrepareLoad(final Drawable placeHolderDrawable) {
Log.d("TAG", "Prepare Load");
}
});
但为什么onBitmapLoaded方法永远不会被调用?