public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK && event.getRepeatCount() == 0) { return true; } return super.onKeyDown(keyCode, event); }
禁用返回键
最新推荐文章于 2022-02-07 14:56:59 发布
public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK && event.getRepeatCount() == 0) { return true; } return super.onKeyDown(keyCode, event); }