title: changing image of imageview dynamically
body: <p>i have a list defined by the layout list_item_new.xml in which i have an imageView and 2 textViews. ImageView is defined like this</p>
  
  <pre><code> &lt;ImageView
          android:id="@+id/listimage"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_gravity="center"
  
          android:gravity="center"
  
          android:src="@drawable/users2"
      /&gt;
  </code></pre>
  
  <p>i am using the same ListView on 3 different screens. 
  Now what i want is that the image on this imageView should be different for all the 3 screens. i am trying to change to image like this</p>
  
  <pre><code>LayoutInflater inflater = (LayoutInflater) this.getSystemService
               (Context.LAYOUT_INFLATER_SERVICE);
          LinearLayout ll = (LinearLayout) inflater.inflate(R.layout.list_item_new, null);
          listimg=(ImageView)ll.findViewById(R.id.listimage);
          listimg.setImageResource(R.drawable.office);
  </code></pre>
  
  <p>office.png is an image in drawable.</p>
  
  <p>the whole code is executing but the image is not changing. please tell me what should i do to change the image. i am writing this code in onCreate method of activity and after this i am assigning the data to the list</p>
  
  <p>thanks</p>