0

I am trying to make one activity that will have a specific text and image based on what button was clicked in the previous activity. The first activity is a page with a bunch of different image buttons of different aquatic plants. Depending on which image button is clicked, I want the text and image of the next activity to be a description of the plant and a picture of it.

The question I have is how do I let the plant information activity know which button was clicked so that it knows which text and image to display?

A generic answer will work so I don't think you'll need any of my code, but if you feel you need it, then I'll post it.

Deeks
  • 43
  • 1
  • 8

1 Answers1

0

Put it as extras in the intent you use to start the new Activity. Either put the exact strings and image uris, or put some identifier that the activity can look at and decide which one to display.

Gabe Sechan
  • 90,003
  • 9
  • 87
  • 127