Is there a way to get alert dialog results inline (like you can with most
dialogs)?
I want to determine what to do next inwith a dialog, but I can't figure out
how to get the results back in the same method that I create the dialog from
thus allowing me to continue in my logic flow.
void doStuff()
{
dlg = CreateDialog()
dlg.show(); // shows the dialog and doesn't return till the dialog is
dismissed
if dlg.getResults() == this)
{
doThis();
}
else
{
doThat();
}
}
Theoretically this is the reason you pop up a dialog, to get an answer so
you can continue on. I know I can redirect the results with
OnClickListener, but this doesn't do any good because show() doesn't
actually show the dialog until the calling method (or I would guess thread)
pauses. I want to keep it all in the same method. Any ideas?
Thanks
--
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