Android - loop through a list of items

HI, I am trying to create a test on Android where I have a list of items and I need to select each item to check whether a button displays (select if it does), if it does not display I need to go back to the menu and select the next item.

Does anyone know how I can go about this ?