On Dec 29, 1:22 pm, TreKing <treking...@gmail.com> wrote:
> Um ... why don't you just put the code you want to execute in the onClick
> handlers for the Yes and No options, respectively?
> That's pretty much the point of having them ...
>

+1 for the win.

I agree, just take what ever action is necessary and put it in the
onClick listeners.  Its really that simple

-theSmith

> -------------------------------------------------------------------------------------------------
> TreKing - Chicago transit tracking app for Android-powered 
> deviceshttp://sites.google.com/site/rezmobileapps/treking
>
> On Tue, Dec 29, 2009 at 8:25 AM, Frank Weiss <fewe...@gmail.com> wrote:
> > I assume you want a modal dialog. I'm pretty sure  blocking the UI thread
> > is going about this wrong. For example, consider the Activity lifecycle
> > callbacks which would be called when another Activity or Application becomes
> > visible.
>
> > Here's an explanation I found by googling for android modal dialog:
> >http://groups.google.com/group/android-developers/browse_thread/threa...
>
> > On Tue, Dec 29, 2009 at 3:52 AM, swapnil kamble 
> > <swap.kam...@gmail.com>wrote:
>
> >> Hi ,
> >>       I am displaying Confirmation type dialog box. I want to pause
> >> execution of that thread until answer is provided by user, but since this
> >> AlertDialog works asynchronously, I am facing problems in blocking that
> >> thread but displaying AlertDialog and continue execution on answer. I tried
> >> using wait notify between threads but didn't worked. Anybody Used
> >> AlertDialog.wait() method ?
> >> I am pasting my code here too,
>
> >>                                      AlertDialog.Builder builder = new
> >> AlertDialog.Builder(Demo.ctxt);
>
> >> builder.setMessage("Do you want  to Trust testgenservercert")
> >>                                                      .setCancelable(false)
>
> >> .setPositiveButton("Yes", new DialogInterface.OnClickListener() {
> >>                                                          public void
> >> onClick(DialogInterface dialog, int id) {
>
> >> //uiThread.notify();
>
> >> System.out.println("Positive Button clicked");
> >>                                                                  }
> >>                                                      })
>
> >> .setNegativeButton("No", new DialogInterface.OnClickListener() {
> >>                                                          public void
> >> onClick(DialogInterface dialog, int id) {
>
> >> //uiThread.notify();
>
> >> System.out.println("Negative Button clicked");
>
> >>                                                                  }
> >>                                                      });
> >>                                         /*uiThread =
> >> Thread.currentThread();
> >>                                         AlertDialog alert =
> >> builder.create();
> >>                                         alert.show();
> >>                                         synchronized(alert) {
> >>                                                 alert.wait();
> >>                                         }*/
>
> >> --
> >> ...Swapnil
>
> >> || Hare Krishna Hare Krishna Krishna Krishna Hare Hare ||
> >> || Hare Rama    Hare Rama   Rama   Rama    Hare Hare ||
>
> >> --
> >> 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<android-developers%2bunsubscr...@googlegroups.com>
> >> For more options, visit this group at
> >>http://groups.google.com/group/android-developers?hl=en
>
> >  --
> > 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<android-developers%2bunsubscr...@googlegroups.com>
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en

-- 
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