[android-developers] Re: disable the search key android alertdialog

2010-12-21 Thread dasorin2000
As Mark said, the solution is add your onKey inside the dialog. Or create a custom dialog instead using Dialog. See below: public class CustomDialog extends Dialog { public CustomDialog(Context context) { super(context); setOnKeyListener(new

Re: [android-developers] Re: disable the search key android alertdialog

2010-12-13 Thread varun tewari
Try using onSearchRequestedhttp://developer.android.com/reference/android/view/Window.Callback.html#onSearchRequested() (). Varun On Sat, Dec 11, 2010 at 11:30 PM, Mark Murphy mmur...@commonsware.comwrote: Put that in your Dialog subclass, then. On Sat, Dec 11, 2010 at 12:57 PM, acr

[android-developers] Re: disable the search key android alertdialog

2010-12-11 Thread acr
To add to my original post.. I do have the following (which DOES prevent the search key from being pressed) in the activity it just doesn't work when the dialog is open. if (keyCode == KeyEvent.KEYCODE_SEARCH) { System.out.println(search pressed); return

Re: [android-developers] Re: disable the search key android alertdialog

2010-12-11 Thread Mark Murphy
Put that in your Dialog subclass, then. On Sat, Dec 11, 2010 at 12:57 PM, acr acr...@gmail.com wrote: To add to my original post.. I do have the following (which DOES prevent the search key from being pressed) in the activity it just doesn't work when the dialog is open. if (keyCode ==