title: Android: Dynamically change Image in Listview
body: <p>I have a listview defined by the following xml. I need to <strong>toggle the image</strong> in the list during runtime when the user clicks on any row. How can I achieve this? Any help is highly appreciated. Thanks</p>
  
  <pre><code>//list_item.xml
  &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"&gt;
  &lt;ImageView
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"
  android:src="@drawable/play" 
  android:id="@+id/img"
  /&gt; 
  &lt;TextView 
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"
  android:gravity="center_vertical"
  android:id="@+id/txt"
  /&gt;
  &lt;/LinearLayout&gt;
  </code></pre>