Adding handling of Search Button for the jsPrompt

This commit is contained in:
Joe Bowser 2011-10-05 16:01:10 -07:00
parent 8b595f9796
commit 75ab33ad0c

View File

@ -950,6 +950,18 @@ public class DroidGap extends PhonegapActivity {
result.cancel();
}
});
dlg.setOnKeyListener(new DialogInterface.OnKeyListener() {
//DO NOTHING
public boolean onKey(DialogInterface dialog, int keyCode, KeyEvent event) {
if(keyCode == KeyEvent.KEYCODE_BACK)
{
result.cancel();
return false;
}
else
return true;
}
});
dlg.create();
dlg.show();
return true;