Disable red arrow setting (no arrow when no route)
This commit is contained in:
parent
9ed2f34264
commit
b55a971f8a
3 changed files with 14 additions and 14 deletions
|
@ -894,10 +894,10 @@ public class OsmandSettings {
|
|||
public final CommonPreference<Boolean> MAP_ONLINE_DATA = new BooleanPreference("map_online_data", false).makeGlobal();
|
||||
|
||||
// this value string is synchronized with settings_pref.xml preference name
|
||||
public final CommonPreference<Boolean> SHOW_DESTINATION_ARROW = new BooleanPreference("show_destination_arrow", true).makeProfile();
|
||||
{
|
||||
SHOW_DESTINATION_ARROW.setModeDefaultValue(ApplicationMode.CAR, false);
|
||||
}
|
||||
// public final CommonPreference<Boolean> SHOW_DESTINATION_ARROW = new BooleanPreference("show_destination_arrow", true).makeProfile();
|
||||
// {
|
||||
// SHOW_DESTINATION_ARROW.setModeDefaultValue(ApplicationMode.CAR, false);
|
||||
// }
|
||||
|
||||
// this value string is synchronized with settings_pref.xml preference name
|
||||
public final CommonPreference<String> MAP_OVERLAY = new StringPreference("map_overlay", null).makeGlobal();
|
||||
|
|
|
@ -110,7 +110,7 @@ public class PointNavigationLayer extends OsmandMapLayer implements IContextMenu
|
|||
int locationY = tb.getPixYFromLatNoRot(pointToNavigate.getLatitude());
|
||||
canvas.rotate(-tb.getRotate(), locationX, locationY);
|
||||
canvas.drawBitmap(targetPoint, locationX - marginX, locationY - marginY, bitmapPaint);
|
||||
} else if (pointToNavigate != null && view.getSettings().SHOW_DESTINATION_ARROW.get()) {
|
||||
} else if (pointToNavigate != null && !view.getApplication().getRoutingHelper().isRouteCalculated()) {
|
||||
net.osmand.Location.distanceBetween(view.getLatitude(), view.getLongitude(), pointToNavigate.getLatitude(),
|
||||
pointToNavigate.getLongitude(), calculations);
|
||||
float bearing = calculations[1] - 90;
|
||||
|
|
|
@ -53,15 +53,15 @@ public class AppearanceWidgetsFactory {
|
|||
}
|
||||
});
|
||||
|
||||
final MapWidgetRegistry.MapWidgetRegInfo showDestinationArrow = mapInfoControls.registerAppearanceWidget(R.drawable.widget_show_destination_arrow, R.string.map_widget_show_destination_arrow,
|
||||
"show_destination_arrow", view.getSettings().SHOW_DESTINATION_ARROW);
|
||||
showDestinationArrow.setStateChangeListener(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
view.getSettings().SHOW_DESTINATION_ARROW.set(!view.getSettings().SHOW_DESTINATION_ARROW.get());
|
||||
mapInfoLayer.recreateControls();
|
||||
}
|
||||
});
|
||||
// final MapWidgetRegistry.MapWidgetRegInfo showDestinationArrow = mapInfoControls.registerAppearanceWidget(R.drawable.widget_show_destination_arrow, R.string.map_widget_show_destination_arrow,
|
||||
// "show_destination_arrow", view.getSettings().SHOW_DESTINATION_ARROW);
|
||||
// showDestinationArrow.setStateChangeListener(new Runnable() {
|
||||
// @Override
|
||||
// public void run() {
|
||||
// view.getSettings().SHOW_DESTINATION_ARROW.set(!view.getSettings().SHOW_DESTINATION_ARROW.get());
|
||||
// mapInfoLayer.recreateControls();
|
||||
// }
|
||||
// });
|
||||
|
||||
final MapWidgetRegistry.MapWidgetRegInfo transparent = mapInfoControls.registerAppearanceWidget(R.drawable.widget_transparent_skin, R.string.map_widget_transparent,
|
||||
"transparent", view.getSettings().TRANSPARENT_MAP_THEME);
|
||||
|
|
Loading…
Reference in a new issue