毕加索不是onBitmapLoaded第一次打电话,如果你知道,请告诉我
txtView = (TextView) centerRelative.getChildAt(i);
Picasso.with(getBaseContext()).load(file[i-4]).into(new Target() {
@Override
public void onBitmapLoaded(Bitmap bitmap, Picasso.LoadedFrom from) {
txtView.setBackground(new BitmapDrawable(getResources(),bitmap));
// Not executing for the first time
}
@Override
public void onBitmapFailed(Drawable errorDrawable) {
}
@Override
public void onPrepareLoad(Drawable placeHolderDrawable) {
// executing for the first time
}
});
Target target = new Target() {
@Override
public void onBitmapLoaded(Bitmap bitmap, Picasso.LoadedFrom from) {
txtView.setBackground(new BitmapDrawable(getResources(),bitmap));
logd("onBitmapLoaded");
}
@Override
public void onBitmapFailed(Drawable errorDrawable) {
}
@Override
public void onPrepareLoad(Drawable placeHolderDrawable) { …Run Code Online (Sandbox Code Playgroud)