Vote count:
0
My app needs to capture and then disable the multitasking key, however it does not work even I used either KEYCODE_MENU or KEYCODE_APP_SWITCH:
public boolean onKeyDown(int keyCode, KeyEvent event) {
// TODO Auto-generated method stub
if(keyCode == KeyEvent.KEYCODE_BACK) { //shield Back Key
Log.i(TAG, "shield Back Key");
return true;
} else if(keyCode == KeyEvent.KEYCODE_MENU) { //shield Menu Key
Log.i(TAG, "shield Menu Key");
return true;
} else if(keyCode == KeyEvent.KEYCODE_HOME) { //this does not work
return true;
}else if(keyCode == KeyEvent.KEYCODE_APP_SWITCH) { //shield Multiple Key
Log.i(TAG, "shield Mutiple Key");
return true;
}
return super.onKeyDown(keyCode, event);
}
How can we do it? Thanks.
asked 27 secs ago
capture and disable multitask key
Aucun commentaire:
Enregistrer un commentaire