I have already developed a dialog box in android and I am using two buttons. But I don't know how to call another XML layout when a button is clicked. Please help me.
Asked
Active
Viewed 225 times
-1
-
1Where do you want to use this layout? In a new Activity, the original Activity, the dialog? Please post your relevant code and any LogCat errors to help us understand what you are trying to do. – Sam Jul 10 '12 at 18:10
1 Answers
1
What you want to do is call an activity with an xml layout assigned to it. Take a look at this http://developer.android.com/guide/topics/ui/dialogs.html#ShowingADialog and you'll want to put something like this in an onclick event.
Intent i = new Intent(SettingsActivity.this, Traffic_DroidActivity.class);
startActivity(i);

MillyMonster
- 546
- 4
- 21