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 & each time it returns some particular & 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.
I want that here in the picture 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.