diff --git a/OsmAnd-java/src/net/osmand/util/OpeningHoursParser.java b/OsmAnd-java/src/net/osmand/util/OpeningHoursParser.java index 1edc076c61..870ab9b01f 100644 --- a/OsmAnd-java/src/net/osmand/util/OpeningHoursParser.java +++ b/OsmAnd-java/src/net/osmand/util/OpeningHoursParser.java @@ -643,7 +643,7 @@ public class OpeningHoursParser { private boolean off = false; /** - * Aadditional information or limitation. + * Additional information or limitation. * https://wiki.openstreetmap.org/wiki/Key:opening_hours/specification#explain:comment */ private String comment; @@ -1106,7 +1106,7 @@ public class OpeningHoursParser { } else if (time > endTime && days[ad] && checkAnotherDay) { diff = 24 * 60 - endTime + time; } - if (limit == WITHOUT_TIME_LIMIT || (diff != -1 && diff <= limit || limit == CURRENT_DAY_TIME_LIMIT)) { + if (limit == WITHOUT_TIME_LIMIT || ((diff != -1 && diff <= limit) || limit == CURRENT_DAY_TIME_LIMIT)) { formatTime(startTime, sb); break; } diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index 43a84e03c8..a6bd3c28f5 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -28,9 +28,7 @@ GPX file with coordinates and data of the selected notes. GPX file with coordinates and data of all notes. - \u2022 Detection of stop signs now considers driving direction\n\n - \u2022 New algorithm providing meaningful ascent/descent values for GPX tracks\n\n - \u2022 Terrain (ascent) aware hiking time (Naismith\'s rule)\n\n + \u2022 \n\n Modify the search query. Actions @@ -340,13 +338,16 @@ \u2022 OsmAnd Live: bug fixes, fresh data on the server every 30 minutes, updates implemented into the navigation\n\n + \u2022 Detection of stop signs now considers driving direction\n\n + \u2022 New algorithm providing meaningful ascent/descent values for GPX tracks\n\n + \u2022 Terrain (ascent) aware hiking time (Naismith\'s rule)\n\n \u2022 Updated the context menu: show when the POI opens / closes\n\n \u2022 Transport menu: all available routes are now at the top\n\n \u2022 Wikipedia: added the button to open the original article, updated the appearance of articles\n\n - \u2022 Route: added possibility to swap start and end points in one tap\n\n - \u2022 Notes: added sorting by type and date\n\n - \u2022 OSM edits: show an icon and a name of the POI category, display completed actions\n\n - \u2022 New quick coordinate input screen for quick markers creation\n\n + \u2022 Route: added possibility to swap start and end points in one tap\n\n + \u2022 Notes: added sorting by type and date\n\n + \u2022 OSM edits: show an icon and a name of the POI category, display completed actions\n\n + \u2022 New quick coordinate input screen for quick markers creation\n\n Auto-split recordings after gap Start new segment after gap of 6 min, new track after gap of 2 h, or new file after a longer gap if the date has changed. @@ -2856,4 +2857,6 @@ Winter and ski Touring view (contrast and details) Nautical + Copy Point/POI name + Location has no name diff --git a/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java b/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java index 7978fe9b15..55c6ed23dd 100644 --- a/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java @@ -194,8 +194,8 @@ public class SettingsNavigationActivity extends SettingsBaseActivity { registerListPreference(settings.ARRIVAL_DISTANCE_FACTOR, screen, arrivalNames, arrivalValues); //array size should be equal! - Float[] speedLimitsKm = new Float[]{0f, 5f, 7f, 10f, 15f, 20f}; - Float[] speedLimitsMiles = new Float[]{0f, 3f, 5f, 7f, 10f, 15f}; + Float[] speedLimitsKm = new Float[]{-10f, -7f,-5f, 0f, 5f, 7f, 10f, 15f, 20f}; + Float[] speedLimitsMiles = new Float[]{-7f, -5f, -3f, 0f, 3f, 5f, 7f, 10f, 15f}; if (settings.METRIC_SYSTEM.get() == OsmandSettings.MetricsConstants.KILOMETERS_AND_METERS) { String[] speedNames = new String[speedLimitsKm.length]; for (int i =0; i list = new LinkedList<>(); list.add(ShareItem.MESSAGE); list.add(ShareItem.CLIPBOARD); + list.add(ShareItem.NAME); list.add(ShareItem.GEO); list.add(ShareItem.QR_CODE); return list; @@ -107,6 +110,15 @@ public class ShareMenu extends BaseMenuController { case CLIPBOARD: ShareDialog.sendToClipboard(getMapActivity(), sms); break; + case NAME: + if (!Algorithms.isEmpty(title)) { + ShareDialog.sendToClipboard(getMapActivity(), title); + } else { + Toast.makeText(getMapActivity(), + R.string.toast_empty_name_error, + Toast.LENGTH_LONG).show(); + } + break; case GEO: Intent mapIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(geoUrl)); getMapActivity().startActivity(mapIntent); diff --git a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java index 0245c0ce75..5e3dd47ac4 100644 --- a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java +++ b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java @@ -705,9 +705,8 @@ public class MeasurementToolFragment extends BaseOsmAndFragment { } @Override - public void onItemClick(View view) { + public void onItemClick(int position) { if (mapActivity != null && measurementLayer != null) { - int position = pointsRv.indexOfChild(view); if (pointsListOpened) { hidePointsList(); } diff --git a/OsmAnd/src/net/osmand/plus/measurementtool/adapter/MeasurementToolAdapter.java b/OsmAnd/src/net/osmand/plus/measurementtool/adapter/MeasurementToolAdapter.java index effb5e6442..c123cf5c15 100644 --- a/OsmAnd/src/net/osmand/plus/measurementtool/adapter/MeasurementToolAdapter.java +++ b/OsmAnd/src/net/osmand/plus/measurementtool/adapter/MeasurementToolAdapter.java @@ -52,12 +52,6 @@ public class MeasurementToolAdapter extends RecyclerView.Adapter