title: loading images from array list using picasso library
body: <p>hi im still new to android 
  i was displaying some dummy images in a grid view, i have a custom adapter that uses a view holder, it puts a string array and type array into an array list and displays it in the gridview this all works fine, 
  then i realised my images i wanted to use were far too large and found the picasso library, seems very powerful and easy to use but im unsure what to pass into the load method as it wants a type array and my type array is in an array list im sure this is a simple fix but i cant see it,
  my images are in the app </p>
  
  <p>here is my imageId and viewholder class</p>
  
  <pre><code> class imageIds
  {
      int imageId;
      String imageNames;
  
      imageIds(int imageId, String imageNames)
      {
          this.imageId = imageId;
          this.imageNames = imageNames;
      }
  }
  class ViewHolder
  {
      ImageView myView;
      ViewHolder(View view){
          myView = (ImageView) view.findViewById(R.id.imageView);
      }
  }
  </code></pre>
  
  <p>this is the beginning of my adapter where i declare and initialize my arrays</p>
  
  <pre><code> class myAdapter extends BaseAdapter{
          ArrayList&lt;imageIds&gt; list;
      Context context;
      myAdapter(Context context)
      {
          this.context = context;
      list = new ArrayList&lt;imageIds&gt;();
      Resources res = context.getResources();
      String[] tempWallpaperNames = res.getStringArray(R.array.wallpaper_list);
  
          int[] tempWallPaperImages = {R.drawable.ic_home,R.drawable.ic_photos,R.drawable.ic_home,
                  R.drawable.ic_photos,R.drawable.ic_photos,R.drawable.ic_photos,R.drawable.ic_home,
                  R.drawable.ic_home,R.drawable.ic_photos,R.drawable.ic_home};
              for (int i = 0; i&lt;10;i++)
              {
                  imageIds tempWallpaper = new imageIds(tempWallPaperImages[i],tempWallpaperNames[i]);
                  list.add(tempWallpaper);
              }
      }
  </code></pre>
  
  <p>and here is my adapter get view method</p>
  
  <pre><code>@Override
      public View getView(int position, View convertView, ViewGroup parent) {
  
          View row = convertView;
          ViewHolder holder = null;
          if (row == null){
  
              LayoutInflater inflater = (LayoutInflater)  
              context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
              row = inflater.inflate(R.layout.grid_images,parent,false);
              holder = new ViewHolder(row);
              row.setTag(holder);
          }
          else{
            holder = (ViewHolder) row.getTag();
          }
  
          imageIds wallPapers = list.get(position);
          holder.myView.setImageResource(wallPapers.imageId);
  
          holder.myView.setTag(wallPapers);
  
          Picasso.with(getActivity())
                  .load(imageIds[position])
                  .placeholder(R.drawable.ic_photos)
                  .error(R.drawable.ic_drawer)
                  .noFade().resize(120,120)
                  .centerCrop().into(holder.myView);
          return holder.myView;
  
  
          return row;
      }
  }
  </code></pre>
  
  <p>android studio is telling me an expression is expected here</p>
  
  <pre><code>.load(imageIds[position])
  </code></pre>
  
  <p>thanks for any help </p>