android webview点击返回键返回上一级activity

android webview点击返回键返回上一个activity

1 @Override
2     public boolean onKeyDown(int keyCode, KeyEvent event) {
3         // TODO Auto-generated method stub
4         if (keyCode == KeyEvent.KEYCODE_BACK && event.getRepeatCount() == 0) {
5             return true;
6         }
7         return super.onKeyDown(keyCode, event);
8     }

 

posted @ 2014-08-18 22:32  HuijunZhang  阅读(3793)  评论(0编辑  收藏  举报
中国