title: Populating android list with images
body: <p>A background before I start, I am a beginner in android and have looked on various forums for a solution to my problem but found the overly complicated for what I am trying to achieve, so I am here to ask the good people at stack!</p>
  
  <p>As the title says I am currently trying to populate a list with custom images, one image for each row on the list.</p>
  
  <p>The .xml file for a row has the following container</p>
  
  <pre><code>&lt;ImageView
  android:id="@+id/icon"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"
  android:src="@drawable/icon"
  
  /&gt;
  </code></pre>
  
  <p>and I understand the image is retrieved from :src.</p>
  
  <p>What I am trying to achieve is to have the res/drawable folder storing my images.I would then like to add the appropriate image to its corresponding list, and this is where I run into a problem;</p>
  
  <p>How can I replace the android:src value dynamically from inside my java code with the required image.</p>