对应手机上的按键代码

public boolean onKeyDown(int keyCode, KeyEvent event) {
Log.d(TAG, "onKeyDown");
if (keyCode == KeyEvent.KEYCODE_DPAD_LEFT) {
panWest();
return true;
} else if (keyCode == KeyEvent.KEYCODE_DPAD_RIGHT) {
panEast();
return true;
} else if (keyCode == KeyEvent.KEYCODE_DPAD_UP) {
panNorth();
return true;
} else if (keyCode == KeyEvent.KEYCODE_DPAD_DOWN) {
panSouth();
return true;
}
return false;
}//手机上的 导航键代码

你可能感兴趣的:(UP)