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!
As the title says I am currently trying to populate a list with custom images, one image for each row on the list.
The .xml file for a row has the following container
<ImageView
android:id="@+id/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/icon"
/>
and I understand the image is retrieved from :src.
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;
How can I replace the android:src value dynamically from inside my java code with the required image.