Hi,
I decided to share the solution i found to the problem of Android not
supporting real modal dialogs.
The solution was to draw the dialog by myself. :-( Well, at least
worked fine, besides the problem that its a bit ugly. :-)
Here's the code i used:
static boolean alertShowing;
Note this could only possibly work if your drawing (and blocking) code is
not running in the main UI thread, in which case you could just as well have
it ask the main thread to show the dialog, and have this thread block
waiting for the user to respond to it. (And of course you need to deal with
sigh. please read the message fully? thanks. it wasn't about blocking
as a UI concept.
Eh, blocking on user input is rarely the way to do things. Your
activity has to be able to respond to other events - such as being
killed or put to sleep when the phone rings. A mobile phone is an
event
thanks for the response.
ok so that's the accepted way to do it. great.
Fine. Yes, the only way to get a response from a button is via the
onClick() handler. So yes, you use that to start up a thread and put
up a progress dialog, then close it when the thread has done its long
transaction.
4 matches
Mail list logo