How to go from a selected button in a list to different activities or the same activity with different text [duplicate]
So, I'm making my first android app and want to perform a simple task, but can't seem to figure out the way to do it. I simply want to go from a list view to a screen of differing information based on which button was pressed. The information is similar enough(ie. a title and block of text) that I think I can use the same activity for it all, but I don't know how to switch out the different information based on the user's selection. Should I make a separate activity for each bu开发者_如何学JAVAtton in the list, or can I have the first activity send context to a single next activity and somehow determine what xml code to use, and how do I do it?
You can refer to my answer here. The original question in that thread also now contains an example of some code that appears to work.
精彩评论