On Thu, Dec 18, 2008 at 7:30 PM, Josh <joshdo...@gmail.com> wrote:
>
> I have the following code that works fine to display a dialog box
> using an xml layout file.
>
> <code>
> dialog = new Dialog(this);
> dialog.setContentView(R.layout.settings);
>
> dialog.show();
> </code>
>
>
> How do i add event listeners to the button widgets that i placed in
> the xml layout?

Button b = (Button) dialog.findViewById(R.id....);
b.setOnClickListener(...);

R/

> Is there a default button or event rather that is used to close dialog
> boxes in android applications?
>
>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to