I want my imagebutton to open (not an activity) but something like a new xml layout or something of the sort. I want the users to be able to press the button and when they do so, it then opens and the users can see text and pictures of information about what thay clicked. I would like ten image buttons on one single activity. Or is there an alternative method to acheive this?
Share
You can use a customized dialog here there’s an example. http://www.helloandroid.com/tutorials/how-display-custom-dialog-your-android-application
Imagine this is your main layout, which contains a button:
And your activity is something like that:
Each time a user clicks the button “Press me!” the activity will display a dialog, this dialog contains the information you need, in this case an image and a text the customized dialog looks like:
So you are showing a new layout, each time a user clicks your button/imagebutton in the same activity.