DialogFragment 監聽按鍵事件的方法(onkeydown)
{
public boolean onKey(DialogInterface dialog, int keyCode, KeyEvent event){
if (keyCode == KeyEvent.KEYCODE_SEARCH)
return true; // pretend we've processed it
else
return false; // pass on to be processed as normal
}
});