title: How can clear ImageButton's background?
body: <p>I have a ImageButton with default drawable image. From the code I set up the ImageButton layout size so after this modification the image doesn't cover the whole button because of centerInside scaleType. In the OnClick event I use this code to replace the ImageButton's image.</p>
  
  <pre><code>button.setImageBitmap(img);
  button.invalidate();
  </code></pre>
  
  <p>The new image is smaller than the old one. After replace the new image appears but the old image parts can be see around the new. How can I force to clear the old image or simply redraw the whole ImageButton to show only the new image?</p>
  
  <pre><code>&lt;ImageButton
              android:id="@+id/btnPhotoFront"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_margin="3dp"
              android:layout_weight="1"
              android:background="@android:color/transparent"
              android:contentDescription="@string/front"
              android:scaleType="centerInside"
              android:src="@drawable/camera" /&gt;
  </code></pre>
  
  <p>I tried with android:background="#00000000" but has no effect.
  The repaint works only if I don't set up background and leave the default gray button layer.</p>