back键的捕获

 @Override

    public boolean onKeyDown(int keyCode, KeyEvent event) {

               Log.v(LOG_TAG, "onKeyDown: " + event.getKeyCode());

           if (keyCode == KeyEvent.KEYCODE_BACK){                    

                   return true;

           }

           return super.onKeyDown(keyCode, event);

    }

你可能感兴趣的:(back键的捕获)