You could try attaching a key listener that consumes the search key. I agree it is dumb for it to be dismissing itself when the key is pressed. I think this is left-over from when the search key used to always to a global search, so it would be a switch into the search UI and dialogs would dismiss to clean things up a bit. It doesn't make sense how things are now.
On Sun, Jan 16, 2011 at 5:15 PM, Zsolt Vasvari <zvasv...@gmail.com> wrote: > Just to bump this (as this is important for me), this close on the > Search press behavior is happening even if the dialog is set to non- > cancelable. I think that's a flat out bug and may create a bug report > for it. > > On Jan 16, 10:49 am, Zsolt Vasvari <zvasv...@gmail.com> wrote: > > I have to add that this effect EVERY dialog in the system. So, for > > example, if you have an LVL or any type of important dialog where you > > must be notified of its closing, you better make sure that the user > > cannot just dismiss it using the Search button. > > > > On Jan 16, 10:44 am, Zsolt Vasvari <zvasv...@gmail.com> wrote: > > > > > > > > > Hello, > > > > > Is there a way to do what the title says? I have a password security > > > dialog built using AlertDialog.Builder. The problem is that pressing > > > the search button simply dismisses the dialog. I need to notify the > > > underlying activity that the dialog was dismiised so that I can quit > > > the app. > > > > > I've tried to set an onDismissListener which notifies the parent > > > activiy. This works OK, but the parent comes into view for a few > > > second and then the app closes -- this is a security risk. I have to > > > mention that I have the background activity blurred out for security > > > reasons and when the user presses the normal Cancel button on the > > > dialog, the background activity is never fully visible again -- it > > > just stays blurred, then it finishes. On the other hand, when I hit > > > the Search button, the background activity comes into full unblurred > > > view and then it finishes maybe 2 seconds later. > > > > > So ideal thing would be is to somehow catch and eat the search key > > > press, but I cannot find a way to do this. > > > > > Anyhow has any suggestions/ideas?- Hide quoted text - > > > > - Show quoted text - > > -- > 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<android-developers%2bunsubscr...@googlegroups.com> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- Dianne Hackborn Android framework engineer hack...@android.com 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 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