listfragment中物理键盘onKeyDown和dispatchKeyEvent方法不响应,谁知道原因??

chengche 发布于 2013/05/07 16:15
阅读 1K+
收藏 0
  public boolean onKeyDown(int keyCode, KeyEvent event) {
       // super.getActivity().onKeyDown(keyCode, event);
            Log.i(TAG, "keycode++++++1");
            if (keyCode == KeyEvent.KEYCODE_D) {

                    Log.i(TAG, "keycode++++++2");
                    Intent intent = new
                            Intent(getActivity(), AddCryptoworks.class);
                    intent.setAction(AddCryptoworks.INSERT_TABLE_ACTION);
                    startActivity(intent);
                  return true;
            }
            return false;
        }
加载中
返回顶部
顶部