title: How can I change the image of an ImageView?
body: <p>I have just started learning android. And i don't know How can I change the image of an <code>ImageView</code>? ie it has some Image which was set in the layout but i want to change that image through coding how should i do it ?</p>
  
  <p>Here is the xml file</p>
  
  <pre><code>&lt;LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="#cc8181"
   &gt;
  
  &lt;ImageView
    android:id="@+id/image"
    android:layout_width="50dip"
    android:layout_height="fill_parent" 
    android:src="@drawable/icon"
    android:layout_marginLeft="3dip"
    android:scaleType="center"/&gt;
  </code></pre>
  
  <p></p>
  
  <p>thanks for replying.</p>