-1

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.

Sam
  • 86,580
  • 20
  • 181
  • 179
Sajith Vijesekara
  • 1,324
  • 2
  • 17
  • 52
  • 1
    Where 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 Answers1

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