title: Android ImageView.setBackgroundResource() doesn't work
body: <p>I'm trying to <code>setBackgroundResource</code> for an <code>ImageView</code>, but it doesn't work.</p>
  
  <p>Xml:</p>
  
  <pre><code>&lt;ImageView
      android:id="@+id/img_index"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_centerInParent="true"
      android:layout_marginBottom="4dp"
      android:background="@drawable/homegray"
      android:gravity="center_horizontal|center_horizontal"
      android:paddingBottom="4dp"
  /&gt;
  </code></pre>
  
  <p>Activity code:</p>
  
  <pre><code>imgIndex = (ImageView) this.findViewById(R.id.img_index);
  imgIndex.setBackgroundResource(R.drawable.homewhite);
  </code></pre>
  
  <p>How can I control my <code>ImageView</code>?</p>