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
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
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
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 ==
4 matches
Mail list logo