Thanks, very helpful.  It is a bit alarming that it is that difficult
to display a simple dialog.  Also, am I right that the logic only gets
evaluated on the first with subsequent calls showing the same dialog
as initially produced?


On Feb 23, 12:40 am, dillirao malipeddi <dillir...@arijasoft.com>
wrote:
> int DIALOG_YES_NO_MESSAGE = 999;
>
>  protected Dialog onCreateDialog(int id)
>     {
>
>         switch (id)
>         {
>          case DIALOG_YES_NO_MESSAGE:
>             return new AlertDialog.Builder(Visited_channels.this)
>                 .setTitle("title")
>                 .setPositiveButton("OK", new
> DialogInterface.OnClickListener() {
>                     public void onClick(DialogInterface dialog, int
> whichButton) {
>
>                         // User clicked OK so do some stuff
>                      System.out.println("OK clicked.");
>                     }
>                 })
>                 .setNegativeButton("Cancel", new
> DialogInterface.OnClickListener() {
>                     public void onClick(DialogInterface dialog, int
> whichButton) {
>
>                         // User clicked Cancel so do some stuff
>
>                      System.out.println("cancel clicked.");
>                     }
>                 })
>                 .create();
>         }
>         return null;
>         }
>
> and call
>
> showDialog(DIALOG_YES_NO_MESSAGE);
>
> On Mon, Feb 23, 2009 at 11:56 AM, Bob <bshumsk...@yahoo.com> wrote:
>
> > Hi,
> > How do I display a simple yes/no or ok/cancel dialog with a title and
> > react to the user choice?
>
> > Thanks,
> > Bob
>
> --
> Dilli Rao. M
> ARIJASOFT
> +91 - 9703073540
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to