diff --git a/OsmAnd/res/layout/dash_favorites_item.xml b/OsmAnd/res/layout/dash_favorites_item.xml index 0d9a34a93a..5bee3df793 100644 --- a/OsmAnd/res/layout/dash_favorites_item.xml +++ b/OsmAnd/res/layout/dash_favorites_item.xml @@ -33,6 +33,7 @@ android:layout_height="wrap_content"> Default Orange German Road Atlas + Railways + Pedestrian + Show railway warnings + Show pedestrian warnings American Road Atlas Do not use v1.9 routing Do not use v1.9 routing diff --git a/OsmAnd/src/net/osmand/plus/OsmandSettings.java b/OsmAnd/src/net/osmand/plus/OsmandSettings.java index ef2051da37..9e38b5ea85 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandSettings.java +++ b/OsmAnd/src/net/osmand/plus/OsmandSettings.java @@ -822,6 +822,8 @@ public class OsmandSettings { { SHOW_LANES.setModeDefaultValue(ApplicationMode.DEFAULT, false); } + public final CommonPreference SHOW_PEDESTRIAN = new BooleanPreference("show_pedastrian", true).makeProfile().cache(); + public final CommonPreference SHOW_RAILWAYS = new BooleanPreference("show_railways", true).makeProfile().cache(); public final OsmandPreference SPEAK_TRAFFIC_WARNINGS = new BooleanPreference("speak_traffic_warnings", true).makeProfile().cache(); public final OsmandPreference SPEAK_STREET_NAMES = new BooleanPreference("speak_street_names", true).makeProfile().cache(); diff --git a/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java b/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java index 5fb603a050..116c9bb9a5 100644 --- a/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java @@ -329,8 +329,9 @@ public class SettingsNavigationActivity extends SettingsBaseActivity { return true; } else if (preference == showAlarms) { showBooleanSettings(new String[] { getString(R.string.show_traffic_warnings), getString(R.string.show_cameras), - getString(R.string.show_lanes) }, new OsmandPreference[] { settings.SHOW_TRAFFIC_WARNINGS, - settings.SHOW_CAMERAS, settings.SHOW_LANES }, preference.getTitle()); + getString(R.string.show_lanes) ,getString(R.string.show_pedestrian_warnings) , + getString(R.string.show_railway_warnings) }, new OsmandPreference[] { settings.SHOW_TRAFFIC_WARNINGS, + settings.SHOW_CAMERAS, settings.SHOW_LANES, settings.SHOW_PEDESTRIAN, settings.SHOW_RAILWAYS }, preference.getTitle()); return true; } else if (preference == speakAlarms) { showBooleanSettings(new String[] { getString(R.string.speak_street_names), getString(R.string.speak_traffic_warnings), diff --git a/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java b/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java index 5a60a3887a..5c22158e7d 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java @@ -475,8 +475,19 @@ public class WaypointDialogHelper implements OsmAndLocationListener { } }); + TextView tv = (TextView) v.findViewById(R.id.header_text); tv.setText(getHeader(type, checked, ctx)); + v.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + if (type == WaypointHelper.POI && btn.isChecked()){ + running[0] = position; + thisAdapter.notifyDataSetInvalidated(); + selectPoi(running, thisAdapter, type, true, ctx); + } + } + }); return v; } diff --git a/OsmAnd/src/net/osmand/plus/routing/AlarmInfo.java b/OsmAnd/src/net/osmand/plus/routing/AlarmInfo.java index 7fe42e48c0..9ce305ac8b 100644 --- a/OsmAnd/src/net/osmand/plus/routing/AlarmInfo.java +++ b/OsmAnd/src/net/osmand/plus/routing/AlarmInfo.java @@ -14,7 +14,9 @@ public class AlarmInfo implements LocationPoint { TRAFFIC_CALMING(4), TOLL_BOOTH(5), STOP(6), - MAXIMUM(7); + MAXIMUM(7), + PEDESTRIAN(8), + RAILWAY(9); private int priority; @@ -29,18 +31,22 @@ public class AlarmInfo implements LocationPoint { public String getVisualName(Context ctx) { switch (priority) { - case 1: - return ctx.getString(R.string.traffic_warning_speed_camera); - case 2: - return ctx.getString(R.string.traffic_warning_speed_limit); - case 3: - return ctx.getString(R.string.traffic_warning_border_control); - case 4: - return ctx.getString(R.string.traffic_warning_calming); - case 5: - return ctx.getString(R.string.traffic_warning_payment); - case 6: - return ctx.getString(R.string.traffic_warning_stop); + case 1: + return ctx.getString(R.string.traffic_warning_speed_camera); + case 2: + return ctx.getString(R.string.traffic_warning_speed_limit); + case 3: + return ctx.getString(R.string.traffic_warning_border_control); + case 4: + return ctx.getString(R.string.traffic_warning_calming); + case 5: + return ctx.getString(R.string.traffic_warning_payment); + case 6: + return ctx.getString(R.string.traffic_warning_stop); + case 8: + return ctx.getString(R.string.traffic_waring_pedestrian); + case 9: + return ctx.getString(R.string.traffic_warning_railways); } return ctx.getString(R.string.traffic_warning); } diff --git a/OsmAnd/src/net/osmand/plus/views/DirectionDrawable.java b/OsmAnd/src/net/osmand/plus/views/DirectionDrawable.java index 97058023f5..6cfede7e37 100644 --- a/OsmAnd/src/net/osmand/plus/views/DirectionDrawable.java +++ b/OsmAnd/src/net/osmand/plus/views/DirectionDrawable.java @@ -51,7 +51,7 @@ public class DirectionDrawable extends Drawable { if (favorite) { canvas.rotate(angle, canvas.getHeight()/2, canvas.getWidth()/2); Bitmap arrow = BitmapFactory.decodeResource(ctx.getResources(), R.drawable.ic_destination_arrow); - canvas.drawBitmap(arrow, 0, 0, new Paint()); + canvas.drawBitmap(arrow, null, new Rect(0,0,arrow.getHeight(), arrow.getWidth()), null); } else { canvas.rotate(angle, width / 2, height / 2); Path directionPath = createDirectionPath();