Markus,
I have reread the post on stack overflow, the prevention of the UI
seem to work once the "show()" of the dialog takes effect from the
main thread. But by that time (due to a post of the message) another
message may be queueed (from the second button).

This leaves two messages on the queue to be served by the main thread.

msg1: show
msg2: button2

I guess it is possible to quick fast enough to beat the system. May be
you need to set a variable to detect this.

Just thinking aloud...

Satya

On Thu, Apr 14, 2011 at 4:13 PM, Satya Komatineni
<satya.komatin...@gmail.com> wrote:
> For what it is worth dialogs in the Android SDK run in the main thread
> through a post back to the main thread.
>
> This means the main thread will follow the thread of logic after
> show() and gets back to the main queue and then will paint the dialog
> subsequently.
>
> However the modality prevetns other UI from receivign UI input except
> for the modal dialog.
>
> You have to accordingly code your logic to take this into account.
>
> --
> Satya Komatineni
> http://www.satyakomatineni.com
> http://www.androidbook.com
>
> On Thu, Apr 14, 2011 at 3:58 PM, Markus Junginger <mar...@greenrobot.de> 
> wrote:
>> After years of using dialogs, today I got doubts that they are
>> strictly modal after all. There seems to be a short time span in which
>> it is possible to hit other Views AFTER show() of the dialog is
>> called.
>>
>> Does this work as intended?
>>
>> Any ideas how to make a dialog really modal?
>>
>> Have a look here for some details:
>> http://stackoverflow.com/questions/5666707/bypass-modal-android-dialogs-by-clicking-buttons-twice-fast-enough
>>
>> --
>> 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
>



-- 
Satya Komatineni
http://www.satyakomatineni.com
http://www.androidbook.com

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