title: Picasso not showing images
body: <p>I have an app that gets images from internal storage, and must show them in an ImageView. Since the loading of the images has an impact in performance in the app, I would like to do it asynchronously. I made <a href="https://stackoverflow.com/questions/31700716/new-thread-while-loading-listview-in-a-fragment">this</a> question, and was told to use Picasso. The app now goes fast, but is not showing the image. This is the code I am using to put the image in the ImageView:</p>
  
  <pre><code>Picasso.with(c).load(path).resize(dpToPx(80), dpToPx(80)).centerCrop().into(holder.foto);
  </code></pre>
  
  <p>This is the adapter, with the commented lines I used without Picasso. That way, the Image is shown, but it delays the UI:</p>
  
  <pre><code>public class FotoAdapter extends BaseAdapter {
      private ArrayList&lt;BeanFotos&gt; fotos;
      private LayoutInflater inflater=null;
      Context c;
      Handler handler;
  
      public FotoAdapter(Context c, ArrayList&lt;BeanFotos&gt; fotos){
          this.fotos=fotos;
          inflater=LayoutInflater.from(c);
          this.c=c;
  
      }
      @Override
      public int getCount() {
          if(fotos!=null){
              return fotos.size();
          }
          return 0;
      }
  
      @Override
      public Object getItem(int position) {
  
          return fotos.get(position);
      }
  
      @Override
      public long getItemId(int position) {
          return position;
      }
  
      @Override
      public View getView(final int position, View convertView, ViewGroup parent) {
  
          ViewHolder holder;
          if (convertView == null) {
  
  
              convertView=inflater.inflate(R.layout.foto_layout, null);
              holder=new ViewHolder();
              holder.lat=(TextView)convertView.findViewById(R.id.textlat);
              holder.lon=(TextView)convertView.findViewById(R.id.textlon);
              holder.foto=(ImageView)convertView.findViewById(R.id.foto);
              convertView.setTag(holder);
          }else{
              holder = (ViewHolder) convertView.getTag();
          }
  
                  String path=fotos.get(position).getFotoPath();
                  Picasso.with(c).load(path).resize(dpToPx(80), dpToPx(80)).centerCrop().into(holder.foto);
                  /*Bitmap foto= BitmapFactory.decodeFile(path);
                  int bmWidth=foto.getHeight();
                  int bmHeight=foto.getHeight();
                  int ivWidth;
                  int ivHeigth;
                  int new_width;
                  int new_height;
                  ivWidth=dpToPx(80);
                  new_width=ivWidth;
                  new_height = (int) Math.floor((double) bmHeight *( (double) new_width / (double) bmWidth));
                  Bitmap newbitMap = Bitmap.createScaledBitmap(foto, new_width, new_height, true);*/
                  holder.lat.setText(fotos.get(position).getLatitud().toString());
                  holder.lon.setText(fotos.get(position).getLongitud().toString());
                  //holder.foto.setImageBitmap(newbitMap);
  
          return convertView;
      }
  
      private int dpToPx(int dp)
      {
          float density = c.getResources().getDisplayMetrics().density;
          return Math.round((float)dp * density);
      }
      static class ViewHolder {
          public TextView lat;
          public TextView lon;
          public ImageView foto;
      }
  }
  </code></pre>
  
  <p>Would be great to use Picasso and show the Image, but if that is not possible, what could I do?</p>
  
  <p>Thank you.</p>