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

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

2010-12-13 Thread varun tewari
Try using onSearchRequested (). Varun On Sat, Dec 11, 2010 at 11:30 PM, Mark Murphy wrote: > Put that in your Dialog subclass, then. > > On Sat, Dec 11, 2010 at 12:57 PM, acr wrote: > > To add to my o

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 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 == KeyEvent.K

[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