标签:bsp getview key resume length OLE amp touch als
@Override public void onResume() { super.onResume(); getView().setFocusableInTouchMode(true); getView().requestFocus(); getView().setOnKeyListener(new View.OnKeyListener() { @Override public boolean onKey(View view, int i, KeyEvent keyEvent) { if(keyEvent.getAction() == KeyEvent.ACTION_DOWN && i == KeyEvent.KEYCODE_BACK){ Toast.makeText(getActivity(), "按了返回键", Toast.LENGTH_SHORT).show(); return true; } return false; } }); }
标签:bsp getview key resume length OLE amp touch als
原文地址:https://www.cnblogs.com/guanxinjing/p/12722066.html