2015-09-05 31 views
0

我想如下的位圖加載到一個ArrayList:無法使用Picasso將位圖下載到目標?

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方法從來沒有所謂的?

+0

在我的情況是調用 –

回答

0

畢加索,不持有強引用new Target()它會被垃圾收集

過目this

相關問題