Yes, I read Android docs about dialogs. However, this still does not
answer my trivial questions. I also do not want to block UI thread.
Blocking UI thread means you block message pump and UI becomes
unresponsive. What I want is to call the function from UI thread that
would popup the dialog and this function will not return until the
dialog is closed. It is obvious that this modal dialog internally must
implement message pump and break this message loop when user closes
the dialog. Something similar to DialogBox or MessageBox Windows APIs.
I understand that I can implement OnClickListener, but this will
effectively call another function in the activity class that pops up
this dialog. I cannot this way to return to the same execution point
in the function that popped up the dialog.

If Android does not have truly modal dialog I wonder what the
suggested approach to the following standard situation. Say you have
function that at certain point needs to prompt user for some input via
a modal dialog and then must use the input from the dialog to continue
its execution.


On Jan 17, 9:20 pm, Frank Weiss <[email protected]> wrote:
> Have you looked at the Dev Guide at 
> all?http://developer.android.com/guide/topics/ui/dialogs.html
>
> If you want to literally not have the function that brings up the dialog
> return until the dialog is closed, you're in for some trouble. That's not
> the way the Android UI works. There was lengthy discussion about that
> earlier. Search for block ui thread.
>
>
>
> On Sun, Jan 17, 2010 at 5:36 PM, ls02 <[email protected]> wrote:
> > I am new to Android. How do I popup modal dialog? By modal I mean I
> > call something like showModalDialog function and it will not return
> > until the dialog is closed and I can get what button was used to close
> > the dialog.
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to [email protected]
> > To unsubscribe from this group, send email to
> > [email protected]<android-developers%2bunsubs­[email protected]>
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en- Hide quoted text -
>
> - Show quoted text -
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to