public boolean onKeyDown(int keyCode, KeyEvent event) {
Log.d(TAG, "onKeyDown");
if (keyCode == [color=blue]KeyEvent.KEYCODE_DPAD_LEFT[/color]) {
panWest();
return true;
} else if (keyCode == [color=blue]KeyEvent.KEYCODE_DPAD_RIGHT[/color]) {
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;
}//手机上的[color=blue]导航键[/color]代码
Log.d(TAG, "onKeyDown");
if (keyCode == [color=blue]KeyEvent.KEYCODE_DPAD_LEFT[/color]) {
panWest();
return true;
} else if (keyCode == [color=blue]KeyEvent.KEYCODE_DPAD_RIGHT[/color]) {
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;
}//手机上的[color=blue]导航键[/color]代码