重寫dispatchKeyEvent即可
@Override
public boolean dispatchKeyEvent(KeyEvent event) {
if (event.getKeyCode() == KeyEvent.KEYCODE_BACK){
return true;
}
return super.dispatchKeyEvent(event);
}
重寫dispatchKeyEvent即可
@Override
public boolean dispatchKeyEvent(KeyEvent event) {
if (event.getKeyCode() == KeyEvent.KEYCODE_BACK){
return true;
}
return super.dispatchKeyEvent(event);
}