title: GridView PhotoAdapter
body: <p>I am trying to get photos from the server into the gridview, everything looks ok however no images are coming and no error message, below is the custom adapter java file. What is wrong with the codes?</p>
  
  <pre><code>public class PhotoAdapter extends ArrayAdapter&lt;PhotosActivity.Photos&gt;{
  
      ArrayList&lt;PhotosActivity.Photos&gt; photoList;
      LayoutInflater vi;
      int Resource;
      ViewHolder holder;
  
      public PhotoAdapter(Context context, int resource, ArrayList&lt;PhotosActivity.Photos&gt; objects) {
          super(context, resource, objects);
          vi = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
          Resource = resource;
          photoList = objects;
      }
  
      @Override
      public View getView(final int position, View convertView, ViewGroup parent) {
  
          View v = convertView;
  
          if (v == null) {
              holder = new ViewHolder();
              v = vi.inflate(Resource, null);
  
              holder.image = (ImageView) v.findViewById(R.id.grid_item_image);
  
              v.setTag(holder);
          } else {
              holder = (ViewHolder) v.getTag();
          }
  
          Picasso.with(v.getContext()).load(photoList.get(position).getImage()).into(holder.image);
  
          return v;
      }
  
      static class ViewHolder {
  
          public ImageView image;
  
      }
  }
  </code></pre>