public boolean onKeyDown(int keyCode, KeyEvent event) { if((keyCode==KeyEvent.KEYCODE_BACK)&&webView.canGoBack())//以更改back按键为例 { webView.goBack(); return true; } return super.onKeyDown(keyCode,event); }
更改按键的效果
最新推荐文章于 2022-09-26 11:37:07 发布
public boolean onKeyDown(int keyCode, KeyEvent event) { if((keyCode==KeyEvent.KEYCODE_BACK)&&webView.canGoBack())//以更改back按键为例 { webView.goBack(); return true; } return super.onKeyDown(keyCode,event); }