You can't.  If you block waiting for the dialog, you block the main thread,
preventing the dialog from being shown and run.

On Tue, Aug 11, 2009 at 4:56 AM, Chaoz1336 <[email protected]> wrote:

>
> Hi Yusuf,
>
> thx for the code, BUT I think u did not get my probleme ^^
> It's no probleme to get the input of the text in a dialoge,
> BUT (important!!!) I have to get the input of the dialoge before the
> method returns.
>
> #####################################################
>
> public int showDlg()
>    {
>        int iSelectedChoice = -1;
>
>        //show Dlg
>
>         //wait for Dlg to be finished (ok or cancel is clicked, DO NOT
> PROCEED until it is clicked)
>
>        return iSelectedChoice;     //return selected choice
>    }
>
> #####################################################
>
> but in the code u posted the Dialog is displayed and then the "return
> iSelectedChoice" is executed,
> even without pressing ok or cancel.
>
> Now u know my probleme?
> >
>


-- 
Dianne Hackborn
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

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