Trying to add a custom toast to each image in a gallery with an "If" statement

view story

http://stackoverflow.com – I'm trying to figure out how to add a toast message for each image when clicked on from a gallery. I want to to use an If statement to get my results. Here is the code that I wrote which does a simple toaste for each image when clicked. public class Main extends Activity { Integer[] Animals = {R.drawable.elephant, R.drawable.gorilla, R.drawable.leopard, R.drawable.monkey, R.drawable.panda, R.drawable.redpanda}; ImageView imageView; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main) (HowTos)