title: How to access images from drawable folder in android studio according to my choice?
body: <p>Suppose I have a list of item like String[] list={"item1","item2","item3",....,"itemN"}; I have corresponding images of each item having different formats(some in jpg,some in png etc.) and different names serially(as indices of list array) in drawable folder. I have to do some processing on the list array &amp; each time it returns some particular &amp; different indices of list.
  So,I have to show the corresponding images of those items indicated by returned indices no as list view in android studio. how can I do this.
  For example, If after processing I have indices no: { 3,7,1}, I have to show corresponding no of images for item3, item7 and item1 stored in drawable folder as listView.Again,indicated indices values may change depending on processing on it.
  Can someone help pls???</p>
  
  <p>Edit: </p>
  
  <p>Actually I want that <a href="https://i.stack.imgur.com/4Xikk.png" rel="nofollow noreferrer">here in the picture</a> the sequence of displaying the images and texts will not be according to 'position',rather it will be according to my choice like in first row position of listview I will have the image of item3,in row position 2 ->image of item 7,in row position 3 -> image of item 1. </p>