title: ImageView set image Resource doesn't show wanted image.png
body: <p>In my gridViewAdapter I set the ImageResource to the .png object but it doesn't show in activity. Here's the adapter's function getView:</p>
  
  <pre><code>@Override 
  public View getView(int position, View convertView, ViewGroup parent) { 
      View row = convertView; 
      ViewHolder holder; 
      if (row == null) { 
          LayoutInflater inflater = ((Activity) context).getLayoutInflater(); 
          row = inflater.inflate(layoutResourceId, parent, false); 
          holder = new ViewHolder(); 
          holder.photoSubscriptTextView = (TextView) row.findViewById(R.id.photoSubscriptTextView); 
          holder.photoInstanceImageView = (ImageView) row.findViewById(R.id.galleryMonumentPhotoImageView); 
          row.setTag(holder); 
      } else { 
          holder = (ViewHolder) row.getTag(); 
      } 
      final Photo photo = data.get(position); 
      row.setOnClickListener(new View.OnClickListener() { 
          @Override 
          public void onClick(View v) { 
              Intent intent; 
              if(photo.getPodpis().equals(getContext().getString(R.string.photo_add))){ 
                  intent = new Intent(); 
                  intent.setType("image/*"); 
                  intent.setAction(Intent.ACTION_GET_CONTENT); 
                  ((Activity) context).startActivityForResult(Intent.createChooser(intent, "Select Picture"), 100); 
              } 
              else { 
                  intent = new Intent(context, PhotoGallery.class); 
                  intent.putExtra("photo", photo); 
                  context.startActivity(intent); 
              } 
          } 
      }); 
      holder.photoSubscriptTextView.setText(photo.getPodpis()); 
      if(photo.getUri() != null) 
          aQuery.id(holder.photoInstanceImageView).image(photo.getUri()); 
      else if(photo.getPodpis().equals(getContext().getResources().getString(R.string.photo_add)))  { 
          holder.photoInstanceImageView.setImageResource(R.drawable.image_add); 
      } 
      return row; 
  </code></pre>
  
  <p>And the xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; 
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
            xmlns:tools="http://schemas.android.com/tools" 
            android:layout_width="wrap_content" 
            android:layout_height="wrap_content" 
            android:layout_marginTop="5dp" 
            android:orientation="vertical" 
            android:padding="5dp" 
            android:clickable="true" 
            android:focusable="true"&gt; 
  &lt;!--android:background="@drawable/grid_color_selector"--&gt; 
  &lt;ImageView 
          android:id="@+id/galleryMonumentPhotoImageView" 
          android:layout_width="100dp" 
          android:layout_height="100dp" 
          android:src="@drawable/image_add"&gt; 
  &lt;/ImageView&gt; 
  &lt;TextView 
          android:id="@+id/photoSubscriptTextView" 
          android:layout_width="fill_parent" 
          android:layout_height="wrap_content" 
          android:layout_marginTop="5dp" 
          android:gravity="center" 
          android:textSize="12sp" &gt; 
  &lt;/TextView&gt; 
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>The main layout contains only the Relative Layout and GridView.
  Can anybody tell me why image from resources that I set in adapter doesn't show in activity?</p>