监听实体键
public boolean onKeyDown(int kCode, KeyEvent kEvent) {
switch (kCode) {
case KeyEvent.KEYCODE_DPAD_LEFT:
return true;
case KeyEvent.KEYCODE_DPAD_UP:
return true;
case KeyEvent.KEYCODE_DPAD_RIGHT:
return true;
case KeyEvent.KEYCODE_DPAD_DOWN:
return true;
case KeyEvent.KEYCODE_DPAD_CENTER:
return true;
case KeyEvent.KEYCODE_BACK:
//返回键监听
return false;
}
return super.onKeyDown(kCode, kEvent);
}