Implement normal keycode left/up...
This commit is contained in:
parent
e10b3f3826
commit
959d05661e
2 changed files with 9 additions and 1 deletions
|
@ -492,7 +492,7 @@ public class OsmandSettings {
|
|||
|
||||
// this value string is synchronized with settings_pref.xml preference name
|
||||
public final OsmandPreference<Boolean> ZOOM_BY_TRACKBALL =
|
||||
new BooleanAccessibilityPreference("zoom_by_trackball", true).makeGlobal();
|
||||
new BooleanAccessibilityPreference("zoom_by_trackball", false).makeGlobal();
|
||||
|
||||
// this value string is synchronized with settings_pref.xml preference name
|
||||
public final OsmandPreference<Boolean> SCROLL_MAP_BY_GESTURES =
|
||||
|
|
|
@ -1123,6 +1123,14 @@ public class MapActivity extends AccessibleActivity implements IMapLocationListe
|
|||
changeZoom(mapView.getZoom() + 1);
|
||||
return true;
|
||||
}
|
||||
} else if (keyCode == KeyEvent.KEYCODE_DPAD_LEFT ||
|
||||
keyCode == KeyEvent.KEYCODE_DPAD_RIGHT ||keyCode == KeyEvent.KEYCODE_DPAD_DOWN ||
|
||||
keyCode == KeyEvent.KEYCODE_DPAD_UP) {
|
||||
int dx = keyCode == KeyEvent.KEYCODE_DPAD_RIGHT ? 15 : (keyCode == KeyEvent.KEYCODE_DPAD_LEFT ? - 15 : 0);
|
||||
int dy = keyCode == KeyEvent.KEYCODE_DPAD_DOWN ? 15 : (keyCode == KeyEvent.KEYCODE_DPAD_UP ? -15 : 0);
|
||||
LatLon l = mapView.getLatLonFromScreenPoint(mapView.getCenterPointX() + dx, mapView.getCenterPointY() + dy);
|
||||
setMapLocation(l.getLatitude(), l.getLongitude());
|
||||
return true;
|
||||
}
|
||||
return super.onKeyUp(keyCode,event);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue