i never look forward to handling Android dialogs, maybe someone can 
point me to a better way of doing it than i'm doing right now.

say i have a dialog which has one text field in it, and OK and Cancel 
buttons. i make the dialog with AlertDialog.Builder, and set click 
listeners on the buttons and dismiss listener on the dialog.

when the dismiss listener fires, can i tell which button caused the 
dismiss? i don't see how, so in the click listener, i set a member 
flag according to which button was clicked. then in the dismiss 
listener, i then check the flag to see whether to proceed or not. a 
rather backward process. am i missing something?

the other issue i have with Android's dialogs is that if the contents 
fail validation and the dialog needs to be re-presented, i have to 
re-show it in the dismiss listener. in every other environment known 
to man, dialogs are (somewhat) modal, so the dialog stays up unless 
expressly dismissed by code. IMHO, the latter makes more sense.

thanks for any help with this stuff,
-- 
jason.vp.engineering.particle

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