From d6bd0e414567faa358d9d09d7d724a7acca1c935 Mon Sep 17 00:00:00 2001
From: androiddevkotlin <64539346+androiddevkotlin@users.noreply.github.com>
Date: Mon, 15 Mar 2021 22:45:02 +0200
Subject: [PATCH 001/103] init
---
.../GpxApproximationFragment.java | 10 +++++++++
.../MeasurementToolFragment.java | 6 ++++--
.../FollowTrackFragment.java | 21 +++++++++++--------
3 files changed, 26 insertions(+), 11 deletions(-)
diff --git a/OsmAnd/src/net/osmand/plus/measurementtool/GpxApproximationFragment.java b/OsmAnd/src/net/osmand/plus/measurementtool/GpxApproximationFragment.java
index 132f48b6a5..cea8ff65a4 100644
--- a/OsmAnd/src/net/osmand/plus/measurementtool/GpxApproximationFragment.java
+++ b/OsmAnd/src/net/osmand/plus/measurementtool/GpxApproximationFragment.java
@@ -21,6 +21,7 @@ import net.osmand.GPXUtilities.WptPt;
import net.osmand.LocationsHolder;
import net.osmand.PlatformUtil;
import net.osmand.ResultMatcher;
+import net.osmand.plus.LockableScrollView;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R;
import net.osmand.plus.UiUtilities;
@@ -157,6 +158,15 @@ public class GpxApproximationFragment extends ContextMenuScrollFragment
updateCardsLayout();
}
updateCards();
+ final LockableScrollView profileContainer = mainView.findViewById(R.id.route_menu_bottom_scroll);
+ profileContainer.postDelayed(new Runnable() {
+ @Override
+ public void run() {
+ if (snapToRoadAppMode.getOrder() > 4) {
+ profileContainer.fullScroll(View.FOCUS_DOWN);
+ }
+ }
+ }, 100);
updateButtons(mainView);
progressBar = mainView.findViewById(R.id.progress_bar);
diff --git a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java
index 74f636802a..fcc7f0ca03 100644
--- a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java
+++ b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java
@@ -554,7 +554,6 @@ public class MeasurementToolFragment extends BaseOsmAndFragment implements Route
});
initMeasurementMode(gpxData, savedInstanceState == null);
-
if (savedInstanceState == null) {
if (fileName != null) {
addNewGpxData(getGpxFile(fileName));
@@ -1959,10 +1958,13 @@ public class MeasurementToolFragment extends BaseOsmAndFragment implements Route
}
public static boolean showInstance(FragmentManager fragmentManager, MeasurementEditingContext editingCtx,
- boolean followTrackMode) {
+ boolean followTrackMode, boolean isShowSnapWarning) {
MeasurementToolFragment fragment = new MeasurementToolFragment();
fragment.setEditingCtx(editingCtx);
fragment.setMode(FOLLOW_TRACK_MODE, followTrackMode);
+ Bundle bundle = new Bundle();
+ bundle.putBoolean("isShowSnapWarning", isShowSnapWarning);
+ fragment.setArguments(bundle);
return showFragment(fragment, fragmentManager);
}
diff --git a/OsmAnd/src/net/osmand/plus/routepreparationmenu/FollowTrackFragment.java b/OsmAnd/src/net/osmand/plus/routepreparationmenu/FollowTrackFragment.java
index b5abb80b65..a5209eac18 100644
--- a/OsmAnd/src/net/osmand/plus/routepreparationmenu/FollowTrackFragment.java
+++ b/OsmAnd/src/net/osmand/plus/routepreparationmenu/FollowTrackFragment.java
@@ -446,15 +446,18 @@ public class FollowTrackFragment extends ContextMenuScrollFragment implements Ca
if (mapActivity != null) {
if (card instanceof ImportTrackCard) {
importTrack();
- } else if (card instanceof TrackEditCard || card instanceof AttachTrackToRoadsCard) {
- openPlanRoute();
+ } else if (card instanceof AttachTrackToRoadsCard) {
+ openPlanRoute(true);
+ close();
+ } else if (card instanceof TrackEditCard) {
+ openPlanRoute(false);
close();
- } else if (card instanceof SelectTrackCard) {
- updateSelectionMode(true);
- } else if (card instanceof ReverseTrackCard
- || card instanceof NavigateTrackOptionsCard) {
- updateMenu();
}
+ } else if (card instanceof SelectTrackCard) {
+ updateSelectionMode(true);
+ } else if (card instanceof ReverseTrackCard
+ || card instanceof NavigateTrackOptionsCard) {
+ updateMenu();
}
}
@@ -574,7 +577,7 @@ public class FollowTrackFragment extends ContextMenuScrollFragment implements Ca
}
}
- public void openPlanRoute() {
+ public void openPlanRoute(boolean showSnapWarning) {
MapActivity mapActivity = getMapActivity();
if (mapActivity != null && gpxFile != null) {
editingTrack = true;
@@ -583,7 +586,7 @@ public class FollowTrackFragment extends ContextMenuScrollFragment implements Ca
editingContext.setGpxData(gpxData);
editingContext.setAppMode(app.getRoutingHelper().getAppMode());
editingContext.setSelectedSegment(app.getSettings().GPX_ROUTE_SEGMENT.get());
- MeasurementToolFragment.showInstance(mapActivity.getSupportFragmentManager(), editingContext, true);
+ MeasurementToolFragment.showInstance(mapActivity.getSupportFragmentManager(), editingContext, true, showSnapWarning);
}
}
From a8719b542fef323dcc2af7923590653ed71273b4 Mon Sep 17 00:00:00 2001
From: androiddevkotlin <64539346+androiddevkotlin@users.noreply.github.com>
Date: Mon, 15 Mar 2021 23:56:14 +0200
Subject: [PATCH 002/103] Navigation > Follow track > select simplified track
> edit > open "Route between points"
---
.../MeasurementToolFragment.java | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java
index fcc7f0ca03..34fde58555 100644
--- a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java
+++ b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java
@@ -132,6 +132,8 @@ public class MeasurementToolFragment extends BaseOsmAndFragment implements Route
private ImageView mainIcon;
private String fileName;
private OnBackPressedCallback onBackPressedCallback;
+ private boolean isShowSnapWarning;
+ private static final String SHOW_SNAP_WARNING = "show_snap_warning";
private InfoType currentInfoType;
@@ -235,6 +237,11 @@ public class MeasurementToolFragment extends BaseOsmAndFragment implements Route
if (mapActivity == null) {
return null;
}
+ if (savedInstanceState != null) {
+ restoreState(savedInstanceState);
+ } else if (getArguments() != null) {
+ restoreState(getArguments());
+ }
final MeasurementToolLayer measurementLayer = mapActivity.getMapLayers().getMeasurementToolLayer();
final OsmandApplication app = mapActivity.getMyApplication();
@@ -349,7 +356,6 @@ public class MeasurementToolFragment extends BaseOsmAndFragment implements Route
}
});
-
View applyPointBeforeAfterButton = mainView.findViewById(R.id.apply_point_before_after_point_button);
UiUtilities.setupDialogButton(nightMode, applyPointBeforeAfterButton,
UiUtilities.DialogButtonType.PRIMARY, R.string.shared_string_apply);
@@ -553,6 +559,7 @@ public class MeasurementToolFragment extends BaseOsmAndFragment implements Route
}
});
+ isShowSnapWarning = getArguments().getBoolean(SHOW_SNAP_WARNING);
initMeasurementMode(gpxData, savedInstanceState == null);
if (savedInstanceState == null) {
if (fileName != null) {
@@ -1963,7 +1970,7 @@ public class MeasurementToolFragment extends BaseOsmAndFragment implements Route
fragment.setEditingCtx(editingCtx);
fragment.setMode(FOLLOW_TRACK_MODE, followTrackMode);
Bundle bundle = new Bundle();
- bundle.putBoolean("isShowSnapWarning", isShowSnapWarning);
+ bundle.putBoolean(SHOW_SNAP_WARNING, isShowSnapWarning);
fragment.setArguments(bundle);
return showFragment(fragment, fragmentManager);
}
@@ -2107,7 +2114,9 @@ public class MeasurementToolFragment extends BaseOsmAndFragment implements Route
manager.beginTransaction()
.hide(this).commit();
layer.setTapsDisabled(true);
- SnapTrackWarningFragment.showInstance(mapActivity.getSupportFragmentManager(), this);
+ if (isShowSnapWarning) {
+ SnapTrackWarningFragment.showInstance(mapActivity.getSupportFragmentManager(), this);
+ }
AndroidUiHelper.setVisibility(mapActivity, View.GONE, R.id.map_ruler_container);
}
}
@@ -2132,4 +2141,8 @@ public class MeasurementToolFragment extends BaseOsmAndFragment implements Route
public interface OnUpdateInfoListener {
void onUpdateInfo();
}
+
+ public void restoreState(Bundle bundle) {
+ isShowSnapWarning = bundle.getBoolean(SHOW_SNAP_WARNING);
+ }
}
\ No newline at end of file
From eab60bed463ae7b5eb727ce9d693117346a4099e Mon Sep 17 00:00:00 2001
From: clementcontet
Date: Tue, 16 Mar 2021 17:49:57 +0100
Subject: [PATCH 003/103] Compute obstaclesTime before adding final segment
Fix https://github.com/osmandapp/OsmAnd/issues/10867
---
.../src/main/java/net/osmand/router/BinaryRoutePlanner.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/OsmAnd-java/src/main/java/net/osmand/router/BinaryRoutePlanner.java b/OsmAnd-java/src/main/java/net/osmand/router/BinaryRoutePlanner.java
index 0769e1390c..4c85058fa3 100644
--- a/OsmAnd-java/src/main/java/net/osmand/router/BinaryRoutePlanner.java
+++ b/OsmAnd-java/src/main/java/net/osmand/router/BinaryRoutePlanner.java
@@ -457,10 +457,10 @@ public class BinaryRoutePlanner {
directionAllowed = false;
continue;
}
- boolean alreadyVisited = checkIfOppositeSegmentWasVisited(ctx, reverseWaySearch, graphSegments, segment, oppositeSegments,
- segmentPoint, segmentDist, obstaclesTime);
obstaclesTime += obstacle;
obstaclesTime += heightObstacle;
+ boolean alreadyVisited = checkIfOppositeSegmentWasVisited(ctx, reverseWaySearch, graphSegments, segment, oppositeSegments,
+ segmentPoint, segmentDist, obstaclesTime);
if (alreadyVisited) {
directionAllowed = false;
continue;
From 4064e1af985b9b51a974f3367e9e687c48a42e50 Mon Sep 17 00:00:00 2001
From: androiddevkotlin <64539346+androiddevkotlin@users.noreply.github.com>
Date: Wed, 17 Mar 2021 13:24:08 +0200
Subject: [PATCH 004/103] Travel: Maps you need card, popular articles jumping
For more smoothy update recycle view
notifyItemRangeChanged(getNeededMapsCardPosition(), items.size());
---
.../net/osmand/plus/wikivoyage/explore/ExploreRvAdapter.java | 2 --
1 file changed, 2 deletions(-)
diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreRvAdapter.java b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreRvAdapter.java
index d39e228abb..3f2db48f0c 100644
--- a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreRvAdapter.java
+++ b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreRvAdapter.java
@@ -158,8 +158,6 @@ public class ExploreRvAdapter extends RecyclerView.Adapter
Date: Wed, 17 Mar 2021 17:20:52 +0200
Subject: [PATCH 005/103] Update ExploreRvAdapter.java
---
.../net/osmand/plus/wikivoyage/explore/ExploreRvAdapter.java | 2 ++
1 file changed, 2 insertions(+)
diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreRvAdapter.java b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreRvAdapter.java
index 3f2db48f0c..becc599ced 100644
--- a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreRvAdapter.java
+++ b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreRvAdapter.java
@@ -158,6 +158,8 @@ public class ExploreRvAdapter extends RecyclerView.Adapter
Date: Wed, 17 Mar 2021 20:16:44 +0200
Subject: [PATCH 006/103] redesign trip recording start dialog
---
...tn_background_active_transparent_light.xml | 6 +
...btn_background_active_transparent_dark.xml | 6 +
...h_switch_divider_and_additional_button.xml | 124 ++++---
.../layout/preference_button_with_icon.xml | 47 +++
.../preference_button_with_icon_quadruple.xml | 57 ++++
.../preference_button_with_icon_triple.xml | 46 +++
...l => trip_recording_starting_fragment.xml} | 91 +++--
OsmAnd/res/values/sizes.xml | 1 +
OsmAnd/res/values/strings.xml | 1 +
.../osmand/plus/activities/MapActivity.java | 7 +-
.../plus/activities/MapActivityActions.java | 4 +-
.../monitoring/OsmandMonitoringPlugin.java | 4 +-
.../TripRecordingActiveBottomSheet.java | 113 ++++---
.../monitoring/TripRecordingBottomSheet.java | 306 -----------------
.../TripRecordingStartingBottomSheet.java | 314 ++++++++++++++++++
.../fragments/BaseSettingsFragment.java | 29 +-
.../plus/track/TrackAppearanceFragment.java | 6 +-
17 files changed, 712 insertions(+), 450 deletions(-)
create mode 100644 OsmAnd/res/drawable-hdpi/btn_background_active_transparent_light.xml
create mode 100644 OsmAnd/res/drawable/btn_background_active_transparent_dark.xml
create mode 100644 OsmAnd/res/layout/preference_button_with_icon.xml
create mode 100644 OsmAnd/res/layout/preference_button_with_icon_quadruple.xml
create mode 100644 OsmAnd/res/layout/preference_button_with_icon_triple.xml
rename OsmAnd/res/layout/{trip_recording_fragment.xml => trip_recording_starting_fragment.xml} (57%)
delete mode 100644 OsmAnd/src/net/osmand/plus/monitoring/TripRecordingBottomSheet.java
create mode 100644 OsmAnd/src/net/osmand/plus/monitoring/TripRecordingStartingBottomSheet.java
diff --git a/OsmAnd/res/drawable-hdpi/btn_background_active_transparent_light.xml b/OsmAnd/res/drawable-hdpi/btn_background_active_transparent_light.xml
new file mode 100644
index 0000000000..add11f80f7
--- /dev/null
+++ b/OsmAnd/res/drawable-hdpi/btn_background_active_transparent_light.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/OsmAnd/res/drawable/btn_background_active_transparent_dark.xml b/OsmAnd/res/drawable/btn_background_active_transparent_dark.xml
new file mode 100644
index 0000000000..14ae96d07a
--- /dev/null
+++ b/OsmAnd/res/drawable/btn_background_active_transparent_dark.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/OsmAnd/res/layout/bottom_sheet_with_switch_divider_and_additional_button.xml b/OsmAnd/res/layout/bottom_sheet_with_switch_divider_and_additional_button.xml
index 6953783885..a10a9eef42 100644
--- a/OsmAnd/res/layout/bottom_sheet_with_switch_divider_and_additional_button.xml
+++ b/OsmAnd/res/layout/bottom_sheet_with_switch_divider_and_additional_button.xml
@@ -4,80 +4,96 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:layout_marginStart="@dimen/content_padding"
+ android:layout_marginLeft="@dimen/content_padding"
+ android:layout_marginEnd="@dimen/content_padding"
+ android:layout_marginRight="@dimen/content_padding"
android:baselineAligned="false"
android:gravity="center_vertical"
- android:minHeight="@dimen/bottom_sheet_selected_item_title_height">
+ android:minHeight="@dimen/bottom_sheet_list_item_height">
-
+ android:gravity="center_vertical"
+ app:cardBackgroundColor="?attr/switch_button_active"
+ app:cardCornerRadius="4dp"
+ app:cardElevation="0dp">
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:background="?attr/selectableItemBackground"
+ android:orientation="horizontal">
-
+
+
+ android:layout_gravity="center_vertical"
+ android:layout_marginStart="@dimen/bottom_sheet_content_margin"
+ android:layout_marginLeft="@dimen/bottom_sheet_content_margin"
+ android:layout_marginEnd="@dimen/bottom_sheet_content_margin"
+ android:layout_marginRight="@dimen/bottom_sheet_content_margin"
+ android:clickable="false"
+ android:focusable="false"
+ android:focusableInTouchMode="false"
+ tools:checked="true" />
-
+
-
-
-
+ app:cardBackgroundColor="?attr/switch_button_active"
+ app:cardCornerRadius="4dp"
+ app:cardElevation="0dp">
-
+ android:background="?android:attr/selectableItemBackground"
+ android:clickable="true"
+ android:focusable="true"
+ android:gravity="center">
-
+
-
+
+
+
diff --git a/OsmAnd/res/layout/preference_button_with_icon.xml b/OsmAnd/res/layout/preference_button_with_icon.xml
new file mode 100644
index 0000000000..1c6b6770fd
--- /dev/null
+++ b/OsmAnd/res/layout/preference_button_with_icon.xml
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OsmAnd/res/layout/preference_button_with_icon_quadruple.xml b/OsmAnd/res/layout/preference_button_with_icon_quadruple.xml
new file mode 100644
index 0000000000..4105dbb2bc
--- /dev/null
+++ b/OsmAnd/res/layout/preference_button_with_icon_quadruple.xml
@@ -0,0 +1,57 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OsmAnd/res/layout/preference_button_with_icon_triple.xml b/OsmAnd/res/layout/preference_button_with_icon_triple.xml
new file mode 100644
index 0000000000..22d68ff090
--- /dev/null
+++ b/OsmAnd/res/layout/preference_button_with_icon_triple.xml
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OsmAnd/res/layout/trip_recording_fragment.xml b/OsmAnd/res/layout/trip_recording_starting_fragment.xml
similarity index 57%
rename from OsmAnd/res/layout/trip_recording_fragment.xml
rename to OsmAnd/res/layout/trip_recording_starting_fragment.xml
index f69e4eb4c7..809cc015ac 100644
--- a/OsmAnd/res/layout/trip_recording_fragment.xml
+++ b/OsmAnd/res/layout/trip_recording_starting_fragment.xml
@@ -1,11 +1,11 @@
+ android:orientation="vertical"
+ android:paddingBottom="@dimen/content_padding">
+ app:typeface="@string/font_roboto_medium" />
+ android:paddingRight="@dimen/content_padding"
+ android:paddingBottom="@dimen/bottom_sheet_content_margin">
+
-
+ android:layout_height="wrap_content"
+ app:cardBackgroundColor="?attr/switch_button_active"
+ app:cardCornerRadius="4dp"
+ app:cardElevation="0dp">
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+ android:layout_height="@dimen/content_padding" />
+
+
-
-
-
diff --git a/OsmAnd/res/values/sizes.xml b/OsmAnd/res/values/sizes.xml
index dae06fed05..79fa32d1c3 100644
--- a/OsmAnd/res/values/sizes.xml
+++ b/OsmAnd/res/values/sizes.xml
@@ -418,4 +418,5 @@
3sp
80dp
+ 160dp
\ No newline at end of file
diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml
index 899beda35c..93cfd93231 100644
--- a/OsmAnd/res/values/strings.xml
+++ b/OsmAnd/res/values/strings.xml
@@ -11,6 +11,7 @@
Thx - Hardy
-->
+ Logging interval set time period in which OsmAnd will ask for the current location position data.
Please select another type of colorization.
The track does not contain speed data.
The track does not contain altitude data.
diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java
index 7e0a07e40c..487f4d902f 100644
--- a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java
+++ b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java
@@ -93,7 +93,6 @@ import net.osmand.plus.importfiles.ImportHelper;
import net.osmand.plus.mapcontextmenu.AdditionalActionsBottomSheetDialogFragment;
import net.osmand.plus.mapcontextmenu.MapContextMenu;
import net.osmand.plus.mapcontextmenu.builders.cards.dialogs.ContextMenuCardDialogFragment;
-import net.osmand.plus.mapcontextmenu.editors.SelectFavoriteCategoryBottomSheet;
import net.osmand.plus.mapcontextmenu.other.DestinationReachedMenu;
import net.osmand.plus.mapcontextmenu.other.TrackDetailsMenu;
import net.osmand.plus.mapmarkers.MapMarker;
@@ -105,7 +104,7 @@ import net.osmand.plus.measurementtool.LoginBottomSheetFragment;
import net.osmand.plus.measurementtool.MeasurementEditingContext;
import net.osmand.plus.measurementtool.MeasurementToolFragment;
import net.osmand.plus.measurementtool.SnapTrackWarningFragment;
-import net.osmand.plus.monitoring.TripRecordingBottomSheet;
+import net.osmand.plus.monitoring.TripRecordingStartingBottomSheet;
import net.osmand.plus.render.RendererRegistry;
import net.osmand.plus.resources.ResourceManager;
import net.osmand.plus.routepreparationmenu.ChooseRouteFragment;
@@ -2242,8 +2241,8 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven
return getFragment(MeasurementToolFragment.TAG);
}
- public TripRecordingBottomSheet getTripRecordingBottomSheet() {
- return getFragment(TripRecordingBottomSheet.TAG);
+ public TripRecordingStartingBottomSheet getTripRecordingBottomSheet() {
+ return getFragment(TripRecordingStartingBottomSheet.TAG);
}
public ChooseRouteFragment getChooseRouteFragment() {
diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java
index c0fec48168..ff78335e74 100644
--- a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java
+++ b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java
@@ -63,7 +63,7 @@ import net.osmand.plus.measurementtool.MeasurementToolFragment;
import net.osmand.plus.measurementtool.StartPlanRouteBottomSheet;
import net.osmand.plus.monitoring.OsmandMonitoringPlugin;
import net.osmand.plus.monitoring.TripRecordingActiveBottomSheet;
-import net.osmand.plus.monitoring.TripRecordingBottomSheet;
+import net.osmand.plus.monitoring.TripRecordingStartingBottomSheet;
import net.osmand.plus.osmedit.dialogs.DismissRouteBottomSheetFragment;
import net.osmand.plus.profiles.ProfileDataObject;
import net.osmand.plus.profiles.ProfileDataUtils;
@@ -856,7 +856,7 @@ public class MapActivityActions implements DialogProvider {
if (monitoringPlugin.hasDataToSave() || monitoringPlugin.wasTrackMonitored()) {
TripRecordingActiveBottomSheet.showInstance(mapActivity.getSupportFragmentManager(), monitoringPlugin.getCurrentTrack());
} else {
- TripRecordingBottomSheet.showInstance(mapActivity.getSupportFragmentManager());
+ TripRecordingStartingBottomSheet.showInstance(mapActivity.getSupportFragmentManager());
}
return true;
}
diff --git a/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java b/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java
index 2799ac8ded..4fa978a8d6 100644
--- a/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java
+++ b/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java
@@ -331,7 +331,7 @@ public class OsmandMonitoringPlugin extends OsmandPlugin {
if (hasDataToSave() || wasTrackMonitored()) {
TripRecordingActiveBottomSheet.showInstance(fragmentManager, getCurrentTrack());
} else {
- TripRecordingBottomSheet.showInstance(fragmentManager);
+ TripRecordingStartingBottomSheet.showInstance(fragmentManager);
}
/*final boolean wasTrackMonitored = settings.SAVE_GLOBAL_TRACK_TO_GPX.get();
@@ -523,7 +523,7 @@ public class OsmandMonitoringPlugin extends OsmandPlugin {
runnable.run();
} else if (map instanceof FragmentActivity) {
FragmentActivity activity = (FragmentActivity) map;
- TripRecordingBottomSheet.showInstance(activity.getSupportFragmentManager());
+ TripRecordingStartingBottomSheet.showInstance(activity.getSupportFragmentManager());
}
}
diff --git a/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingActiveBottomSheet.java b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingActiveBottomSheet.java
index 00a9c0e8c0..27295899da 100644
--- a/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingActiveBottomSheet.java
+++ b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingActiveBottomSheet.java
@@ -4,17 +4,16 @@ import android.app.Activity;
import android.app.Dialog;
import android.content.Context;
import android.content.res.ColorStateList;
-import android.graphics.Typeface;
import android.graphics.drawable.Drawable;
import android.os.AsyncTask;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
-import android.util.TypedValue;
import android.text.format.DateUtils;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
+import android.widget.CompoundButton;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.TextView;
@@ -26,7 +25,7 @@ import androidx.annotation.Nullable;
import androidx.annotation.StringRes;
import androidx.appcompat.content.res.AppCompatResources;
import androidx.appcompat.widget.AppCompatImageView;
-import androidx.appcompat.widget.SwitchCompat;
+import androidx.cardview.widget.CardView;
import androidx.coordinatorlayout.widget.CoordinatorLayout;
import androidx.core.content.ContextCompat;
import androidx.core.graphics.drawable.DrawableCompat;
@@ -49,7 +48,6 @@ import net.osmand.plus.activities.SavingTrackHelper.SaveGpxResult;
import net.osmand.plus.base.MenuBottomSheetDialogFragment;
import net.osmand.plus.base.bottomsheetmenu.BaseBottomSheetItem;
import net.osmand.plus.helpers.AndroidUiHelper;
-import net.osmand.plus.helpers.FontCache;
import net.osmand.plus.myplaces.SaveCurrentTrackTask;
import net.osmand.plus.settings.backend.OsmandSettings;
import net.osmand.plus.track.GpxBlockStatisticsBuilder;
@@ -66,7 +64,7 @@ import java.util.Arrays;
import java.util.List;
import static net.osmand.AndroidUtils.getSecondaryTextColorId;
-import static net.osmand.plus.UiUtilities.CompoundButtonType.PROFILE_DEPENDENT;
+import static net.osmand.plus.UiUtilities.CompoundButtonType.GLOBAL;
public class TripRecordingActiveBottomSheet extends MenuBottomSheetDialogFragment {
@@ -84,6 +82,7 @@ public class TripRecordingActiveBottomSheet extends MenuBottomSheetDialogFragmen
private View statusContainer;
private LinearLayout buttonAppearance;
+ private AppCompatImageView trackAppearanceIcon;
private View buttonSave;
private GpxBlockStatisticsBuilder blockStatisticsBuilder;
@@ -141,7 +140,7 @@ public class TripRecordingActiveBottomSheet extends MenuBottomSheetDialogFragmen
createItem(buttonClear, ItemType.CLEAR_DATA, hasDataToSave());
createItem(buttonOnline, ItemType.STOP_ONLINE, hasDataToSave());
- createItem(buttonSegment, ItemType.START_SEGMENT, wasTrackMonitored());
+ createItem(buttonSegment, ItemType.START_NEW_SEGMENT, wasTrackMonitored());
createItem(buttonPause, wasTrackMonitored() ? ItemType.PAUSE : ItemType.RESUME, true);
createItem(buttonStop, ItemType.STOP, true);
@@ -163,37 +162,24 @@ public class TripRecordingActiveBottomSheet extends MenuBottomSheetDialogFragmen
blockStatisticsBuilder.initStatBlocks(null, ContextCompat.getColor(app, getActiveTextColorId(nightMode)), nightMode);
LinearLayout showTrackContainer = itemView.findViewById(R.id.show_track_on_map);
- showTrackContainer.setMinimumHeight(app.getResources().getDimensionPixelSize(R.dimen.bottom_sheet_list_item_height));
- final LinearLayout buttonShow = showTrackContainer.findViewById(R.id.basic_item_body);
+ final CardView buttonShow = showTrackContainer.findViewById(R.id.compound_container);
TextView showTrackTitle = buttonShow.findViewById(R.id.title);
Integer showTitle = ItemType.SHOW_TRACK.getTitleId();
if (showTitle != null) {
showTrackTitle.setText(showTitle);
}
- AndroidUtils.setPadding(buttonShow, AndroidUtils.dpToPx(app, 12f), 0, buttonShow.getPaddingRight(), 0);
- showTrackTitle.setTextColor(ContextCompat.getColor(app, getActiveIconColorId(nightMode)));
- showTrackTitle.setTextSize(TypedValue.COMPLEX_UNIT_PX, getResources().getDimensionPixelSize(R.dimen.default_desc_text_size));
- Typeface typeface = FontCache.getFont(app, app.getResources().getString(R.string.font_roboto_medium));
- showTrackTitle.setTypeface(typeface);
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
- float letterSpacing = AndroidUtils.getFloatValueFromRes(app, R.dimen.text_button_letter_spacing);
- showTrackTitle.setLetterSpacing(letterSpacing);
- }
- final SwitchCompat showTrackOnMapButton = buttonShow.findViewById(R.id.switch_button);
- showTrackOnMapButton.setChecked(app.getSelectedGpxHelper().getSelectedCurrentRecordingTrack() != null);
- UiUtilities.setupCompoundButton(showTrackOnMapButton, nightMode, PROFILE_DEPENDENT);
+ final CompoundButton showTrackCompound = buttonShow.findViewById(R.id.compound_button);
+ showTrackCompound.setChecked(app.getSelectedGpxHelper().getSelectedCurrentRecordingTrack() != null);
+ UiUtilities.setupCompoundButton(showTrackCompound, nightMode, GLOBAL);
buttonAppearance = showTrackContainer.findViewById(R.id.additional_button);
- View divider = buttonAppearance.getChildAt(0);
- AndroidUiHelper.setVisibility(View.GONE, divider);
- int marginS = app.getResources().getDimensionPixelSize(R.dimen.context_menu_padding_margin_small);
- UiUtilities.setMargins(buttonAppearance, marginS, 0, 0, 0);
- updateTrackIcon(buttonAppearance);
+ trackAppearanceIcon = showTrackContainer.findViewById(R.id.additional_button_icon);
+ updateTrackIcon(app, trackAppearanceIcon);
buttonAppearance.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
- if (showTrackOnMapButton.isChecked()) {
+ if (showTrackCompound.isChecked()) {
MapActivity mapActivity = getMapActivity();
if (mapActivity != null) {
hide();
@@ -203,19 +189,19 @@ public class TripRecordingActiveBottomSheet extends MenuBottomSheetDialogFragmen
}
}
});
- createItem(buttonAppearance, ItemType.APPEARANCE, showTrackOnMapButton.isChecked());
- setShowOnMapBackground(buttonShow, app, showTrackOnMapButton.isChecked(), nightMode);
+ createItem(buttonAppearance, ItemType.APPEARANCE, showTrackCompound.isChecked());
+ setShowOnMapBackground(buttonShow, showTrackCompound.isChecked(), nightMode);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
buttonShow.setBackgroundTintList(null);
}
buttonShow.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
- boolean checked = !showTrackOnMapButton.isChecked();
- showTrackOnMapButton.setChecked(checked);
+ boolean checked = !showTrackCompound.isChecked();
+ showTrackCompound.setChecked(checked);
app.getSelectedGpxHelper().selectGpxFile(app.getSavingTrackHelper().getCurrentGpx(), checked, false);
createItem(buttonAppearance, ItemType.APPEARANCE, checked);
- setShowOnMapBackground(buttonShow, app, checked, nightMode);
+ setShowOnMapBackground(buttonShow, checked, nightMode);
}
});
@@ -277,7 +263,7 @@ public class TripRecordingActiveBottomSheet extends MenuBottomSheetDialogFragmen
settings.SAVE_GLOBAL_TRACK_TO_GPX.set(wasTrackMonitored);
updateStatus();
createItem(buttonPause, wasTrackMonitored ? ItemType.PAUSE : ItemType.RESUME, true);
- createItem(buttonSegment, ItemType.START_SEGMENT, wasTrackMonitored);
+ createItem(buttonSegment, ItemType.START_NEW_SEGMENT, wasTrackMonitored);
}
});
@@ -310,15 +296,17 @@ public class TripRecordingActiveBottomSheet extends MenuBottomSheetDialogFragmen
}
}
- private void updateTrackIcon(View buttonAppearance) {
- String width = settings.CURRENT_TRACK_WIDTH.get();
- boolean showArrows = settings.CURRENT_TRACK_SHOW_ARROWS.get();
- int color = settings.CURRENT_TRACK_COLOR.get();
- Drawable appearanceDrawable = TrackAppearanceFragment.getTrackIcon(app, width, showArrows, color);
- AppCompatImageView appearanceIcon = buttonAppearance.findViewById(R.id.icon_after_divider);
- int marginTrackIconH = app.getResources().getDimensionPixelSize(R.dimen.content_padding_small);
- UiUtilities.setMargins(appearanceIcon, marginTrackIconH, 0, marginTrackIconH, 0);
- appearanceIcon.setImageDrawable(appearanceDrawable);
+ public static void updateTrackIcon(OsmandApplication app, AppCompatImageView appearanceIcon) {
+ if (appearanceIcon != null) {
+ OsmandSettings settings = app.getSettings();
+ String width = settings.CURRENT_TRACK_WIDTH.get();
+ boolean showArrows = settings.CURRENT_TRACK_SHOW_ARROWS.get();
+ int color = settings.CURRENT_TRACK_COLOR.get();
+ Drawable appearanceDrawable = TrackAppearanceFragment.getTrackIcon(app, width, showArrows, color);
+ int marginTrackIconH = app.getResources().getDimensionPixelSize(R.dimen.content_padding_small);
+ UiUtilities.setMargins(appearanceIcon, marginTrackIconH, 0, marginTrackIconH, 0);
+ appearanceIcon.setImageDrawable(appearanceDrawable);
+ }
}
private void createItem(View view, ItemType type, boolean enabled) {
@@ -370,7 +358,7 @@ public class TripRecordingActiveBottomSheet extends MenuBottomSheetDialogFragmen
setTextColor(context, desc, false, nightMode, type);
}
- setItemBackground(context, nightMode, button != null ? button : (LinearLayout) view, enabled);
+ setItemBackground(context, nightMode, button != null ? button : view, enabled);
}
private String getTimeTrackSaved() {
@@ -505,7 +493,7 @@ public class TripRecordingActiveBottomSheet extends MenuBottomSheetDialogFragmen
show();
for (String key : keys) {
if (key.equals(UPDATE_TRACK_ICON)) {
- updateTrackIcon(buttonAppearance);
+ updateTrackIcon(app, trackAppearanceIcon);
}
}
}
@@ -524,7 +512,7 @@ public class TripRecordingActiveBottomSheet extends MenuBottomSheetDialogFragmen
RECORDING(R.string.recording_default_name, R.drawable.ic_action_track_recordable),
ON_PAUSE(R.string.on_pause, R.drawable.ic_pause),
CLEAR_DATA(R.string.clear_recorded_data, R.drawable.ic_action_delete_dark),
- START_SEGMENT(R.string.gpx_start_new_segment, R.drawable.ic_action_new_segment),
+ START_NEW_SEGMENT(R.string.gpx_start_new_segment, R.drawable.ic_action_new_segment),
SAVE(R.string.shared_string_save, R.drawable.ic_action_save_to_file),
PAUSE(R.string.shared_string_pause, R.drawable.ic_pause),
RESUME(R.string.shared_string_resume, R.drawable.ic_play_dark),
@@ -532,7 +520,9 @@ public class TripRecordingActiveBottomSheet extends MenuBottomSheetDialogFragmen
STOP_AND_DISCARD(R.string.track_recording_stop_without_saving, R.drawable.ic_action_rec_stop),
STOP_AND_SAVE(R.string.track_recording_save_and_stop, R.drawable.ic_action_save_to_file),
STOP_ONLINE(R.string.live_monitoring_stop, R.drawable.ic_world_globe_dark),
- CANCEL(R.string.shared_string_cancel, R.drawable.ic_action_close);
+ CANCEL(R.string.shared_string_cancel, R.drawable.ic_action_close),
+ START_RECORDING(R.string.shared_string_control_start, R.drawable.ic_action_direction_movement),
+ SETTINGS(R.string.shared_string_settings, R.drawable.ic_action_settings);
@StringRes
private final Integer titleId;
@@ -560,24 +550,28 @@ public class TripRecordingActiveBottomSheet extends MenuBottomSheetDialogFragmen
}
}
- public static void setItemBackground(Context context, boolean nightMode, LinearLayout view, boolean enabled) {
+ public static void setItemBackground(Context context, boolean nightMode, View view, boolean enabled) {
Drawable background = AppCompatResources.getDrawable(context, R.drawable.btn_background_inactive_light);
if (background != null && enabled) {
+ int normalColorId = view instanceof CardView
+ ? getActiveTransparentColorId(nightMode) : getInactiveButtonColorId(nightMode);
ColorStateList iconColorStateList = AndroidUtils.createPressedColorStateList(
- context, getInactiveButtonColorId(nightMode), getActiveButtonColorId(nightMode)
+ context, normalColorId, getActiveTextColorId(nightMode)
);
DrawableCompat.setTintList(background, iconColorStateList);
+ if (view instanceof CardView) {
+ ((CardView) view).setCardBackgroundColor(iconColorStateList);
+ return;
+ }
} else {
UiUtilities.tintDrawable(background, ContextCompat.getColor(context, getInactiveButtonColorId(nightMode)));
}
view.setBackgroundDrawable(background);
}
- public static void setShowOnMapBackground(LinearLayout view, Context context, boolean checked, boolean nightMode) {
- Drawable background = AppCompatResources.getDrawable(context,
- nightMode ? checked ? R.drawable.btn_background_inactive_dark : R.drawable.btn_background_stroked_inactive_dark
- : checked ? R.drawable.btn_background_inactive_light : R.drawable.btn_background_stroked_inactive_light);
- view.setBackgroundDrawable(background);
+ public static void setShowOnMapBackground(View view, boolean checked, boolean nightMode) {
+ int background = checked ? getActiveTransparentBackgroundId(nightMode) : getInactiveStrokedBackgroundId(nightMode);
+ view.setBackgroundResource(background);
}
public static void setTextColor(Context context, TextView tv, boolean enabled, boolean nightMode, ItemType type) {
@@ -638,11 +632,26 @@ public class TripRecordingActiveBottomSheet extends MenuBottomSheetDialogFragmen
return nightMode ? R.color.icon_color_osmand_dark : R.color.icon_color_osmand_light;
}
+ @DrawableRes
+ public static int getActiveTransparentColorId(boolean nightMode) {
+ return nightMode ? R.color.switch_button_active_dark : R.color.switch_button_active_light;
+ }
+
@ColorRes
public static int getPressedColorId(boolean nightMode) {
return nightMode ? R.color.active_buttons_and_links_text_dark : R.color.active_buttons_and_links_text_light;
}
+ @DrawableRes
+ public static int getActiveTransparentBackgroundId(boolean nightMode) {
+ return nightMode ? R.drawable.btn_background_active_transparent_dark : R.drawable.btn_background_active_transparent_light;
+ }
+
+ @DrawableRes
+ public static int getInactiveStrokedBackgroundId(boolean nightMode) {
+ return nightMode ? R.drawable.btn_background_stroked_inactive_dark : R.drawable.btn_background_stroked_inactive_light;
+ }
+
@Override
protected int getDismissButtonHeight() {
return getResources().getDimensionPixelSize(R.dimen.bottom_sheet_cancel_button_height);
diff --git a/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingBottomSheet.java b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingBottomSheet.java
deleted file mode 100644
index bbaf9295f7..0000000000
--- a/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingBottomSheet.java
+++ /dev/null
@@ -1,306 +0,0 @@
-package net.osmand.plus.monitoring;
-
-import android.app.Activity;
-import android.app.Dialog;
-import android.content.Context;
-import android.graphics.Typeface;
-import android.graphics.drawable.Drawable;
-import android.os.Bundle;
-import android.text.SpannableString;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.CompoundButton;
-import android.widget.CompoundButton.OnCheckedChangeListener;
-import android.widget.ImageView;
-import android.widget.LinearLayout;
-import android.widget.TextView;
-
-import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
-import androidx.appcompat.widget.SwitchCompat;
-import androidx.core.content.ContextCompat;
-import androidx.fragment.app.FragmentManager;
-
-import com.google.android.material.slider.RangeSlider;
-
-import net.osmand.AndroidUtils;
-import net.osmand.plus.GpxSelectionHelper.SelectedGpxFile;
-import net.osmand.plus.NavigationService;
-import net.osmand.plus.OsmandApplication;
-import net.osmand.plus.R;
-import net.osmand.plus.UiUtilities;
-import net.osmand.plus.UiUtilities.DialogButtonType;
-import net.osmand.plus.activities.MapActivity;
-import net.osmand.plus.activities.SavingTrackHelper;
-import net.osmand.plus.base.MenuBottomSheetDialogFragment;
-import net.osmand.plus.base.bottomsheetmenu.BottomSheetItemWithDescription;
-import net.osmand.plus.helpers.AndroidUiHelper;
-import net.osmand.plus.helpers.FontCache;
-import net.osmand.plus.settings.backend.OsmandSettings;
-import net.osmand.plus.track.TrackAppearanceFragment;
-
-import static net.osmand.plus.UiUtilities.CompoundButtonType.PROFILE_DEPENDENT;
-import static net.osmand.plus.monitoring.OsmandMonitoringPlugin.MINUTES;
-import static net.osmand.plus.monitoring.OsmandMonitoringPlugin.SECONDS;
-
-public class TripRecordingBottomSheet extends MenuBottomSheetDialogFragment {
-
- public static final String TAG = TripRecordingBottomSheet.class.getSimpleName();
-
- private OsmandApplication app;
- private OsmandSettings settings;
-
- private ImageView upDownBtn;
- private SwitchCompat confirmEveryRun;
- private TextView intervalValueView;
- private LinearLayout container;
- private View divider;
- private boolean infoExpanded;
-
- @Override
- public void createMenuItems(Bundle savedInstanceState) {
- app = requiredMyApplication();
- settings = app.getSettings();
- Context context = requireContext();
-
- LayoutInflater inflater = UiUtilities.getInflater(context, nightMode);
- View itemView = inflater.inflate(R.layout.trip_recording_fragment, null, false);
- items.add(new BottomSheetItemWithDescription.Builder()
- .setCustomView(itemView)
- .create());
-
- final int paddingSmall = getResources().getDimensionPixelSize(R.dimen.content_padding_small);
-
- LinearLayout showTrackOnMapView = itemView.findViewById(R.id.show_track_on_map);
- TextView showTrackOnMapTitle = showTrackOnMapView.findViewById(R.id.title);
- showTrackOnMapTitle.setText(R.string.show_track_on_map);
-
- ImageView trackAppearanceIcon = showTrackOnMapView.findViewById(R.id.icon_after_divider);
-
- int color = settings.CURRENT_TRACK_COLOR.get();
- String width = settings.CURRENT_TRACK_WIDTH.get();
- boolean showArrows = settings.CURRENT_TRACK_SHOW_ARROWS.get();
- Drawable drawable = TrackAppearanceFragment.getTrackIcon(app, width, showArrows, color);
-
- trackAppearanceIcon.setImageDrawable(drawable);
- trackAppearanceIcon.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- MapActivity mapActivity = getMapActivity();
- if (mapActivity != null) {
- hide();
- SelectedGpxFile selectedGpxFile = app.getSavingTrackHelper().getCurrentTrack();
- TrackAppearanceFragment.showInstance(mapActivity, selectedGpxFile, TripRecordingBottomSheet.this);
- }
- }
- });
-
- divider = itemView.findViewById(R.id.second_divider);
- LinearLayout expandHideIntervalContainer = itemView.findViewById(R.id.interval_view_container);
- upDownBtn = itemView.findViewById(R.id.up_down_button);
- expandHideIntervalContainer.setOnClickListener(new View.OnClickListener() {
-
- @Override
- public void onClick(View v) {
- toggleInfoView();
- }
- });
-
- final int secondsLength = SECONDS.length;
- final int minutesLength = MINUTES.length;
-
- intervalValueView = itemView.findViewById(R.id.interval_value);
- updateIntervalLegend();
-
- container = itemView.findViewById(R.id.always_ask_and_range_slider_container);
- RangeSlider intervalSlider = itemView.findViewById(R.id.interval_slider);
- intervalSlider.setValueTo(secondsLength + minutesLength - 1);
- int currentModeColor = app.getSettings().getApplicationMode().getProfileColor(nightMode);
- UiUtilities.setupSlider(intervalSlider, nightMode, currentModeColor, true);
- container.setVisibility(View.GONE);
- intervalSlider.addOnChangeListener(new RangeSlider.OnChangeListener() {
-
- @Override
- public void onValueChange(@NonNull RangeSlider slider, float value, boolean fromUser) {
- int progress = (int) value;
- if (progress == 0) {
- settings.SAVE_GLOBAL_TRACK_INTERVAL.set(0);
- } else if (progress < secondsLength) {
- settings.SAVE_GLOBAL_TRACK_INTERVAL.set(SECONDS[progress] * 1000);
- } else {
- settings.SAVE_GLOBAL_TRACK_INTERVAL.set(MINUTES[progress - secondsLength] * 60 * 1000);
- }
- updateIntervalLegend();
- }
- });
-
- for (int i = 0; i < secondsLength + minutesLength; i++) {
- if (i < secondsLength) {
- if (settings.SAVE_GLOBAL_TRACK_INTERVAL.get() <= SECONDS[i] * 1000) {
- intervalSlider.setValues((float) i);
- break;
- }
- } else {
- if (settings.SAVE_GLOBAL_TRACK_INTERVAL.get() <= MINUTES[i - secondsLength] * 1000 * 60) {
- intervalSlider.setValues((float) i);
- break;
- }
- }
- }
- boolean checked = !settings.SAVE_GLOBAL_TRACK_REMEMBER.get();
- confirmEveryRun = itemView.findViewById(R.id.confirm_every_run);
- confirmEveryRun.setChecked(checked);
- setBackgroundAndPadding(checked, paddingSmall);
- confirmEveryRun.setOnCheckedChangeListener(new OnCheckedChangeListener() {
- @Override
- public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
- setBackgroundAndPadding(isChecked, paddingSmall);
- settings.SAVE_GLOBAL_TRACK_REMEMBER.set(!isChecked);
- }
- });
-
- final SwitchCompat showTrackOnMapButton = showTrackOnMapView.findViewById(R.id.switch_button);
- showTrackOnMapButton.setChecked(app.getSelectedGpxHelper().getSelectedCurrentRecordingTrack() != null);
- View basicItem = itemView.findViewById(R.id.basic_item_body);
- basicItem.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- boolean checked = !showTrackOnMapButton.isChecked();
- showTrackOnMapButton.setChecked(checked);
- app.getSelectedGpxHelper().selectGpxFile(app.getSavingTrackHelper().getCurrentGpx(), checked, false);
- }
- });
- UiUtilities.setupCompoundButton(showTrackOnMapButton, nightMode, PROFILE_DEPENDENT);
-
- updateUpDownBtn();
- }
-
- private void updateIntervalLegend() {
- String text = getString(R.string.save_track_interval_globally);
- String textValue;
- int interval = settings.SAVE_GLOBAL_TRACK_INTERVAL.get();
- if (interval == 0) {
- textValue = getString(R.string.int_continuosly);
- } else {
- int seconds = interval / 1000;
- if (seconds <= SECONDS[SECONDS.length - 1]) {
- textValue = seconds + " " + getString(R.string.int_seconds);
- } else {
- textValue = (seconds / 60) + " " + getString(R.string.int_min);
- }
- }
- String textAll = getString(R.string.ltr_or_rtl_combine_via_colon, text, textValue);
- Typeface typeface = FontCache.getRobotoMedium(app);
- SpannableString spannableString = UiUtilities.createCustomFontSpannable(typeface, textAll, textValue);
- intervalValueView.setText(spannableString);
- }
-
- public void show() {
- Dialog dialog = getDialog();
- if (dialog != null) {
- dialog.show();
- }
- }
-
- public void hide() {
- Dialog dialog = getDialog();
- if (dialog != null) {
- dialog.hide();
- }
- }
-
- private void setBackgroundAndPadding(boolean isChecked, int paddingSmall) {
- if (nightMode) {
- confirmEveryRun.setBackgroundResource(
- isChecked ? R.drawable.layout_bg_dark_solid : R.drawable.layout_bg_dark);
- } else {
- confirmEveryRun.setBackgroundResource(
- isChecked ? R.drawable.layout_bg_solid : R.drawable.layout_bg);
- }
- confirmEveryRun.setPadding(paddingSmall, 0, paddingSmall, 0);
- }
-
- private void updateUpDownBtn() {
- int iconId = infoExpanded ? R.drawable.ic_action_arrow_down : R.drawable.ic_action_arrow_up;
- upDownBtn.setImageDrawable(getContentIcon(iconId));
- }
-
- private void toggleInfoView() {
- infoExpanded = !infoExpanded;
- ViewGroup.MarginLayoutParams marginParams = (ViewGroup.MarginLayoutParams) divider.getLayoutParams();
- final int dp8 = AndroidUtils.dpToPx(app, 8f);
- final int dp16 = AndroidUtils.dpToPx(app, 16f);
- if (infoExpanded) {
- AndroidUtils.setMargins(marginParams, 0, dp16, 0, dp8);
- } else {
- AndroidUtils.setMargins(marginParams, 0, 0, 0, dp8);
- }
- AndroidUiHelper.updateVisibility(container, infoExpanded);
- updateUpDownBtn();
- }
-
- @Override
- protected boolean useVerticalButtons() {
- return true;
- }
-
- @Override
- protected int getRightButtonHeight() {
- return getResources().getDimensionPixelSize(R.dimen.bottom_sheet_cancel_button_height);
- }
-
- @Override
- protected int getDismissButtonHeight() {
- return getResources().getDimensionPixelSize(R.dimen.bottom_sheet_cancel_button_height);
- }
-
- @Override
- protected int getRightBottomButtonTextId() {
- return R.string.start_recording;
- }
-
- @Override
- protected int getDismissButtonTextId() {
- return R.string.shared_string_cancel;
- }
-
- @Override
- protected DialogButtonType getRightBottomButtonType() {
- return DialogButtonType.PRIMARY;
- }
-
- @Override
- public int getSecondDividerHeight() {
- return getResources().getDimensionPixelSize(R.dimen.bottom_sheet_icon_margin);
- }
-
- @Override
- protected void onRightBottomButtonClick() {
- SavingTrackHelper helper = app.getSavingTrackHelper();
- helper.startNewSegment();
- settings.SAVE_GLOBAL_TRACK_TO_GPX.set(true);
- app.startNavigationService(NavigationService.USED_BY_GPX);
- MapActivity mapActivity = getMapActivity();
- if (mapActivity != null) {
- TripRecordingActiveBottomSheet.showInstance(mapActivity.getSupportFragmentManager(), helper.getCurrentTrack());
- }
- dismiss();
- }
-
- @Nullable
- public MapActivity getMapActivity() {
- Activity activity = getActivity();
- if (activity instanceof MapActivity) {
- return (MapActivity) activity;
- }
- return null;
- }
-
- public static void showInstance(@NonNull FragmentManager fragmentManager) {
- if (!fragmentManager.isStateSaved()) {
- TripRecordingBottomSheet fragment = new TripRecordingBottomSheet();
- fragment.show(fragmentManager, TAG);
- }
- }
-}
\ No newline at end of file
diff --git a/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingStartingBottomSheet.java b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingStartingBottomSheet.java
new file mode 100644
index 0000000000..7f19ea13fb
--- /dev/null
+++ b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingStartingBottomSheet.java
@@ -0,0 +1,314 @@
+package net.osmand.plus.monitoring;
+
+import android.app.Activity;
+import android.app.Dialog;
+import android.content.Context;
+import android.graphics.Typeface;
+import android.os.Build;
+import android.os.Bundle;
+import android.text.SpannableString;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.widget.CompoundButton;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.appcompat.widget.AppCompatImageView;
+import androidx.appcompat.widget.SwitchCompat;
+import androidx.cardview.widget.CardView;
+import androidx.fragment.app.FragmentManager;
+
+import com.google.android.material.slider.RangeSlider;
+
+import net.osmand.plus.GpxSelectionHelper.SelectedGpxFile;
+import net.osmand.plus.NavigationService;
+import net.osmand.plus.OsmandApplication;
+import net.osmand.plus.R;
+import net.osmand.plus.UiUtilities;
+import net.osmand.plus.activities.MapActivity;
+import net.osmand.plus.activities.SavingTrackHelper;
+import net.osmand.plus.base.MenuBottomSheetDialogFragment;
+import net.osmand.plus.base.bottomsheetmenu.BaseBottomSheetItem;
+import net.osmand.plus.helpers.AndroidUiHelper;
+import net.osmand.plus.helpers.FontCache;
+import net.osmand.plus.monitoring.TripRecordingActiveBottomSheet.ItemType;
+import net.osmand.plus.settings.backend.OsmandSettings;
+import net.osmand.plus.settings.fragments.BaseSettingsFragment;
+import net.osmand.plus.settings.fragments.BaseSettingsFragment.SettingsScreenType;
+import net.osmand.plus.track.TrackAppearanceFragment;
+
+import static net.osmand.plus.UiUtilities.CompoundButtonType.GLOBAL;
+import static net.osmand.plus.monitoring.OsmandMonitoringPlugin.MINUTES;
+import static net.osmand.plus.monitoring.OsmandMonitoringPlugin.SECONDS;
+import static net.osmand.plus.monitoring.TripRecordingActiveBottomSheet.UPDATE_TRACK_ICON;
+import static net.osmand.plus.monitoring.TripRecordingActiveBottomSheet.createItem;
+import static net.osmand.plus.monitoring.TripRecordingActiveBottomSheet.setShowOnMapBackground;
+import static net.osmand.plus.monitoring.TripRecordingActiveBottomSheet.updateTrackIcon;
+
+public class TripRecordingStartingBottomSheet extends MenuBottomSheetDialogFragment {
+
+ public static final String TAG = TripRecordingStartingBottomSheet.class.getSimpleName();
+ public static final String UPDATE_LOGGING_INTERVAL = "update_logging_interval";
+
+ private OsmandApplication app;
+ private OsmandSettings settings;
+
+ private AppCompatImageView upDownBtn;
+ private AppCompatImageView trackAppearanceIcon;
+ private CardView confirmContainer;
+ private SwitchCompat confirmCompound;
+ private TextView intervalValueView;
+ private LinearLayout intervalContainer;
+ private RangeSlider intervalSlider;
+
+ private boolean infoExpanded;
+
+ public static void showInstance(@NonNull FragmentManager fragmentManager) {
+ if (!fragmentManager.isStateSaved()) {
+ TripRecordingStartingBottomSheet fragment = new TripRecordingStartingBottomSheet();
+ fragment.show(fragmentManager, TAG);
+ }
+ }
+
+ @Override
+ public void createMenuItems(Bundle savedInstanceState) {
+ app = requiredMyApplication();
+ settings = app.getSettings();
+ Context context = requireContext();
+
+ LayoutInflater inflater = UiUtilities.getInflater(context, nightMode);
+ View itemView = inflater.inflate(R.layout.trip_recording_starting_fragment, null, false);
+ items.add(new BaseBottomSheetItem.Builder()
+ .setCustomView(itemView)
+ .create());
+
+ LinearLayout expandHideIntervalContainer = itemView.findViewById(R.id.interval_view_container);
+ upDownBtn = itemView.findViewById(R.id.up_down_button);
+ expandHideIntervalContainer.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ updateIntervalContainer();
+ }
+ });
+
+ intervalValueView = itemView.findViewById(R.id.interval_value);
+ intervalContainer = itemView.findViewById(R.id.always_ask_and_range_slider_container);
+ intervalSlider = itemView.findViewById(R.id.interval_slider);
+ updateIntervalValue();
+
+ confirmContainer = itemView.findViewById(R.id.confirm_container);
+ confirmCompound = confirmContainer.findViewById(R.id.confirm_compound_button);
+ updateGlobalRemember();
+ confirmContainer.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ boolean checked = !confirmCompound.isChecked();
+ confirmCompound.setChecked(checked);
+ settings.SAVE_GLOBAL_TRACK_REMEMBER.set(checked);
+ setShowOnMapBackground(confirmContainer, checked, nightMode);
+ }
+ });
+
+ LinearLayout showTrackContainer = itemView.findViewById(R.id.show_track_on_map);
+
+ final CardView buttonShow = itemView.findViewById(R.id.compound_container);
+ TextView showTrackTitle = buttonShow.findViewById(R.id.title);
+ showTrackTitle.setText(R.string.show_track_on_map);
+ final CompoundButton showTrackCompound = buttonShow.findViewById(R.id.compound_button);
+ showTrackCompound.setChecked(app.getSelectedGpxHelper().getSelectedCurrentRecordingTrack() != null);
+ UiUtilities.setupCompoundButton(showTrackCompound, nightMode, GLOBAL);
+
+ LinearLayout buttonAppearance = showTrackContainer.findViewById(R.id.additional_button);
+ trackAppearanceIcon = showTrackContainer.findViewById(R.id.additional_button_icon);
+ updateTrackIcon(app, trackAppearanceIcon);
+ buttonAppearance.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ MapActivity mapActivity = getMapActivity();
+ if (mapActivity != null) {
+ hide();
+ SelectedGpxFile selectedGpxFile = app.getSavingTrackHelper().getCurrentTrack();
+ TrackAppearanceFragment.showInstance(mapActivity, selectedGpxFile, TripRecordingStartingBottomSheet.this);
+ }
+ }
+ });
+ setShowOnMapBackground(buttonShow, showTrackCompound.isChecked(), nightMode);
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
+ buttonShow.setBackgroundTintList(null);
+ }
+ buttonShow.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ boolean checked = !showTrackCompound.isChecked();
+ showTrackCompound.setChecked(checked);
+ app.getSelectedGpxHelper().selectGpxFile(app.getSavingTrackHelper().getCurrentGpx(), checked, false);
+ setShowOnMapBackground(buttonShow, checked, nightMode);
+ }
+ });
+
+ updateUpDownBtn();
+
+ CardView cardLeft = itemView.findViewById(R.id.button_left);
+ createItem(app, nightMode, cardLeft, ItemType.CANCEL, true, null);
+ cardLeft.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ dismiss();
+ }
+ });
+
+ CardView cardCenter = itemView.findViewById(R.id.button_center);
+ createItem(app, nightMode, cardCenter, ItemType.START_RECORDING, true, null);
+ cardCenter.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ startRecording();
+ }
+ });
+
+ CardView cardRight = itemView.findViewById(R.id.button_right);
+ createItem(app, nightMode, cardRight, ItemType.SETTINGS, true, null);
+ cardRight.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ MapActivity mapActivity = getMapActivity();
+ if (mapActivity != null) {
+ hide();
+ BaseSettingsFragment.showInstance(mapActivity, SettingsScreenType.MONITORING_SETTINGS, TripRecordingStartingBottomSheet.this);
+ }
+ }
+ });
+ }
+
+ private void updateIntervalLegend() {
+ String text = getString(R.string.save_track_interval_globally);
+ String textValue;
+ int interval = settings.SAVE_GLOBAL_TRACK_INTERVAL.get();
+ if (interval == 0) {
+ textValue = getString(R.string.int_continuosly);
+ } else {
+ int seconds = interval / 1000;
+ if (seconds <= SECONDS[SECONDS.length - 1]) {
+ textValue = seconds + " " + getString(R.string.int_seconds);
+ } else {
+ textValue = (seconds / 60) + " " + getString(R.string.int_min);
+ }
+ }
+ String textAll = getString(R.string.ltr_or_rtl_combine_via_colon, text, textValue);
+ Typeface typeface = FontCache.getRobotoMedium(app);
+ SpannableString spannableString = UiUtilities.createCustomFontSpannable(typeface, textAll, textValue);
+ intervalValueView.setText(spannableString);
+ }
+
+ private void updateIntervalValue() {
+ if (intervalSlider != null && intervalContainer != null) {
+ updateIntervalLegend();
+ final int secondsLength = SECONDS.length;
+ final int minutesLength = MINUTES.length;
+ intervalSlider.setValueTo(secondsLength + minutesLength - 1);
+ int currentModeColor = app.getSettings().getApplicationMode().getProfileColor(nightMode);
+ UiUtilities.setupSlider(intervalSlider, nightMode, currentModeColor, true);
+ intervalContainer.setVisibility(View.GONE);
+ intervalSlider.addOnChangeListener(new RangeSlider.OnChangeListener() {
+
+ @Override
+ public void onValueChange(@NonNull RangeSlider slider, float value, boolean fromUser) {
+ int progress = (int) value;
+ if (progress == 0) {
+ settings.SAVE_GLOBAL_TRACK_INTERVAL.set(0);
+ } else if (progress < secondsLength) {
+ settings.SAVE_GLOBAL_TRACK_INTERVAL.set(SECONDS[progress] * 1000);
+ } else {
+ settings.SAVE_GLOBAL_TRACK_INTERVAL.set(MINUTES[progress - secondsLength] * 60 * 1000);
+ }
+ updateIntervalLegend();
+ }
+ });
+
+ for (int i = 0; i < secondsLength + minutesLength; i++) {
+ if (i < secondsLength) {
+ if (settings.SAVE_GLOBAL_TRACK_INTERVAL.get() <= SECONDS[i] * 1000) {
+ intervalSlider.setValues((float) i);
+ break;
+ }
+ } else {
+ if (settings.SAVE_GLOBAL_TRACK_INTERVAL.get() <= MINUTES[i - secondsLength] * 1000 * 60) {
+ intervalSlider.setValues((float) i);
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ private void updateIntervalContainer() {
+ infoExpanded = !infoExpanded;
+ AndroidUiHelper.updateVisibility(intervalContainer, infoExpanded);
+ updateUpDownBtn();
+ }
+
+ private void updateGlobalRemember() {
+ if (confirmContainer != null && confirmCompound != null) {
+ confirmCompound.setChecked(settings.SAVE_GLOBAL_TRACK_REMEMBER.get());
+ setShowOnMapBackground(confirmContainer, confirmCompound.isChecked(), nightMode);
+ }
+ }
+
+ private void updateUpDownBtn() {
+ int iconId = infoExpanded ? R.drawable.ic_action_arrow_down : R.drawable.ic_action_arrow_up;
+ upDownBtn.setImageDrawable(getContentIcon(iconId));
+ }
+
+ private void startRecording() {
+ SavingTrackHelper helper = app.getSavingTrackHelper();
+ helper.startNewSegment();
+ settings.SAVE_GLOBAL_TRACK_TO_GPX.set(true);
+ app.startNavigationService(NavigationService.USED_BY_GPX);
+ MapActivity mapActivity = getMapActivity();
+ if (mapActivity != null) {
+ TripRecordingActiveBottomSheet.showInstance(mapActivity.getSupportFragmentManager(), helper.getCurrentTrack());
+ }
+ dismiss();
+ }
+
+ public void show(String... keys) {
+ Dialog dialog = getDialog();
+ if (dialog != null) {
+ dialog.show();
+ for (String key : keys) {
+ if (key.equals(UPDATE_TRACK_ICON)) {
+ updateTrackIcon(app, trackAppearanceIcon);
+ }
+ if (key.equals(UPDATE_LOGGING_INTERVAL)) {
+ updateGlobalRemember();
+ updateIntervalValue();
+ AndroidUiHelper.updateVisibility(intervalContainer, infoExpanded);
+ }
+ }
+ }
+ }
+
+ public void hide() {
+ Dialog dialog = getDialog();
+ if (dialog != null) {
+ dialog.hide();
+ }
+ }
+
+ @Nullable
+ public MapActivity getMapActivity() {
+ Activity activity = getActivity();
+ if (activity instanceof MapActivity) {
+ return (MapActivity) activity;
+ }
+ return null;
+ }
+
+ @Override
+ protected boolean hideButtonsContainer() {
+ return true;
+ }
+
+}
diff --git a/OsmAnd/src/net/osmand/plus/settings/fragments/BaseSettingsFragment.java b/OsmAnd/src/net/osmand/plus/settings/fragments/BaseSettingsFragment.java
index e6d39cade8..d71387c0ce 100644
--- a/OsmAnd/src/net/osmand/plus/settings/fragments/BaseSettingsFragment.java
+++ b/OsmAnd/src/net/osmand/plus/settings/fragments/BaseSettingsFragment.java
@@ -61,6 +61,7 @@ import net.osmand.plus.activities.OsmandInAppPurchaseActivity;
import net.osmand.plus.audionotes.MultimediaNotesFragment;
import net.osmand.plus.development.DevelopmentSettingsFragment;
import net.osmand.plus.monitoring.MonitoringSettingsFragment;
+import net.osmand.plus.monitoring.TripRecordingStartingBottomSheet;
import net.osmand.plus.openplacereviews.OprSettingsFragment;
import net.osmand.plus.osmedit.OsmEditingFragment;
import net.osmand.plus.profiles.SelectAppModesBottomSheetDialogFragment;
@@ -85,6 +86,7 @@ import java.io.Serializable;
import java.util.Set;
import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_SETTINGS_ID;
+import static net.osmand.plus.monitoring.TripRecordingStartingBottomSheet.UPDATE_LOGGING_INTERVAL;
public abstract class BaseSettingsFragment extends PreferenceFragmentCompat implements OnPreferenceChangeListener,
OnPreferenceClickListener, AppModeChangedListener, OnConfirmPreferenceChange {
@@ -291,6 +293,15 @@ public abstract class BaseSettingsFragment extends PreferenceFragmentCompat impl
}
}
+ @Override
+ public void onDestroyView() {
+ super.onDestroyView();
+ Fragment target = getTargetFragment();
+ if (target instanceof TripRecordingStartingBottomSheet) {
+ ((TripRecordingStartingBottomSheet) target).show(UPDATE_LOGGING_INTERVAL);
+ }
+ }
+
@Override
public void onDetach() {
super.onDetach();
@@ -884,21 +895,37 @@ public abstract class BaseSettingsFragment extends PreferenceFragmentCompat impl
}
public static boolean showInstance(FragmentActivity activity, SettingsScreenType screenType) {
- return showInstance(activity, screenType, null);
+ return showInstance(activity, screenType, (ApplicationMode) null);
+ }
+
+ public static boolean showInstance(FragmentActivity activity, SettingsScreenType screenType, Fragment target) {
+ return showInstance(activity, screenType, null, target);
}
public static boolean showInstance(FragmentActivity activity, SettingsScreenType screenType, @Nullable ApplicationMode appMode) {
return showInstance(activity, screenType, appMode, new Bundle());
}
+ public static boolean showInstance(FragmentActivity activity, SettingsScreenType screenType, @Nullable ApplicationMode appMode, Fragment target) {
+ return showInstance(activity, screenType, appMode, new Bundle(), target);
+ }
+
public static boolean showInstance(FragmentActivity activity, SettingsScreenType screenType,
@Nullable ApplicationMode appMode, @NonNull Bundle args) {
+ return showInstance(activity, screenType, appMode, args, null);
+ }
+
+ public static boolean showInstance(FragmentActivity activity, SettingsScreenType screenType,
+ @Nullable ApplicationMode appMode, @NonNull Bundle args, @Nullable Fragment target) {
try {
Fragment fragment = Fragment.instantiate(activity, screenType.fragmentName);
if (appMode != null) {
args.putString(APP_MODE_KEY, appMode.getStringKey());
}
fragment.setArguments(args);
+ if (target != null) {
+ fragment.setTargetFragment(target, 0);
+ }
activity.getSupportFragmentManager().beginTransaction()
.replace(R.id.fragmentContainer, fragment, screenType.fragmentName)
.addToBackStack(DRAWER_SETTINGS_ID + ".new")
diff --git a/OsmAnd/src/net/osmand/plus/track/TrackAppearanceFragment.java b/OsmAnd/src/net/osmand/plus/track/TrackAppearanceFragment.java
index f33571bdd6..807becbb1c 100644
--- a/OsmAnd/src/net/osmand/plus/track/TrackAppearanceFragment.java
+++ b/OsmAnd/src/net/osmand/plus/track/TrackAppearanceFragment.java
@@ -37,7 +37,7 @@ import net.osmand.plus.dialogs.GpxAppearanceAdapter.AppearanceListItem;
import net.osmand.plus.dialogs.GpxAppearanceAdapter.GpxAppearanceAdapterType;
import net.osmand.plus.helpers.AndroidUiHelper;
import net.osmand.plus.monitoring.TripRecordingActiveBottomSheet;
-import net.osmand.plus.monitoring.TripRecordingBottomSheet;
+import net.osmand.plus.monitoring.TripRecordingStartingBottomSheet;
import net.osmand.plus.routepreparationmenu.cards.BaseCard;
import net.osmand.plus.routepreparationmenu.cards.BaseCard.CardListener;
import net.osmand.plus.settings.backend.CommonPreference;
@@ -398,8 +398,8 @@ public class TrackAppearanceFragment extends ContextMenuScrollFragment implement
@Override
public void onContextMenuDismiss(@NonNull ContextMenuFragment fragment) {
Fragment target = getTargetFragment();
- if (target instanceof TripRecordingBottomSheet) {
- ((TripRecordingBottomSheet) target).show();
+ if (target instanceof TripRecordingStartingBottomSheet) {
+ ((TripRecordingStartingBottomSheet) target).show(UPDATE_TRACK_ICON);
} else if (target instanceof TripRecordingActiveBottomSheet) {
((TripRecordingActiveBottomSheet) target).show(UPDATE_TRACK_ICON);
}
From a8e1d60af1077e0ebbe8ef89957914d465538f93 Mon Sep 17 00:00:00 2001
From: Skalii
Date: Thu, 18 Mar 2021 02:41:01 +0200
Subject: [PATCH 007/103] fix bottom buttons width; some fixes;
---
...h_switch_divider_and_additional_button.xml | 16 ++--
.../preference_button_with_icon_triple.xml | 8 +-
.../TripRecordingActiveBottomSheet.java | 95 ++++++++++---------
.../TripRecordingStartingBottomSheet.java | 50 +++-------
4 files changed, 73 insertions(+), 96 deletions(-)
diff --git a/OsmAnd/res/layout/bottom_sheet_with_switch_divider_and_additional_button.xml b/OsmAnd/res/layout/bottom_sheet_with_switch_divider_and_additional_button.xml
index a10a9eef42..e7b84c5305 100644
--- a/OsmAnd/res/layout/bottom_sheet_with_switch_divider_and_additional_button.xml
+++ b/OsmAnd/res/layout/bottom_sheet_with_switch_divider_and_additional_button.xml
@@ -66,25 +66,23 @@
+ app:cardElevation="0dp"
+ tools:cardBackgroundColor="?attr/switch_button_active">
-
+ android:background="?android:attr/selectableItemBackground">
-
+
diff --git a/OsmAnd/res/layout/preference_button_with_icon_triple.xml b/OsmAnd/res/layout/preference_button_with_icon_triple.xml
index 22d68ff090..c8905bbd61 100644
--- a/OsmAnd/res/layout/preference_button_with_icon_triple.xml
+++ b/OsmAnd/res/layout/preference_button_with_icon_triple.xml
@@ -1,7 +1,5 @@
@@ -28,7 +26,7 @@
android:layout_height="match_parent"
android:layout_marginStart="@dimen/content_padding_half"
android:layout_marginLeft="@dimen/content_padding_half"
- android:layout_weight="0.5"
+ android:layout_weight="0.8"
android:minWidth="@dimen/button_triple_center_width"
android:minHeight="@dimen/setting_list_item_large_height" />
@@ -39,7 +37,7 @@
android:layout_height="match_parent"
android:layout_marginStart="@dimen/content_padding_half"
android:layout_marginLeft="@dimen/content_padding_half"
- android:layout_weight="0.25"
+ android:layout_weight="0.1"
android:minWidth="@dimen/context_menu_top_right_button_min_width"
android:minHeight="@dimen/setting_list_item_large_height" />
diff --git a/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingActiveBottomSheet.java b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingActiveBottomSheet.java
index 27295899da..7aaa832dd1 100644
--- a/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingActiveBottomSheet.java
+++ b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingActiveBottomSheet.java
@@ -6,7 +6,6 @@ import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.drawable.Drawable;
import android.os.AsyncTask;
-import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.text.format.DateUtils;
@@ -29,6 +28,7 @@ import androidx.cardview.widget.CardView;
import androidx.coordinatorlayout.widget.CoordinatorLayout;
import androidx.core.content.ContextCompat;
import androidx.core.graphics.drawable.DrawableCompat;
+import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.recyclerview.widget.RecyclerView;
@@ -81,7 +81,7 @@ public class TripRecordingActiveBottomSheet extends MenuBottomSheetDialogFragmen
private SelectedGpxFile selectedGpxFile;
private View statusContainer;
- private LinearLayout buttonAppearance;
+ private LinearLayout showTrackContainer;
private AppCompatImageView trackAppearanceIcon;
private View buttonSave;
private GpxBlockStatisticsBuilder blockStatisticsBuilder;
@@ -161,49 +161,15 @@ public class TripRecordingActiveBottomSheet extends MenuBottomSheetDialogFragmen
blockStatisticsBuilder.setBlocksClickable(false);
blockStatisticsBuilder.initStatBlocks(null, ContextCompat.getColor(app, getActiveTextColorId(nightMode)), nightMode);
- LinearLayout showTrackContainer = itemView.findViewById(R.id.show_track_on_map);
-
- final CardView buttonShow = showTrackContainer.findViewById(R.id.compound_container);
- TextView showTrackTitle = buttonShow.findViewById(R.id.title);
- Integer showTitle = ItemType.SHOW_TRACK.getTitleId();
- if (showTitle != null) {
- showTrackTitle.setText(showTitle);
- }
- final CompoundButton showTrackCompound = buttonShow.findViewById(R.id.compound_button);
- showTrackCompound.setChecked(app.getSelectedGpxHelper().getSelectedCurrentRecordingTrack() != null);
- UiUtilities.setupCompoundButton(showTrackCompound, nightMode, GLOBAL);
-
- buttonAppearance = showTrackContainer.findViewById(R.id.additional_button);
+ showTrackContainer = itemView.findViewById(R.id.show_track_on_map);
trackAppearanceIcon = showTrackContainer.findViewById(R.id.additional_button_icon);
- updateTrackIcon(app, trackAppearanceIcon);
- buttonAppearance.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- if (showTrackCompound.isChecked()) {
- MapActivity mapActivity = getMapActivity();
- if (mapActivity != null) {
+ createShowTrackItem(app, getMapActivity(), nightMode, showTrackContainer, trackAppearanceIcon,
+ ItemType.SHOW_TRACK.getTitleId(), TripRecordingActiveBottomSheet.this, new Runnable() {
+ @Override
+ public void run() {
hide();
- SelectedGpxFile selectedGpxFile = app.getSavingTrackHelper().getCurrentTrack();
- TrackAppearanceFragment.showInstance(mapActivity, selectedGpxFile, TripRecordingActiveBottomSheet.this);
}
- }
- }
- });
- createItem(buttonAppearance, ItemType.APPEARANCE, showTrackCompound.isChecked());
- setShowOnMapBackground(buttonShow, showTrackCompound.isChecked(), nightMode);
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
- buttonShow.setBackgroundTintList(null);
- }
- buttonShow.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- boolean checked = !showTrackCompound.isChecked();
- showTrackCompound.setChecked(checked);
- app.getSelectedGpxHelper().selectGpxFile(app.getSavingTrackHelper().getCurrentGpx(), checked, false);
- createItem(buttonAppearance, ItemType.APPEARANCE, checked);
- setShowOnMapBackground(buttonShow, checked, nightMode);
- }
- });
+ });
buttonClear.findViewById(R.id.button_container).setOnClickListener(new View.OnClickListener() {
@Override
@@ -309,6 +275,49 @@ public class TripRecordingActiveBottomSheet extends MenuBottomSheetDialogFragmen
}
}
+ public static void createShowTrackItem(final OsmandApplication app, final MapActivity mapActivity,
+ final boolean nightMode, LinearLayout showTrackContainer,
+ AppCompatImageView trackAppearanceIcon, Integer showTrackId,
+ final Fragment target, final Runnable hideOnClickButtonAppearance) {
+ final CardView buttonShowTrack = showTrackContainer.findViewById(R.id.compound_container);
+ final CardView buttonAppearance = showTrackContainer.findViewById(R.id.additional_button_container);
+
+ TextView showTrackTextView = buttonShowTrack.findViewById(R.id.title);
+ if (showTrackId != null) {
+ showTrackTextView.setText(showTrackId);
+ }
+ final CompoundButton showTrackCompound = buttonShowTrack.findViewById(R.id.compound_button);
+ showTrackCompound.setChecked(app.getSelectedGpxHelper().getSelectedCurrentRecordingTrack() != null);
+ UiUtilities.setupCompoundButton(showTrackCompound, nightMode, GLOBAL);
+
+ setShowOnMapBackground(buttonShowTrack, showTrackCompound.isChecked(), nightMode);
+ buttonShowTrack.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ boolean checked = !showTrackCompound.isChecked();
+ showTrackCompound.setChecked(checked);
+ app.getSelectedGpxHelper().selectGpxFile(app.getSavingTrackHelper().getCurrentGpx(), checked, false);
+ setShowOnMapBackground(buttonShowTrack, checked, nightMode);
+ createItem(app, nightMode, buttonAppearance, ItemType.APPEARANCE, checked, null);
+ }
+ });
+
+ updateTrackIcon(app, trackAppearanceIcon);
+ createItem(app, nightMode, buttonAppearance, ItemType.APPEARANCE, showTrackCompound.isChecked(), null);
+ buttonAppearance.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ if (showTrackCompound.isChecked()) {
+ if (mapActivity != null) {
+ hideOnClickButtonAppearance.run();
+ SelectedGpxFile selectedGpxFile = app.getSavingTrackHelper().getCurrentTrack();
+ TrackAppearanceFragment.showInstance(mapActivity, selectedGpxFile, target);
+ }
+ }
+ }
+ });
+ }
+
private void createItem(View view, ItemType type, boolean enabled) {
createItem(app, nightMode, view, type, enabled, null);
}
@@ -558,11 +567,11 @@ public class TripRecordingActiveBottomSheet extends MenuBottomSheetDialogFragmen
ColorStateList iconColorStateList = AndroidUtils.createPressedColorStateList(
context, normalColorId, getActiveTextColorId(nightMode)
);
- DrawableCompat.setTintList(background, iconColorStateList);
if (view instanceof CardView) {
((CardView) view).setCardBackgroundColor(iconColorStateList);
return;
}
+ DrawableCompat.setTintList(background, iconColorStateList);
} else {
UiUtilities.tintDrawable(background, ContextCompat.getColor(context, getInactiveButtonColorId(nightMode)));
}
diff --git a/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingStartingBottomSheet.java b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingStartingBottomSheet.java
index 7f19ea13fb..c03a568137 100644
--- a/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingStartingBottomSheet.java
+++ b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingStartingBottomSheet.java
@@ -4,12 +4,10 @@ import android.app.Activity;
import android.app.Dialog;
import android.content.Context;
import android.graphics.Typeface;
-import android.os.Build;
import android.os.Bundle;
import android.text.SpannableString;
import android.view.LayoutInflater;
import android.view.View;
-import android.widget.CompoundButton;
import android.widget.LinearLayout;
import android.widget.TextView;
@@ -22,7 +20,6 @@ import androidx.fragment.app.FragmentManager;
import com.google.android.material.slider.RangeSlider;
-import net.osmand.plus.GpxSelectionHelper.SelectedGpxFile;
import net.osmand.plus.NavigationService;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R;
@@ -37,13 +34,13 @@ import net.osmand.plus.monitoring.TripRecordingActiveBottomSheet.ItemType;
import net.osmand.plus.settings.backend.OsmandSettings;
import net.osmand.plus.settings.fragments.BaseSettingsFragment;
import net.osmand.plus.settings.fragments.BaseSettingsFragment.SettingsScreenType;
-import net.osmand.plus.track.TrackAppearanceFragment;
import static net.osmand.plus.UiUtilities.CompoundButtonType.GLOBAL;
import static net.osmand.plus.monitoring.OsmandMonitoringPlugin.MINUTES;
import static net.osmand.plus.monitoring.OsmandMonitoringPlugin.SECONDS;
import static net.osmand.plus.monitoring.TripRecordingActiveBottomSheet.UPDATE_TRACK_ICON;
import static net.osmand.plus.monitoring.TripRecordingActiveBottomSheet.createItem;
+import static net.osmand.plus.monitoring.TripRecordingActiveBottomSheet.createShowTrackItem;
import static net.osmand.plus.monitoring.TripRecordingActiveBottomSheet.setShowOnMapBackground;
import static net.osmand.plus.monitoring.TripRecordingActiveBottomSheet.updateTrackIcon;
@@ -60,6 +57,7 @@ public class TripRecordingStartingBottomSheet extends MenuBottomSheetDialogFragm
private CardView confirmContainer;
private SwitchCompat confirmCompound;
private TextView intervalValueView;
+ private LinearLayout showTrackContainer;
private LinearLayout intervalContainer;
private RangeSlider intervalSlider;
@@ -100,6 +98,7 @@ public class TripRecordingStartingBottomSheet extends MenuBottomSheetDialogFragm
confirmContainer = itemView.findViewById(R.id.confirm_container);
confirmCompound = confirmContainer.findViewById(R.id.confirm_compound_button);
+ UiUtilities.setupCompoundButton(confirmCompound, nightMode, GLOBAL);
updateGlobalRemember();
confirmContainer.setOnClickListener(new View.OnClickListener() {
@Override
@@ -111,42 +110,15 @@ public class TripRecordingStartingBottomSheet extends MenuBottomSheetDialogFragm
}
});
- LinearLayout showTrackContainer = itemView.findViewById(R.id.show_track_on_map);
-
- final CardView buttonShow = itemView.findViewById(R.id.compound_container);
- TextView showTrackTitle = buttonShow.findViewById(R.id.title);
- showTrackTitle.setText(R.string.show_track_on_map);
- final CompoundButton showTrackCompound = buttonShow.findViewById(R.id.compound_button);
- showTrackCompound.setChecked(app.getSelectedGpxHelper().getSelectedCurrentRecordingTrack() != null);
- UiUtilities.setupCompoundButton(showTrackCompound, nightMode, GLOBAL);
-
- LinearLayout buttonAppearance = showTrackContainer.findViewById(R.id.additional_button);
+ showTrackContainer = itemView.findViewById(R.id.show_track_on_map);
trackAppearanceIcon = showTrackContainer.findViewById(R.id.additional_button_icon);
- updateTrackIcon(app, trackAppearanceIcon);
- buttonAppearance.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- MapActivity mapActivity = getMapActivity();
- if (mapActivity != null) {
- hide();
- SelectedGpxFile selectedGpxFile = app.getSavingTrackHelper().getCurrentTrack();
- TrackAppearanceFragment.showInstance(mapActivity, selectedGpxFile, TripRecordingStartingBottomSheet.this);
- }
- }
- });
- setShowOnMapBackground(buttonShow, showTrackCompound.isChecked(), nightMode);
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
- buttonShow.setBackgroundTintList(null);
- }
- buttonShow.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- boolean checked = !showTrackCompound.isChecked();
- showTrackCompound.setChecked(checked);
- app.getSelectedGpxHelper().selectGpxFile(app.getSavingTrackHelper().getCurrentGpx(), checked, false);
- setShowOnMapBackground(buttonShow, checked, nightMode);
- }
- });
+ createShowTrackItem(app, getMapActivity(), nightMode, showTrackContainer, trackAppearanceIcon,
+ R.string.show_track_on_map, TripRecordingStartingBottomSheet.this, new Runnable() {
+ @Override
+ public void run() {
+ hide();
+ }
+ });
updateUpDownBtn();
From c7fa20cc69f6ce5aae10208e97fc524628304545 Mon Sep 17 00:00:00 2001
From: Skalii
Date: Fri, 19 Mar 2021 14:30:56 +0200
Subject: [PATCH 008/103] remove confirm toggle; fix dialog title;
---
.../trip_recording_starting_fragment.xml | 49 +------------------
.../TripRecordingStartingBottomSheet.java | 29 +----------
2 files changed, 3 insertions(+), 75 deletions(-)
diff --git a/OsmAnd/res/layout/trip_recording_starting_fragment.xml b/OsmAnd/res/layout/trip_recording_starting_fragment.xml
index 809cc015ac..3c76b1e050 100644
--- a/OsmAnd/res/layout/trip_recording_starting_fragment.xml
+++ b/OsmAnd/res/layout/trip_recording_starting_fragment.xml
@@ -92,55 +92,10 @@
app:trackHeight="@dimen/slider_track_height"
tools:visibility="visible" />
-
-
-
-
-
-
-
-
-
-
-
-
@@ -149,7 +104,7 @@
+ android:layout_height="@dimen/context_menu_first_line_top_margin" />
diff --git a/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingStartingBottomSheet.java b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingStartingBottomSheet.java
index c03a568137..c8c96d1323 100644
--- a/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingStartingBottomSheet.java
+++ b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingStartingBottomSheet.java
@@ -14,7 +14,6 @@ import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.widget.AppCompatImageView;
-import androidx.appcompat.widget.SwitchCompat;
import androidx.cardview.widget.CardView;
import androidx.fragment.app.FragmentManager;
@@ -35,13 +34,11 @@ import net.osmand.plus.settings.backend.OsmandSettings;
import net.osmand.plus.settings.fragments.BaseSettingsFragment;
import net.osmand.plus.settings.fragments.BaseSettingsFragment.SettingsScreenType;
-import static net.osmand.plus.UiUtilities.CompoundButtonType.GLOBAL;
import static net.osmand.plus.monitoring.OsmandMonitoringPlugin.MINUTES;
import static net.osmand.plus.monitoring.OsmandMonitoringPlugin.SECONDS;
import static net.osmand.plus.monitoring.TripRecordingActiveBottomSheet.UPDATE_TRACK_ICON;
import static net.osmand.plus.monitoring.TripRecordingActiveBottomSheet.createItem;
import static net.osmand.plus.monitoring.TripRecordingActiveBottomSheet.createShowTrackItem;
-import static net.osmand.plus.monitoring.TripRecordingActiveBottomSheet.setShowOnMapBackground;
import static net.osmand.plus.monitoring.TripRecordingActiveBottomSheet.updateTrackIcon;
public class TripRecordingStartingBottomSheet extends MenuBottomSheetDialogFragment {
@@ -54,8 +51,6 @@ public class TripRecordingStartingBottomSheet extends MenuBottomSheetDialogFragm
private AppCompatImageView upDownBtn;
private AppCompatImageView trackAppearanceIcon;
- private CardView confirmContainer;
- private SwitchCompat confirmCompound;
private TextView intervalValueView;
private LinearLayout showTrackContainer;
private LinearLayout intervalContainer;
@@ -96,24 +91,10 @@ public class TripRecordingStartingBottomSheet extends MenuBottomSheetDialogFragm
intervalSlider = itemView.findViewById(R.id.interval_slider);
updateIntervalValue();
- confirmContainer = itemView.findViewById(R.id.confirm_container);
- confirmCompound = confirmContainer.findViewById(R.id.confirm_compound_button);
- UiUtilities.setupCompoundButton(confirmCompound, nightMode, GLOBAL);
- updateGlobalRemember();
- confirmContainer.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- boolean checked = !confirmCompound.isChecked();
- confirmCompound.setChecked(checked);
- settings.SAVE_GLOBAL_TRACK_REMEMBER.set(checked);
- setShowOnMapBackground(confirmContainer, checked, nightMode);
- }
- });
-
showTrackContainer = itemView.findViewById(R.id.show_track_on_map);
trackAppearanceIcon = showTrackContainer.findViewById(R.id.additional_button_icon);
createShowTrackItem(app, getMapActivity(), nightMode, showTrackContainer, trackAppearanceIcon,
- R.string.show_track_on_map, TripRecordingStartingBottomSheet.this, new Runnable() {
+ R.string.shared_string_show_on_map, TripRecordingStartingBottomSheet.this, new Runnable() {
@Override
public void run() {
hide();
@@ -221,13 +202,6 @@ public class TripRecordingStartingBottomSheet extends MenuBottomSheetDialogFragm
updateUpDownBtn();
}
- private void updateGlobalRemember() {
- if (confirmContainer != null && confirmCompound != null) {
- confirmCompound.setChecked(settings.SAVE_GLOBAL_TRACK_REMEMBER.get());
- setShowOnMapBackground(confirmContainer, confirmCompound.isChecked(), nightMode);
- }
- }
-
private void updateUpDownBtn() {
int iconId = infoExpanded ? R.drawable.ic_action_arrow_down : R.drawable.ic_action_arrow_up;
upDownBtn.setImageDrawable(getContentIcon(iconId));
@@ -254,7 +228,6 @@ public class TripRecordingStartingBottomSheet extends MenuBottomSheetDialogFragm
updateTrackIcon(app, trackAppearanceIcon);
}
if (key.equals(UPDATE_LOGGING_INTERVAL)) {
- updateGlobalRemember();
updateIntervalValue();
AndroidUiHelper.updateVisibility(intervalContainer, infoExpanded);
}
From 94c58edb7c0206b400a6773854cbde24a272670e Mon Sep 17 00:00:00 2001
From: Skalii
Date: Fri, 19 Mar 2021 14:57:55 +0200
Subject: [PATCH 009/103] redesign trip recording dialog; add options dialog;
---
.../layout/bottom_sheet_button_with_icon.xml | 8 +-
.../layout/trip_recording_active_fragment.xml | 172 -------
OsmAnd/res/layout/trip_recording_fragment.xml | 91 ++++
OsmAnd/res/values/strings.xml | 2 +
.../osmand/plus/activities/MapActivity.java | 6 +-
.../plus/activities/MapActivityActions.java | 8 +-
.../liveupdates/LiveUpdatesFragmentNew.java | 6 +-
.../monitoring/OsmandMonitoringPlugin.java | 54 ++-
....java => TripRecordingBottomFragment.java} | 442 +++++++-----------
...TripRecordingClearDataBottomFragment.java} | 33 +-
...> TripRecordingDiscardBottomFragment.java} | 81 +---
.../TripRecordingOptionsBottomFragment.java | 350 ++++++++++++++
... TripRecordingStartingBottomFragment.java} | 28 +-
.../BooleanPreferenceBottomSheet.java | 4 +-
.../fragments/BaseSettingsFragment.java | 8 +-
.../plus/track/TrackAppearanceFragment.java | 14 +-
16 files changed, 728 insertions(+), 579 deletions(-)
delete mode 100644 OsmAnd/res/layout/trip_recording_active_fragment.xml
create mode 100644 OsmAnd/res/layout/trip_recording_fragment.xml
rename OsmAnd/src/net/osmand/plus/monitoring/{TripRecordingActiveBottomSheet.java => TripRecordingBottomFragment.java} (65%)
rename OsmAnd/src/net/osmand/plus/monitoring/{ClearRecordedDataBottomSheetFragment.java => TripRecordingClearDataBottomFragment.java} (71%)
rename OsmAnd/src/net/osmand/plus/monitoring/{StopTrackRecordingBottomFragment.java => TripRecordingDiscardBottomFragment.java} (50%)
create mode 100644 OsmAnd/src/net/osmand/plus/monitoring/TripRecordingOptionsBottomFragment.java
rename OsmAnd/src/net/osmand/plus/monitoring/{TripRecordingStartingBottomSheet.java => TripRecordingStartingBottomFragment.java} (88%)
diff --git a/OsmAnd/res/layout/bottom_sheet_button_with_icon.xml b/OsmAnd/res/layout/bottom_sheet_button_with_icon.xml
index 7c56093fbc..8dd296f01b 100644
--- a/OsmAnd/res/layout/bottom_sheet_button_with_icon.xml
+++ b/OsmAnd/res/layout/bottom_sheet_button_with_icon.xml
@@ -3,14 +3,13 @@
xmlns:osmand="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
- android:layout_height="wrap_content">
+ android:layout_height="wrap_content"
+ tools:background="@drawable/btn_background_inactive_dark">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/OsmAnd/res/layout/trip_recording_fragment.xml b/OsmAnd/res/layout/trip_recording_fragment.xml
new file mode 100644
index 0000000000..68e449cdf3
--- /dev/null
+++ b/OsmAnd/res/layout/trip_recording_fragment.xml
@@ -0,0 +1,91 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml
index 93cfd93231..21bb56470e 100644
--- a/OsmAnd/res/values/strings.xml
+++ b/OsmAnd/res/values/strings.xml
@@ -11,6 +11,8 @@
Thx - Hardy
-->
+ All unsaved data will be lost.
+ Save and continue
Logging interval set time period in which OsmAnd will ask for the current location position data.
Please select another type of colorization.
The track does not contain speed data.
diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java
index 487f4d902f..58e46db8ac 100644
--- a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java
+++ b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java
@@ -104,7 +104,7 @@ import net.osmand.plus.measurementtool.LoginBottomSheetFragment;
import net.osmand.plus.measurementtool.MeasurementEditingContext;
import net.osmand.plus.measurementtool.MeasurementToolFragment;
import net.osmand.plus.measurementtool.SnapTrackWarningFragment;
-import net.osmand.plus.monitoring.TripRecordingStartingBottomSheet;
+import net.osmand.plus.monitoring.TripRecordingStartingBottomFragment;
import net.osmand.plus.render.RendererRegistry;
import net.osmand.plus.resources.ResourceManager;
import net.osmand.plus.routepreparationmenu.ChooseRouteFragment;
@@ -2241,8 +2241,8 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven
return getFragment(MeasurementToolFragment.TAG);
}
- public TripRecordingStartingBottomSheet getTripRecordingBottomSheet() {
- return getFragment(TripRecordingStartingBottomSheet.TAG);
+ public TripRecordingStartingBottomFragment getTripRecordingBottomSheet() {
+ return getFragment(TripRecordingStartingBottomFragment.TAG);
}
public ChooseRouteFragment getChooseRouteFragment() {
diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java
index ff78335e74..c51ed68f32 100644
--- a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java
+++ b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java
@@ -62,8 +62,8 @@ import net.osmand.plus.mapmarkers.MarkersPlanRouteContext;
import net.osmand.plus.measurementtool.MeasurementToolFragment;
import net.osmand.plus.measurementtool.StartPlanRouteBottomSheet;
import net.osmand.plus.monitoring.OsmandMonitoringPlugin;
-import net.osmand.plus.monitoring.TripRecordingActiveBottomSheet;
-import net.osmand.plus.monitoring.TripRecordingStartingBottomSheet;
+import net.osmand.plus.monitoring.TripRecordingBottomFragment;
+import net.osmand.plus.monitoring.TripRecordingStartingBottomFragment;
import net.osmand.plus.osmedit.dialogs.DismissRouteBottomSheetFragment;
import net.osmand.plus.profiles.ProfileDataObject;
import net.osmand.plus.profiles.ProfileDataUtils;
@@ -854,9 +854,9 @@ public class MapActivityActions implements DialogProvider {
app.logEvent("trip_recording_open");
MapActivity.clearPrevActivityIntent();
if (monitoringPlugin.hasDataToSave() || monitoringPlugin.wasTrackMonitored()) {
- TripRecordingActiveBottomSheet.showInstance(mapActivity.getSupportFragmentManager(), monitoringPlugin.getCurrentTrack());
+ TripRecordingBottomFragment.showInstance(mapActivity.getSupportFragmentManager(), monitoringPlugin.getCurrentTrack());
} else {
- TripRecordingStartingBottomSheet.showInstance(mapActivity.getSupportFragmentManager());
+ TripRecordingStartingBottomFragment.showInstance(mapActivity.getSupportFragmentManager());
}
return true;
}
diff --git a/OsmAnd/src/net/osmand/plus/liveupdates/LiveUpdatesFragmentNew.java b/OsmAnd/src/net/osmand/plus/liveupdates/LiveUpdatesFragmentNew.java
index 756f6a3551..4eb764da2d 100644
--- a/OsmAnd/src/net/osmand/plus/liveupdates/LiveUpdatesFragmentNew.java
+++ b/OsmAnd/src/net/osmand/plus/liveupdates/LiveUpdatesFragmentNew.java
@@ -85,9 +85,9 @@ import static net.osmand.plus.liveupdates.LiveUpdatesHelper.preferenceUpdateFreq
import static net.osmand.plus.liveupdates.LiveUpdatesHelper.runLiveUpdate;
import static net.osmand.plus.liveupdates.LiveUpdatesHelper.setAlarmForPendingIntent;
import static net.osmand.plus.liveupdates.LiveUpdatesSettingsDialogFragmentNew.getTertiaryTextColorId;
-import static net.osmand.plus.monitoring.TripRecordingActiveBottomSheet.getActiveTextColorId;
-import static net.osmand.plus.monitoring.TripRecordingActiveBottomSheet.getOsmandIconColorId;
-import static net.osmand.plus.monitoring.TripRecordingActiveBottomSheet.getSecondaryIconColorId;
+import static net.osmand.plus.monitoring.TripRecordingBottomFragment.getActiveTextColorId;
+import static net.osmand.plus.monitoring.TripRecordingBottomFragment.getOsmandIconColorId;
+import static net.osmand.plus.monitoring.TripRecordingBottomFragment.getSecondaryIconColorId;
public class LiveUpdatesFragmentNew extends BaseOsmAndDialogFragment implements OnLiveUpdatesForLocalChange {
diff --git a/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java b/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java
index 4fa978a8d6..de95978f7d 100644
--- a/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java
+++ b/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java
@@ -41,13 +41,16 @@ import net.osmand.plus.dashboard.tools.DashFragmentData;
import net.osmand.plus.settings.backend.ApplicationMode;
import net.osmand.plus.settings.backend.OsmandSettings;
import net.osmand.plus.settings.fragments.BaseSettingsFragment.SettingsScreenType;
+import net.osmand.plus.track.TrackMenuFragment;
import net.osmand.plus.views.OsmandMapLayer.DrawSettings;
import net.osmand.plus.views.OsmandMapTileView;
import net.osmand.plus.views.layers.MapInfoLayer;
import net.osmand.plus.views.mapwidgets.widgets.TextInfoWidget;
import net.osmand.util.Algorithms;
+import java.io.File;
import java.lang.ref.WeakReference;
+import java.util.Collections;
import java.util.List;
import static net.osmand.plus.UiUtilities.CompoundButtonType.PROFILE_DEPENDENT;
@@ -329,9 +332,9 @@ public class OsmandMonitoringPlugin extends OsmandPlugin {
public void controlDialog(final Activity activity, final boolean showTrackSelection) {
FragmentManager fragmentManager = ((FragmentActivity) activity).getSupportFragmentManager();
if (hasDataToSave() || wasTrackMonitored()) {
- TripRecordingActiveBottomSheet.showInstance(fragmentManager, getCurrentTrack());
+ TripRecordingBottomFragment.showInstance(fragmentManager, getCurrentTrack());
} else {
- TripRecordingStartingBottomSheet.showInstance(fragmentManager);
+ TripRecordingStartingBottomFragment.showInstance(fragmentManager);
}
/*final boolean wasTrackMonitored = settings.SAVE_GLOBAL_TRACK_TO_GPX.get();
@@ -436,16 +439,22 @@ public class OsmandMonitoringPlugin extends OsmandPlugin {
}
public void saveCurrentTrack() {
- saveCurrentTrack(null, null);
+ saveCurrentTrack(null, null, true, false);
}
public void saveCurrentTrack(@Nullable final Runnable onComplete) {
- saveCurrentTrack(onComplete, null);
+ saveCurrentTrack(onComplete, null, true, false);
}
public void saveCurrentTrack(@Nullable final Runnable onComplete, @Nullable Activity activity) {
- stopRecording();
+ saveCurrentTrack(onComplete, activity, true, false);
+ }
+ public void saveCurrentTrack(@Nullable final Runnable onComplete, @Nullable Activity activity,
+ final boolean stopRecording, final boolean openTrack) {
+ if (stopRecording) {
+ stopRecording();
+ }
final WeakReference activityRef = activity != null ? new WeakReference<>(activity) : null;
app.getTaskManager().runInBackground(new OsmAndTaskRunnable() {
@@ -461,7 +470,9 @@ public class OsmandMonitoringPlugin extends OsmandPlugin {
try {
SavingTrackHelper helper = app.getSavingTrackHelper();
SaveGpxResult result = helper.saveDataToGpx(app.getAppCustomization().getTracksDir());
- helper.close();
+ if (stopRecording) {
+ helper.close();
+ }
return result;
} catch (Exception e) {
e.printStackTrace();
@@ -474,10 +485,31 @@ public class OsmandMonitoringPlugin extends OsmandPlugin {
isSaving = false;
app.getNotificationHelper().refreshNotifications();
updateControl();
- if (activityRef != null && !Algorithms.isEmpty(result.getFilenames())) {
- final Activity a = activityRef.get();
- if (a instanceof FragmentActivity && !a.isFinishing()) {
- SaveGPXBottomSheetFragment.showInstance(((FragmentActivity) a).getSupportFragmentManager(), result.getFilenames());
+
+ File file = null;
+ File dir = app.getAppCustomization().getTracksDir();
+ File[] children = dir.listFiles();
+ if (children != null && !Algorithms.isEmpty(result.getFilenames())) {
+ SavingTrackHelper helper = app.getSavingTrackHelper();
+ for (File child : children) {
+ if (child.getName().startsWith(result.getFilenames().get(0))
+ && child.lastModified() == helper.getLastTimeFileSaved()) {
+ file = child;
+ }
+ }
+ }
+ if (file != null && file.exists()) {
+ if (!openTrack) {
+ if (activityRef != null) {
+ final Activity a = activityRef.get();
+ if (a instanceof FragmentActivity && !a.isFinishing()) {
+ List singleName = Collections.singletonList(Algorithms.getFileNameWithoutExtension(file));
+ SaveGPXBottomSheetFragment.showInstance(((FragmentActivity) a)
+ .getSupportFragmentManager(), singleName);
+ }
+ }
+ } else {
+ TrackMenuFragment.openTrack(mapActivity, file, null);
}
}
@@ -523,7 +555,7 @@ public class OsmandMonitoringPlugin extends OsmandPlugin {
runnable.run();
} else if (map instanceof FragmentActivity) {
FragmentActivity activity = (FragmentActivity) map;
- TripRecordingStartingBottomSheet.showInstance(activity.getSupportFragmentManager());
+ TripRecordingStartingBottomFragment.showInstance(activity.getSupportFragmentManager());
}
}
diff --git a/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingActiveBottomSheet.java b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingBottomFragment.java
similarity index 65%
rename from OsmAnd/src/net/osmand/plus/monitoring/TripRecordingActiveBottomSheet.java
rename to OsmAnd/src/net/osmand/plus/monitoring/TripRecordingBottomFragment.java
index 7aaa832dd1..471ec813a6 100644
--- a/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingActiveBottomSheet.java
+++ b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingBottomFragment.java
@@ -5,11 +5,8 @@ import android.app.Dialog;
import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.drawable.Drawable;
-import android.os.AsyncTask;
import android.os.Bundle;
import android.os.Handler;
-import android.text.format.DateUtils;
-import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.CompoundButton;
@@ -25,59 +22,55 @@ import androidx.annotation.StringRes;
import androidx.appcompat.content.res.AppCompatResources;
import androidx.appcompat.widget.AppCompatImageView;
import androidx.cardview.widget.CardView;
-import androidx.coordinatorlayout.widget.CoordinatorLayout;
import androidx.core.content.ContextCompat;
import androidx.core.graphics.drawable.DrawableCompat;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.recyclerview.widget.RecyclerView;
-import com.google.android.material.snackbar.Snackbar;
-
import net.osmand.AndroidUtils;
import net.osmand.GPXUtilities.GPXFile;
-import net.osmand.IndexConstants;
import net.osmand.PlatformUtil;
import net.osmand.plus.GpxSelectionHelper.SelectedGpxFile;
import net.osmand.plus.OsmandApplication;
+import net.osmand.plus.OsmandPlugin;
import net.osmand.plus.R;
import net.osmand.plus.UiUtilities;
import net.osmand.plus.activities.MapActivity;
-import net.osmand.plus.activities.SavingTrackHelper;
-import net.osmand.plus.activities.SavingTrackHelper.SaveGpxResult;
import net.osmand.plus.base.MenuBottomSheetDialogFragment;
import net.osmand.plus.base.bottomsheetmenu.BaseBottomSheetItem;
import net.osmand.plus.helpers.AndroidUiHelper;
-import net.osmand.plus.myplaces.SaveCurrentTrackTask;
import net.osmand.plus.settings.backend.OsmandSettings;
import net.osmand.plus.track.GpxBlockStatisticsBuilder;
-import net.osmand.plus.track.SaveGpxAsyncTask.SaveGpxListener;
import net.osmand.plus.track.TrackAppearanceFragment;
import net.osmand.plus.widgets.TextViewEx;
import net.osmand.util.Algorithms;
import org.apache.commons.logging.Log;
-import java.lang.ref.WeakReference;
-import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import static net.osmand.AndroidUtils.getSecondaryTextColorId;
+import static net.osmand.AndroidUtils.setPadding;
import static net.osmand.plus.UiUtilities.CompoundButtonType.GLOBAL;
-public class TripRecordingActiveBottomSheet extends MenuBottomSheetDialogFragment {
+public class TripRecordingBottomFragment extends MenuBottomSheetDialogFragment {
- public static final String TAG = TripRecordingActiveBottomSheet.class.getSimpleName();
- private static final Log log = PlatformUtil.getLog(TripRecordingActiveBottomSheet.class);
- private static final String UPDATE_CURRENT_GPX_FILE = "update_current_gpx_file";
+ public static final String TAG = TripRecordingBottomFragment.class.getSimpleName();
+ private static final Log LOG = PlatformUtil.getLog(TripRecordingBottomFragment.class);
+ private static final String SAVE_CURRENT_GPX_FILE = "save_current_gpx_file";
public static final String UPDATE_TRACK_ICON = "update_track_icon";
- private static final int GENERAL_UPDATE_GPS_INTERVAL = 1000;
- private static final int GENERAL_UPDATE_SAVE_INTERVAL = 1000;
+ private static final int GPS_UPDATE_INTERVAL = 1000;
private OsmandApplication app;
private OsmandSettings settings;
- private SavingTrackHelper helper;
+ private OsmandMonitoringPlugin plugin;
+
+ private View statusContainer;
+ private AppCompatImageView trackAppearanceIcon;
+ private GpxBlockStatisticsBuilder blockStatisticsBuilder;
+
private SelectedGpxFile selectedGpxFile;
private View statusContainer;
@@ -88,7 +81,6 @@ public class TripRecordingActiveBottomSheet extends MenuBottomSheetDialogFragmen
private final Handler handler = new Handler();
private Runnable updatingGPS;
- private Runnable updatingTimeTrackSaved;
private GPXFile getGPXFile() {
return selectedGpxFile.getGpxFile();
@@ -98,21 +90,21 @@ public class TripRecordingActiveBottomSheet extends MenuBottomSheetDialogFragmen
this.selectedGpxFile = selectedGpxFile;
}
- public boolean hasDataToSave() {
+ private boolean hasDataToSave() {
return app.getSavingTrackHelper().hasDataToSave();
}
- public boolean searchingGPS() {
+ private boolean searchingGPS() {
return app.getLocationProvider().getLastKnownLocation() == null;
}
- public boolean wasTrackMonitored() {
+ private boolean wasTrackMonitored() {
return settings.SAVE_GLOBAL_TRACK_TO_GPX.get();
}
public static void showInstance(@NonNull FragmentManager fragmentManager, SelectedGpxFile selectedGpxFile) {
if (!fragmentManager.isStateSaved()) {
- TripRecordingActiveBottomSheet fragment = new TripRecordingActiveBottomSheet();
+ TripRecordingBottomFragment fragment = new TripRecordingBottomFragment();
fragment.setSelectedGpxFile(selectedGpxFile);
fragment.show(fragmentManager, TAG);
}
@@ -122,37 +114,22 @@ public class TripRecordingActiveBottomSheet extends MenuBottomSheetDialogFragmen
public void createMenuItems(Bundle savedInstanceState) {
app = requiredMyApplication();
settings = app.getSettings();
- helper = app.getSavingTrackHelper();
+ plugin = OsmandPlugin.getPlugin(OsmandMonitoringPlugin.class);
LayoutInflater inflater = UiUtilities.getInflater(getContext(), nightMode);
final FragmentManager fragmentManager = getFragmentManager();
- View itemView = inflater.inflate(R.layout.trip_recording_active_fragment, null, false);
+ View itemView = inflater.inflate(R.layout.trip_recording_fragment, null, false);
items.add(new BaseBottomSheetItem.Builder()
.setCustomView(itemView)
.create());
- View buttonClear = itemView.findViewById(R.id.button_clear);
- final View buttonOnline = itemView.findViewById(R.id.button_online);
- final View buttonSegment = itemView.findViewById(R.id.button_segment);
- buttonSave = itemView.findViewById(R.id.button_save);
- final View buttonPause = itemView.findViewById(R.id.button_pause);
- View buttonStop = itemView.findViewById(R.id.button_stop);
-
- createItem(buttonClear, ItemType.CLEAR_DATA, hasDataToSave());
- createItem(buttonOnline, ItemType.STOP_ONLINE, hasDataToSave());
- createItem(buttonSegment, ItemType.START_NEW_SEGMENT, wasTrackMonitored());
- createItem(buttonPause, wasTrackMonitored() ? ItemType.PAUSE : ItemType.RESUME, true);
- createItem(buttonStop, ItemType.STOP, true);
-
- AndroidUiHelper.updateVisibility(buttonOnline, app.getLiveMonitoringHelper().isLiveMonitoringEnabled());
-
statusContainer = itemView.findViewById(R.id.status_container);
updateStatus();
RecyclerView statBlocks = itemView.findViewById(R.id.block_statistics);
if (savedInstanceState != null) {
- if (savedInstanceState.containsKey(UPDATE_CURRENT_GPX_FILE)
- && savedInstanceState.getBoolean(UPDATE_CURRENT_GPX_FILE)) {
+ if (savedInstanceState.containsKey(SAVE_CURRENT_GPX_FILE)
+ && savedInstanceState.getBoolean(SAVE_CURRENT_GPX_FILE)) {
selectedGpxFile = app.getSavingTrackHelper().getCurrentTrack();
}
}
@@ -161,63 +138,28 @@ public class TripRecordingActiveBottomSheet extends MenuBottomSheetDialogFragmen
blockStatisticsBuilder.setBlocksClickable(false);
blockStatisticsBuilder.initStatBlocks(null, ContextCompat.getColor(app, getActiveTextColorId(nightMode)), nightMode);
- showTrackContainer = itemView.findViewById(R.id.show_track_on_map);
+ LinearLayout showTrackContainer = itemView.findViewById(R.id.show_track_on_map);
trackAppearanceIcon = showTrackContainer.findViewById(R.id.additional_button_icon);
createShowTrackItem(app, getMapActivity(), nightMode, showTrackContainer, trackAppearanceIcon,
- ItemType.SHOW_TRACK.getTitleId(), TripRecordingActiveBottomSheet.this, new Runnable() {
+ ItemType.SHOW_TRACK.getTitleId(), TripRecordingBottomFragment.this, new Runnable() {
@Override
public void run() {
hide();
}
});
- buttonClear.findViewById(R.id.button_container).setOnClickListener(new View.OnClickListener() {
+ CardView cardLeft = itemView.findViewById(R.id.button_left);
+ createItem(cardLeft, ItemType.CANCEL);
+ cardLeft.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
- if (fragmentManager != null && hasDataToSave()) {
- ClearRecordedDataBottomSheetFragment.showInstance(fragmentManager, TripRecordingActiveBottomSheet.this);
- }
+ dismiss();
}
});
- buttonOnline.findViewById(R.id.button_container).setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- settings.LIVE_MONITORING.set(false);
- AndroidUiHelper.updateVisibility(buttonOnline, false);
- }
- });
-
- buttonSegment.findViewById(R.id.button_container).setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- if (wasTrackMonitored()) {
- blockStatisticsBuilder.stopUpdatingStatBlocks();
- helper.startNewSegment();
- blockStatisticsBuilder.runUpdatingStatBlocksIfNeeded();
- }
- }
- });
-
- buttonSave.findViewById(R.id.button_container).setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- if (hasDataToSave()) {
- final GPXFile gpxFile = getGPXFile();
- new SaveCurrentTrackTask(app, gpxFile, createSaveListener(new Runnable() {
- @Override
- public void run() {
- blockStatisticsBuilder.stopUpdatingStatBlocks();
- blockStatisticsBuilder.runUpdatingStatBlocksIfNeeded();
- stopUpdatingTimeTrackSaved();
- runUpdatingTimeTrackSaved();
- }
- })).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
- }
- }
- });
-
- buttonPause.findViewById(R.id.button_container).setOnClickListener(new View.OnClickListener() {
+ final CardView cardCenterLeft = itemView.findViewById(R.id.button_center_left);
+ createItem(cardCenterLeft, wasTrackMonitored() ? ItemType.PAUSE : ItemType.RESUME);
+ cardCenterLeft.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
boolean wasTrackMonitored = !wasTrackMonitored();
@@ -228,19 +170,94 @@ public class TripRecordingActiveBottomSheet extends MenuBottomSheetDialogFragmen
}
settings.SAVE_GLOBAL_TRACK_TO_GPX.set(wasTrackMonitored);
updateStatus();
- createItem(buttonPause, wasTrackMonitored ? ItemType.PAUSE : ItemType.RESUME, true);
- createItem(buttonSegment, ItemType.START_NEW_SEGMENT, wasTrackMonitored);
+ createItem(cardCenterLeft, wasTrackMonitored ? ItemType.PAUSE : ItemType.RESUME);
}
});
- buttonStop.findViewById(R.id.button_container).setOnClickListener(new View.OnClickListener() {
+ CardView cardCenterRight = itemView.findViewById(R.id.button_center_right);
+ createItem(cardCenterRight, ItemType.FINISH);
+ cardCenterRight.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
- if (fragmentManager != null) {
- StopTrackRecordingBottomFragment.showInstance(getMapActivity(), fragmentManager, TripRecordingActiveBottomSheet.this);
+ MapActivity mapActivity = getMapActivity();
+ if (mapActivity != null && plugin != null && app.getSavingTrackHelper().hasDataToSave()) {
+ plugin.saveCurrentTrack(null, mapActivity);
+ app.getNotificationHelper().refreshNotifications();
+ dismiss();
}
}
});
+
+ CardView cardRight = itemView.findViewById(R.id.button_right);
+ createItem(cardRight, ItemType.OPTIONS);
+ cardRight.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ if (fragmentManager != null) {
+ TripRecordingOptionsBottomFragment.showInstance(fragmentManager, TripRecordingBottomFragment.this, selectedGpxFile);
+ }
+ }
+ });
+
+ }
+
+ @Override
+ public void onSaveInstanceState(@NonNull Bundle outState) {
+ super.onSaveInstanceState(outState);
+ outState.putBoolean(SAVE_CURRENT_GPX_FILE, true);
+ }
+
+ @Override
+ public void onResume() {
+ super.onResume();
+ blockStatisticsBuilder.runUpdatingStatBlocksIfNeeded();
+ runUpdatingGPS();
+ }
+
+ @Override
+ public void onPause() {
+ super.onPause();
+ blockStatisticsBuilder.stopUpdatingStatBlocks();
+ stopUpdatingGPS();
+ }
+
+ public void show() {
+ Dialog dialog = getDialog();
+ if (dialog != null) {
+ dialog.show();
+ }
+ }
+
+ public void show(String... keys) {
+ show();
+ for (String key : keys) {
+ if (key.equals(UPDATE_TRACK_ICON)) {
+ updateTrackIcon(app, trackAppearanceIcon);
+ }
+ }
+ }
+
+ public void hide() {
+ Dialog dialog = getDialog();
+ if (dialog != null) {
+ dialog.hide();
+ }
+ }
+
+ public void stopUpdatingGPS() {
+ handler.removeCallbacks(updatingGPS);
+ }
+
+ public void runUpdatingGPS() {
+ updatingGPS = new Runnable() {
+ @Override
+ public void run() {
+ int interval = app.getSettings().SAVE_GLOBAL_TRACK_INTERVAL.get();
+ updateStatus();
+ handler.postDelayed(this, Math.max(GPS_UPDATE_INTERVAL, interval));
+ }
+ };
+ handler.post(updatingGPS);
}
private void updateStatus() {
@@ -290,14 +307,14 @@ public class TripRecordingActiveBottomSheet extends MenuBottomSheetDialogFragmen
showTrackCompound.setChecked(app.getSelectedGpxHelper().getSelectedCurrentRecordingTrack() != null);
UiUtilities.setupCompoundButton(showTrackCompound, nightMode, GLOBAL);
- setShowOnMapBackground(buttonShowTrack, showTrackCompound.isChecked(), nightMode);
+ setShowTrackItemBackground(buttonShowTrack, showTrackCompound.isChecked(), nightMode);
buttonShowTrack.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
boolean checked = !showTrackCompound.isChecked();
showTrackCompound.setChecked(checked);
app.getSelectedGpxHelper().selectGpxFile(app.getSavingTrackHelper().getCurrentGpx(), checked, false);
- setShowOnMapBackground(buttonShowTrack, checked, nightMode);
+ setShowTrackItemBackground(buttonShowTrack, checked, nightMode);
createItem(app, nightMode, buttonAppearance, ItemType.APPEARANCE, checked, null);
}
});
@@ -318,30 +335,31 @@ public class TripRecordingActiveBottomSheet extends MenuBottomSheetDialogFragmen
});
}
- private void createItem(View view, ItemType type, boolean enabled) {
- createItem(app, nightMode, view, type, enabled, null);
+ protected static void setShowTrackItemBackground(View view, boolean checked, boolean nightMode) {
+ int background = checked ? getActiveTransparentBackgroundId(nightMode) : getInactiveStrokedBackgroundId(nightMode);
+ view.setBackgroundResource(background);
}
- private void createItem(View view, ItemType type, boolean enabled, @Nullable String description) {
- createItem(app, nightMode, view, type, enabled, description);
+ private void createItem(View view, ItemType type) {
+ createItem(app, nightMode, view, type, true, null);
}
public static View createItem(Context context, boolean nightMode, LayoutInflater inflater, ItemType type) {
+ return createItem(context, nightMode, inflater, type, true, null);
+ }
+
+ public static View createItem(Context context, boolean nightMode, LayoutInflater inflater, ItemType type, boolean enabled, String description) {
View button = inflater.inflate(R.layout.bottom_sheet_button_with_icon, null);
FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.WRAP_CONTENT);
int horizontal = context.getResources().getDimensionPixelSize(R.dimen.content_padding);
params.setMargins(horizontal, 0, horizontal, 0);
button.setLayoutParams(params);
- LinearLayout container = button.findViewById(R.id.button_container);
- container.setClickable(false);
- container.setFocusable(false);
- createItem(context, nightMode, button, type, true, null);
+ createItem(context, nightMode, button, type, enabled, description);
return button;
}
public static void createItem(Context context, boolean nightMode, View view, ItemType type, boolean enabled, @Nullable String description) {
view.setTag(type);
- LinearLayout button = view.findViewById(R.id.button_container);
AppCompatImageView icon = view.findViewById(R.id.icon);
if (icon != null) {
@@ -367,151 +385,26 @@ public class TripRecordingActiveBottomSheet extends MenuBottomSheetDialogFragmen
setTextColor(context, desc, false, nightMode, type);
}
- setItemBackground(context, nightMode, button != null ? button : view, enabled);
+ setItemBackground(context, nightMode, view, enabled);
}
- private String getTimeTrackSaved() {
- long timeTrackSaved = helper.getLastTimeFileSaved();
- if (timeTrackSaved != 0) {
- long now = System.currentTimeMillis();
- CharSequence time = DateUtils.getRelativeTimeSpanString(timeTrackSaved, now, DateUtils.MINUTE_IN_MILLIS);
- return String.valueOf(time);
+ public static void setItemBackground(Context context, boolean nightMode, View view, boolean enabled) {
+ Drawable background = AppCompatResources.getDrawable(context, R.drawable.btn_background_inactive_light);
+ if (background != null && enabled) {
+ int normalColorId = view instanceof CardView
+ ? getActiveTransparentColorId(nightMode) : getInactiveButtonColorId(nightMode);
+ ColorStateList iconColorStateList = AndroidUtils.createPressedColorStateList(
+ context, normalColorId, getActiveTextColorId(nightMode)
+ );
+ if (view instanceof CardView) {
+ ((CardView) view).setCardBackgroundColor(iconColorStateList);
+ return;
+ }
+ DrawableCompat.setTintList(background, iconColorStateList);
} else {
- return null;
- }
- }
-
- @Override
- public void onSaveInstanceState(@NonNull Bundle outState) {
- super.onSaveInstanceState(outState);
- outState.putBoolean(UPDATE_CURRENT_GPX_FILE, true);
- }
-
- @Override
- public void onResume() {
- super.onResume();
- blockStatisticsBuilder.runUpdatingStatBlocksIfNeeded();
- runUpdatingGPS();
- runUpdatingTimeTrackSaved();
- }
-
- @Override
- public void onPause() {
- super.onPause();
- blockStatisticsBuilder.stopUpdatingStatBlocks();
- stopUpdatingGPS();
- stopUpdatingTimeTrackSaved();
- }
-
- public void stopUpdatingGPS() {
- handler.removeCallbacks(updatingGPS);
- }
-
- public void runUpdatingGPS() {
- updatingGPS = new Runnable() {
- @Override
- public void run() {
- int interval = app.getSettings().SAVE_GLOBAL_TRACK_INTERVAL.get();
- updateStatus();
- handler.postDelayed(this, Math.max(GENERAL_UPDATE_GPS_INTERVAL, interval));
- }
- };
- handler.post(updatingGPS);
- }
-
- public void stopUpdatingTimeTrackSaved() {
- handler.removeCallbacks(updatingTimeTrackSaved);
- }
-
- public void runUpdatingTimeTrackSaved() {
- updatingTimeTrackSaved = new Runnable() {
- @Override
- public void run() {
- String time = getTimeTrackSaved();
- createItem(buttonSave, ItemType.SAVE, hasDataToSave(), !Algorithms.isEmpty(time) ? time : null);
- handler.postDelayed(this, GENERAL_UPDATE_SAVE_INTERVAL);
- }
- };
- handler.post(updatingTimeTrackSaved);
- }
-
- private SaveGpxListener createSaveListener(@Nullable final Runnable callback) {
- return new SaveGpxListener() {
-
- @Override
- public void gpxSavingStarted() {
- }
-
- @Override
- public void gpxSavingFinished(Exception errorMessage) {
- final MapActivity mapActivity = getMapActivity();
- final Context context = getContext();
- final SaveGpxResult result = helper.saveDataToGpx(app.getAppCustomization().getTracksDir());
- ArrayList filenames = new ArrayList<>(result.getFilenames());
- String fileName = "";
- if (filenames.size() > 0) {
- fileName = filenames.get(filenames.size() - 1) + IndexConstants.GPX_FILE_EXT;
- }
- String message = fileName + " " + app.getResources().getString(R.string.shared_string_is_saved) + ". "
- + app.getResources().getString(R.string.track_recording_will_be_continued);
- if (mapActivity != null && context != null) {
- final WeakReference mapActivityRef = new WeakReference<>(mapActivity);
- final FragmentManager fragmentManager = mapActivityRef.get().getSupportFragmentManager();
- Snackbar snackbar = Snackbar.make(getView(),
- message,
- Snackbar.LENGTH_LONG)
- .setAction(R.string.shared_string_rename, new View.OnClickListener() {
- @Override
- public void onClick(View view) {
- fragmentManager.beginTransaction().remove(TripRecordingActiveBottomSheet.this).commitAllowingStateLoss();
- SaveGPXBottomSheetFragment.showInstance(fragmentManager, result.getFilenames());
- }
- });
- View view = snackbar.getView();
- CoordinatorLayout.LayoutParams params = (CoordinatorLayout.LayoutParams) view.getLayoutParams();
- params.gravity = Gravity.TOP;
- AndroidUtils.setMargins(params, 0, AndroidUtils.getStatusBarHeight(context), 0, 0);
- view.setLayoutParams(params);
- UiUtilities.setupSnackbar(snackbar, nightMode);
- snackbar.show();
- if (callback != null) {
- callback.run();
- }
- }
- }
- };
- }
-
- @Nullable
- public MapActivity getMapActivity() {
- Activity activity = getActivity();
- if (activity instanceof MapActivity) {
- return (MapActivity) activity;
- }
- return null;
- }
-
- public void show() {
- Dialog dialog = getDialog();
- if (dialog != null) {
- dialog.show();
- }
- }
-
- public void show(String... keys) {
- show();
- for (String key : keys) {
- if (key.equals(UPDATE_TRACK_ICON)) {
- updateTrackIcon(app, trackAppearanceIcon);
- }
- }
- }
-
- public void hide() {
- Dialog dialog = getDialog();
- if (dialog != null) {
- dialog.hide();
+ UiUtilities.tintDrawable(background, ContextCompat.getColor(context, getInactiveButtonColorId(nightMode)));
}
+ view.setBackgroundDrawable(background);
}
public enum ItemType {
@@ -522,7 +415,7 @@ public class TripRecordingActiveBottomSheet extends MenuBottomSheetDialogFragmen
ON_PAUSE(R.string.on_pause, R.drawable.ic_pause),
CLEAR_DATA(R.string.clear_recorded_data, R.drawable.ic_action_delete_dark),
START_NEW_SEGMENT(R.string.gpx_start_new_segment, R.drawable.ic_action_new_segment),
- SAVE(R.string.shared_string_save, R.drawable.ic_action_save_to_file),
+ SAVE(R.string.trip_recording_save_and_continue, R.drawable.ic_action_save_to_file),
PAUSE(R.string.shared_string_pause, R.drawable.ic_pause),
RESUME(R.string.shared_string_resume, R.drawable.ic_play_dark),
STOP(R.string.shared_string_control_stop, R.drawable.ic_action_rec_stop),
@@ -531,7 +424,9 @@ public class TripRecordingActiveBottomSheet extends MenuBottomSheetDialogFragmen
STOP_ONLINE(R.string.live_monitoring_stop, R.drawable.ic_world_globe_dark),
CANCEL(R.string.shared_string_cancel, R.drawable.ic_action_close),
START_RECORDING(R.string.shared_string_control_start, R.drawable.ic_action_direction_movement),
- SETTINGS(R.string.shared_string_settings, R.drawable.ic_action_settings);
+ SETTINGS(R.string.shared_string_settings, R.drawable.ic_action_settings),
+ FINISH(R.string.shared_string_finish, R.drawable.ic_action_point_destination),
+ OPTIONS(R.string.shared_string_options, R.drawable.ic_overflow_menu_with_background);
@StringRes
private final Integer titleId;
@@ -559,31 +454,7 @@ public class TripRecordingActiveBottomSheet extends MenuBottomSheetDialogFragmen
}
}
- public static void setItemBackground(Context context, boolean nightMode, View view, boolean enabled) {
- Drawable background = AppCompatResources.getDrawable(context, R.drawable.btn_background_inactive_light);
- if (background != null && enabled) {
- int normalColorId = view instanceof CardView
- ? getActiveTransparentColorId(nightMode) : getInactiveButtonColorId(nightMode);
- ColorStateList iconColorStateList = AndroidUtils.createPressedColorStateList(
- context, normalColorId, getActiveTextColorId(nightMode)
- );
- if (view instanceof CardView) {
- ((CardView) view).setCardBackgroundColor(iconColorStateList);
- return;
- }
- DrawableCompat.setTintList(background, iconColorStateList);
- } else {
- UiUtilities.tintDrawable(background, ContextCompat.getColor(context, getInactiveButtonColorId(nightMode)));
- }
- view.setBackgroundDrawable(background);
- }
-
- public static void setShowOnMapBackground(View view, boolean checked, boolean nightMode) {
- int background = checked ? getActiveTransparentBackgroundId(nightMode) : getInactiveStrokedBackgroundId(nightMode);
- view.setBackgroundResource(background);
- }
-
- public static void setTextColor(Context context, TextView tv, boolean enabled, boolean nightMode, ItemType type) {
+ protected static void setTextColor(Context context, TextView tv, boolean enabled, boolean nightMode, ItemType type) {
if (tv != null) {
int activeColorId = type.isNegative() ? R.color.color_osm_edit_delete : getActiveTextColorId(nightMode);
int normalColorId = enabled ? activeColorId : getSecondaryTextColorId(nightMode);
@@ -592,7 +463,7 @@ public class TripRecordingActiveBottomSheet extends MenuBottomSheetDialogFragmen
}
}
- public static void setTintedIcon(Context context, AppCompatImageView iv, boolean enabled, boolean nightMode, ItemType type) {
+ protected static void setTintedIcon(Context context, AppCompatImageView iv, boolean enabled, boolean nightMode, ItemType type) {
Integer iconId = type.getIconId();
if (iv != null && iconId != null) {
Drawable icon = AppCompatResources.getDrawable(context, iconId);
@@ -607,6 +478,9 @@ public class TripRecordingActiveBottomSheet extends MenuBottomSheetDialogFragmen
int stopSize = iv.getResources().getDimensionPixelSize(R.dimen.bottom_sheet_icon_margin_large);
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(stopSize, stopSize);
iv.setLayoutParams(params);
+ View container = (View) iv.getParent();
+ setPadding(container, container.getPaddingLeft(), container.getTop(),
+ context.getResources().getDimensionPixelSize(R.dimen.content_padding_half), container.getBottom());
}
}
}
@@ -662,17 +536,17 @@ public class TripRecordingActiveBottomSheet extends MenuBottomSheetDialogFragmen
}
@Override
- protected int getDismissButtonHeight() {
- return getResources().getDimensionPixelSize(R.dimen.bottom_sheet_cancel_button_height);
- }
-
- @Override
- protected int getDismissButtonTextId() {
- return R.string.shared_string_close;
- }
-
- @Override
- protected boolean useVerticalButtons() {
+ protected boolean hideButtonsContainer() {
return true;
}
+
+ @Nullable
+ public MapActivity getMapActivity() {
+ Activity activity = getActivity();
+ if (activity instanceof MapActivity) {
+ return (MapActivity) activity;
+ }
+ return null;
+ }
+
}
diff --git a/OsmAnd/src/net/osmand/plus/monitoring/ClearRecordedDataBottomSheetFragment.java b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingClearDataBottomFragment.java
similarity index 71%
rename from OsmAnd/src/net/osmand/plus/monitoring/ClearRecordedDataBottomSheetFragment.java
rename to OsmAnd/src/net/osmand/plus/monitoring/TripRecordingClearDataBottomFragment.java
index 9a5e40ab95..e51911c867 100644
--- a/OsmAnd/src/net/osmand/plus/monitoring/ClearRecordedDataBottomSheetFragment.java
+++ b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingClearDataBottomFragment.java
@@ -11,21 +11,24 @@ import net.osmand.plus.base.MenuBottomSheetDialogFragment;
import net.osmand.plus.base.bottomsheetmenu.BaseBottomSheetItem;
import net.osmand.plus.base.bottomsheetmenu.BottomSheetItemWithDescription;
import net.osmand.plus.base.bottomsheetmenu.simpleitems.DividerSpaceItem;
-import net.osmand.plus.monitoring.TripRecordingActiveBottomSheet.ItemType;
+import net.osmand.plus.monitoring.TripRecordingBottomFragment.ItemType;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
-public class ClearRecordedDataBottomSheetFragment extends MenuBottomSheetDialogFragment {
+import static net.osmand.AndroidUtils.getPrimaryTextColorId;
+import static net.osmand.plus.monitoring.TripRecordingOptionsBottomFragment.*;
- public static final String TAG = ClearRecordedDataBottomSheetFragment.class.getSimpleName();
+public class TripRecordingClearDataBottomFragment extends MenuBottomSheetDialogFragment {
+
+ public static final String TAG = TripRecordingClearDataBottomFragment.class.getSimpleName();
private OsmandApplication app;
public static void showInstance(@NonNull FragmentManager fragmentManager, @NonNull Fragment target) {
if (!fragmentManager.isStateSaved()) {
- ClearRecordedDataBottomSheetFragment fragment = new ClearRecordedDataBottomSheetFragment();
+ TripRecordingClearDataBottomFragment fragment = new TripRecordingClearDataBottomFragment();
fragment.setTargetFragment(target, 0);
fragment.show(fragmentManager, TAG);
}
@@ -37,14 +40,14 @@ public class ClearRecordedDataBottomSheetFragment extends MenuBottomSheetDialogF
LayoutInflater inflater = UiUtilities.getInflater(app, nightMode);
int verticalBig = getResources().getDimensionPixelSize(R.dimen.dialog_content_margin);
int verticalNormal = getResources().getDimensionPixelSize(R.dimen.content_padding);
-
+ String description = getString(R.string.clear_recorded_data_warning)
+ .concat(getString(R.string.lost_data_warning));
final View buttonClear = createItem(inflater, ItemType.CLEAR_DATA);
final View buttonCancel = createItem(inflater, ItemType.CANCEL);
items.add(new BottomSheetItemWithDescription.Builder()
- .setDescription(app.getString(R.string.clear_recorded_data_warning))
- .setDescriptionColorId(!nightMode ? R.color.text_color_primary_light : R.color.text_color_primary_dark)
- .setDescriptionMaxLines(2)
+ .setDescription(description)
+ .setDescriptionColorId(getPrimaryTextColorId(nightMode))
.setTitle(app.getString(R.string.clear_recorded_data))
.setLayoutId(R.layout.bottom_sheet_item_title_with_description)
.create());
@@ -58,6 +61,7 @@ public class ClearRecordedDataBottomSheetFragment extends MenuBottomSheetDialogF
public void onClick(View v) {
app.getSavingTrackHelper().clearRecordedData(true);
dismiss();
+ dismissTargetDialog(TripRecordingClearDataBottomFragment.this, TripRecordingOptionsBottomFragment.class);
}
})
.create());
@@ -78,15 +82,15 @@ public class ClearRecordedDataBottomSheetFragment extends MenuBottomSheetDialogF
}
private View createItem(LayoutInflater inflater, ItemType type) {
- return TripRecordingActiveBottomSheet.createItem(app, nightMode, inflater, type);
+ return TripRecordingBottomFragment.createItem(app, nightMode, inflater, type);
}
@Override
public void onResume() {
super.onResume();
Fragment target = getTargetFragment();
- if (target instanceof TripRecordingActiveBottomSheet) {
- ((TripRecordingActiveBottomSheet) target).hide();
+ if (target instanceof TripRecordingOptionsBottomFragment) {
+ ((TripRecordingOptionsBottomFragment) target).hide();
}
}
@@ -94,8 +98,8 @@ public class ClearRecordedDataBottomSheetFragment extends MenuBottomSheetDialogF
public void onPause() {
super.onPause();
Fragment target = getTargetFragment();
- if (target instanceof TripRecordingActiveBottomSheet) {
- ((TripRecordingActiveBottomSheet) target).show();
+ if (target instanceof TripRecordingOptionsBottomFragment) {
+ ((TripRecordingOptionsBottomFragment) target).show();
}
}
@@ -103,4 +107,5 @@ public class ClearRecordedDataBottomSheetFragment extends MenuBottomSheetDialogF
protected boolean hideButtonsContainer() {
return true;
}
-}
\ No newline at end of file
+
+}
diff --git a/OsmAnd/src/net/osmand/plus/monitoring/StopTrackRecordingBottomFragment.java b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingDiscardBottomFragment.java
similarity index 50%
rename from OsmAnd/src/net/osmand/plus/monitoring/StopTrackRecordingBottomFragment.java
rename to OsmAnd/src/net/osmand/plus/monitoring/TripRecordingDiscardBottomFragment.java
index f648c5bbdf..971d7399e1 100644
--- a/OsmAnd/src/net/osmand/plus/monitoring/StopTrackRecordingBottomFragment.java
+++ b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingDiscardBottomFragment.java
@@ -8,36 +8,29 @@ import net.osmand.plus.OsmandApplication;
import net.osmand.plus.OsmandPlugin;
import net.osmand.plus.R;
import net.osmand.plus.UiUtilities;
-import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.base.MenuBottomSheetDialogFragment;
import net.osmand.plus.base.bottomsheetmenu.BaseBottomSheetItem;
import net.osmand.plus.base.bottomsheetmenu.BottomSheetItemWithDescription;
import net.osmand.plus.base.bottomsheetmenu.simpleitems.DividerSpaceItem;
-import net.osmand.plus.monitoring.TripRecordingActiveBottomSheet.ItemType;
-import net.osmand.plus.settings.backend.OsmandSettings;
+import net.osmand.plus.monitoring.TripRecordingBottomFragment.ItemType;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
-public class StopTrackRecordingBottomFragment extends MenuBottomSheetDialogFragment {
+import static net.osmand.AndroidUtils.getPrimaryTextColorId;
+import static net.osmand.plus.monitoring.TripRecordingOptionsBottomFragment.ACTION_STOP_AND_DISCARD;
+import static net.osmand.plus.monitoring.TripRecordingOptionsBottomFragment.dismissTargetDialog;
- public static final String TAG = StopTrackRecordingBottomFragment.class.getSimpleName();
+public class TripRecordingDiscardBottomFragment extends MenuBottomSheetDialogFragment {
+
+ public static final String TAG = TripRecordingDiscardBottomFragment.class.getSimpleName();
private OsmandApplication app;
- private MapActivity mapActivity;
- private OsmandSettings settings;
- private OsmandMonitoringPlugin plugin;
- private ItemType tag = ItemType.CANCEL;
- public void setMapActivity(MapActivity mapActivity) {
- this.mapActivity = mapActivity;
- }
-
- public static void showInstance(MapActivity mapActivity, @NonNull FragmentManager fragmentManager, @NonNull Fragment target) {
+ public static void showInstance(@NonNull FragmentManager fragmentManager, @NonNull Fragment target) {
if (!fragmentManager.isStateSaved()) {
- StopTrackRecordingBottomFragment fragment = new StopTrackRecordingBottomFragment();
- fragment.setMapActivity(mapActivity);
+ TripRecordingDiscardBottomFragment fragment = new TripRecordingDiscardBottomFragment();
fragment.setTargetFragment(target, 0);
fragment.show(fragmentManager, TAG);
}
@@ -46,67 +39,48 @@ public class StopTrackRecordingBottomFragment extends MenuBottomSheetDialogFragm
@Override
public void createMenuItems(Bundle savedInstanceState) {
app = requiredMyApplication();
- settings = app.getSettings();
- plugin = OsmandPlugin.getPlugin(OsmandMonitoringPlugin.class);
+ final OsmandMonitoringPlugin plugin = OsmandPlugin.getPlugin(OsmandMonitoringPlugin.class);
LayoutInflater inflater = UiUtilities.getInflater(app, nightMode);
int verticalBig = getResources().getDimensionPixelSize(R.dimen.dialog_content_margin);
int verticalNormal = getResources().getDimensionPixelSize(R.dimen.content_padding);
-
-// final View buttonDiscard = createItem(inflater, ItemType.STOP_AND_DISCARD);
- final View buttonSave = createItem(inflater, ItemType.STOP_AND_SAVE);
+ String description = getString(R.string.track_recording_description)
+ .concat(getString(R.string.lost_data_warning));
+ final View buttonDiscard = createItem(inflater, ItemType.STOP_AND_DISCARD);
final View buttonCancel = createItem(inflater, ItemType.CANCEL);
items.add(new BottomSheetItemWithDescription.Builder()
- .setDescription(app.getString(R.string.track_recording_description))
- .setDescriptionColorId(!nightMode ? R.color.text_color_primary_light : R.color.text_color_primary_dark)
- .setDescriptionMaxLines(4)
+ .setDescription(description)
+ .setDescriptionColorId(getPrimaryTextColorId(nightMode))
.setTitle(app.getString(R.string.track_recording_title))
.setLayoutId(R.layout.bottom_sheet_item_title_with_description)
.create());
items.add(new DividerSpaceItem(app, verticalBig));
- /*items.add(new BaseBottomSheetItem.Builder()
+ items.add(new BaseBottomSheetItem.Builder()
.setCustomView(buttonDiscard)
.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
- tag = (ItemType) buttonDiscard.getTag();
- if (plugin != null && settings.SAVE_GLOBAL_TRACK_TO_GPX.get()) {
+ if (plugin != null && app.getSettings().SAVE_GLOBAL_TRACK_TO_GPX.get()) {
plugin.stopRecording();
app.getNotificationHelper().refreshNotifications();
}
app.getSavingTrackHelper().clearRecordedData(true);
dismiss();
+ dismissTargetDialog(TripRecordingDiscardBottomFragment.this,
+ TripRecordingOptionsBottomFragment.class, ACTION_STOP_AND_DISCARD, true);
}
})
.create());
- items.add(new DividerSpaceItem(app, verticalBig));*/
-
- items.add(new BaseBottomSheetItem.Builder()
- .setCustomView(buttonSave)
- .setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- tag = (ItemType) buttonSave.getTag();
- if (plugin != null && app.getSavingTrackHelper().hasDataToSave()) {
- plugin.saveCurrentTrack(null, mapActivity);
- app.getNotificationHelper().refreshNotifications();
- dismiss();
- }
- }
- })
- .create());
-
- items.add(new DividerSpaceItem(app, verticalNormal));
+ items.add(new DividerSpaceItem(app, verticalBig));
items.add(new BaseBottomSheetItem.Builder()
.setCustomView(buttonCancel)
.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
- tag = (ItemType) buttonCancel.getTag();
dismiss();
}
})
@@ -116,15 +90,15 @@ public class StopTrackRecordingBottomFragment extends MenuBottomSheetDialogFragm
}
private View createItem(LayoutInflater inflater, ItemType type) {
- return TripRecordingActiveBottomSheet.createItem(app, nightMode, inflater, type);
+ return TripRecordingBottomFragment.createItem(app, nightMode, inflater, type);
}
@Override
public void onResume() {
super.onResume();
Fragment target = getTargetFragment();
- if (target instanceof TripRecordingActiveBottomSheet) {
- ((TripRecordingActiveBottomSheet) target).hide();
+ if (target instanceof TripRecordingOptionsBottomFragment) {
+ ((TripRecordingOptionsBottomFragment) target).hide();
}
}
@@ -132,13 +106,8 @@ public class StopTrackRecordingBottomFragment extends MenuBottomSheetDialogFragm
public void onPause() {
super.onPause();
Fragment target = getTargetFragment();
- if (target instanceof TripRecordingActiveBottomSheet) {
- TripRecordingActiveBottomSheet tripRec = (TripRecordingActiveBottomSheet) target;
- if (tag == ItemType.CANCEL) {
- tripRec.show();
- } else {
- tripRec.dismiss();
- }
+ if (target instanceof TripRecordingOptionsBottomFragment) {
+ ((TripRecordingOptionsBottomFragment) target).show();
}
}
diff --git a/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingOptionsBottomFragment.java b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingOptionsBottomFragment.java
new file mode 100644
index 0000000000..aa755a4276
--- /dev/null
+++ b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingOptionsBottomFragment.java
@@ -0,0 +1,350 @@
+package net.osmand.plus.monitoring;
+
+import android.app.Activity;
+import android.app.Dialog;
+import android.os.AsyncTask;
+import android.os.Bundle;
+import android.os.Handler;
+import android.text.format.DateUtils;
+import android.view.LayoutInflater;
+import android.view.View;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.fragment.app.DialogFragment;
+import androidx.fragment.app.Fragment;
+import androidx.fragment.app.FragmentManager;
+
+import net.osmand.GPXUtilities.GPXFile;
+import net.osmand.plus.GpxSelectionHelper.SelectedGpxFile;
+import net.osmand.plus.OsmandApplication;
+import net.osmand.plus.OsmandPlugin;
+import net.osmand.plus.R;
+import net.osmand.plus.UiUtilities;
+import net.osmand.plus.activities.MapActivity;
+import net.osmand.plus.activities.SavingTrackHelper;
+import net.osmand.plus.base.MenuBottomSheetDialogFragment;
+import net.osmand.plus.base.bottomsheetmenu.BaseBottomSheetItem;
+import net.osmand.plus.base.bottomsheetmenu.SimpleBottomSheetItem;
+import net.osmand.plus.base.bottomsheetmenu.simpleitems.DividerSpaceItem;
+import net.osmand.plus.helpers.AndroidUiHelper;
+import net.osmand.plus.monitoring.TripRecordingBottomFragment.ItemType;
+import net.osmand.plus.myplaces.SaveCurrentTrackTask;
+import net.osmand.plus.settings.backend.OsmandSettings;
+import net.osmand.plus.track.SaveGpxAsyncTask.SaveGpxListener;
+import net.osmand.util.Algorithms;
+
+import static net.osmand.AndroidUtils.getPrimaryTextColorId;
+
+public class TripRecordingOptionsBottomFragment extends MenuBottomSheetDialogFragment {
+
+ public static final String TAG = TripRecordingOptionsBottomFragment.class.getSimpleName();
+ public static final String ACTION_STOP_AND_DISCARD = "action_stop_and_discard";
+ private static final String SAVE_CURRENT_GPX_FILE = "save_current_gpx_file";
+ private static final int SAVE_UPDATE_INTERVAL = 1000;
+
+ private OsmandApplication app;
+ private OsmandSettings settings;
+ private SavingTrackHelper helper;
+
+ private View buttonClear;
+ private View buttonSave;
+
+ private SelectedGpxFile selectedGpxFile;
+ private final Handler handler = new Handler();
+ private Runnable updatingTimeTrackSaved;
+ private int indexButtonOnline = -1;
+ private int indexButtonOnlineDivider = -1;
+
+ private GPXFile getGPXFile() {
+ return selectedGpxFile.getGpxFile();
+ }
+
+ public void setSelectedGpxFile(SelectedGpxFile selectedGpxFile) {
+ this.selectedGpxFile = selectedGpxFile;
+ }
+
+ public boolean hasDataToSave() {
+ return app.getSavingTrackHelper().hasDataToSave();
+ }
+
+ public boolean wasTrackMonitored() {
+ return settings.SAVE_GLOBAL_TRACK_TO_GPX.get();
+ }
+
+ public static void showInstance(@NonNull FragmentManager fragmentManager, @NonNull Fragment target, SelectedGpxFile selectedGpxFile) {
+ if (!fragmentManager.isStateSaved()) {
+ TripRecordingOptionsBottomFragment fragment = new TripRecordingOptionsBottomFragment();
+ fragment.setTargetFragment(target, 0);
+ fragment.setSelectedGpxFile(selectedGpxFile);
+ fragment.show(fragmentManager, TAG);
+ }
+ }
+
+ @Override
+ public void createMenuItems(Bundle savedInstanceState) {
+ app = requiredMyApplication();
+ settings = app.getSettings();
+ helper = app.getSavingTrackHelper();
+ LayoutInflater inflater = UiUtilities.getInflater(app, nightMode);
+ final FragmentManager fragmentManager = getFragmentManager();
+ int dp16 = getResources().getDimensionPixelSize(R.dimen.content_padding);
+ int dp36 = getResources().getDimensionPixelSize(R.dimen.context_menu_controller_height);
+
+ if (savedInstanceState != null) {
+ if (savedInstanceState.containsKey(SAVE_CURRENT_GPX_FILE)
+ && savedInstanceState.getBoolean(SAVE_CURRENT_GPX_FILE)) {
+ selectedGpxFile = app.getSavingTrackHelper().getCurrentTrack();
+ }
+ }
+
+ buttonClear = createItem(inflater, ItemType.CLEAR_DATA, hasDataToSave());
+ final View buttonDiscard = createItem(inflater, ItemType.STOP_AND_DISCARD);
+ final View buttonOnline = createItem(inflater, ItemType.STOP_ONLINE, hasDataToSave());
+ buttonSave = createItem(inflater, ItemType.SAVE, hasDataToSave());
+ final View buttonSegment = createItem(inflater, ItemType.START_NEW_SEGMENT, wasTrackMonitored());
+
+ items.add(new SimpleBottomSheetItem.Builder()
+ .setTitle(getString(R.string.shared_string_options))
+ .setTitleColorId(getPrimaryTextColorId(nightMode))
+ .setLayoutId(R.layout.bottom_sheet_item_title)
+ .create());
+
+ items.add(new DividerSpaceItem(app, getResources().getDimensionPixelSize(R.dimen.content_padding_small)));
+
+ items.add(new BaseBottomSheetItem.Builder()
+ .setCustomView(buttonClear)
+ .setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ if (fragmentManager != null && hasDataToSave()) {
+ TripRecordingClearDataBottomFragment.showInstance(fragmentManager, TripRecordingOptionsBottomFragment.this);
+ }
+ }
+ })
+ .create());
+
+ items.add(new DividerSpaceItem(app, dp16));
+
+ items.add(new BaseBottomSheetItem.Builder()
+ .setCustomView(buttonDiscard)
+ .setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ if (fragmentManager != null) {
+ TripRecordingDiscardBottomFragment.showInstance(fragmentManager, TripRecordingOptionsBottomFragment.this);
+ }
+ }
+ })
+ .create());
+
+ items.add(new DividerSpaceItem(app, dp36));
+
+ if (app.getLiveMonitoringHelper().isLiveMonitoringEnabled()) {
+ items.add(new BaseBottomSheetItem.Builder()
+ .setCustomView(buttonOnline)
+ .setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ settings.LIVE_MONITORING.set(false);
+ if (indexButtonOnline != -1) {
+ AndroidUiHelper.updateVisibility(items.get(indexButtonOnline).getView(), false);
+ }
+ if (indexButtonOnlineDivider != -1) {
+ AndroidUiHelper.updateVisibility(items.get(indexButtonOnlineDivider).getView(), false);
+ }
+ }
+ })
+ .create());
+ indexButtonOnline = items.size() - 1;
+
+ items.add(new DividerSpaceItem(app, dp36));
+ indexButtonOnlineDivider = items.size() - 1;
+ }
+
+ items.add(new BaseBottomSheetItem.Builder()
+ .setCustomView(buttonSave)
+ .setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ if (hasDataToSave()) {
+ final GPXFile gpxFile = getGPXFile();
+ new SaveCurrentTrackTask(app, gpxFile, createSaveListener()).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
+ }
+ }
+ })
+ .create());
+
+ items.add(new DividerSpaceItem(app, dp16));
+
+ items.add(new BaseBottomSheetItem.Builder()
+ .setCustomView(buttonSegment)
+ .setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ if (wasTrackMonitored()) {
+ helper.startNewSegment();
+ }
+ }
+ })
+ .create());
+
+ items.add(new DividerSpaceItem(app, getResources().getDimensionPixelSize(R.dimen.content_padding_small)));
+
+ }
+
+ @Override
+ public void onSaveInstanceState(@NonNull Bundle outState) {
+ super.onSaveInstanceState(outState);
+ outState.putBoolean(SAVE_CURRENT_GPX_FILE, true);
+ }
+
+ @Override
+ public void onResume() {
+ super.onResume();
+ runUpdatingTimeTrackSaved();
+ Fragment target = getTargetFragment();
+ if (target instanceof TripRecordingBottomFragment) {
+ ((TripRecordingBottomFragment) target).hide();
+ }
+ }
+
+ @Override
+ public void onPause() {
+ super.onPause();
+ stopUpdatingTimeTrackSaved();
+ Fragment target = getTargetFragment();
+ if (target instanceof TripRecordingBottomFragment) {
+ if (isDiscard()) {
+ ((TripRecordingBottomFragment) target).dismiss();
+ } else {
+ ((TripRecordingBottomFragment) target).show();
+ }
+ }
+ }
+
+ public void show() {
+ Dialog dialog = getDialog();
+ if (dialog != null) {
+ dialog.show();
+ }
+ }
+
+ public void hide() {
+ Dialog dialog = getDialog();
+ if (dialog != null) {
+ dialog.hide();
+ }
+ }
+
+ private boolean isDiscard() {
+ Bundle args = getArguments();
+ if (args != null) {
+ return args.getBoolean(ACTION_STOP_AND_DISCARD);
+ }
+ return false;
+ }
+
+ protected static void dismissTargetDialog(Fragment current, Class> targetClass) {
+ dismissTargetDialog(current, targetClass, null, null);
+ }
+
+ protected static void dismissTargetDialog(Fragment current, Class> targetClass, String booleanKey, Boolean value) {
+ if (targetClass.isInstance(current.getTargetFragment())) {
+ Fragment target = current.getTargetFragment();
+ if (booleanKey != null && value != null) {
+ Bundle args = new Bundle();
+ args.putBoolean(booleanKey, value);
+ target.setArguments(args);
+ }
+ if (target instanceof DialogFragment) {
+ ((DialogFragment) target).dismiss();
+ }
+ }
+ }
+
+ public void stopUpdatingTimeTrackSaved() {
+ handler.removeCallbacks(updatingTimeTrackSaved);
+ }
+
+ public void runUpdatingTimeTrackSaved() {
+ updatingTimeTrackSaved = new Runnable() {
+ @Override
+ public void run() {
+ String time = getTimeTrackSaved();
+ TripRecordingBottomFragment.createItem(app, nightMode, buttonSave, ItemType.SAVE, hasDataToSave(), !Algorithms.isEmpty(time) ? time : null);
+ TripRecordingBottomFragment.createItem(app, nightMode, buttonClear, ItemType.CLEAR_DATA, hasDataToSave(), null);
+ handler.postDelayed(this, SAVE_UPDATE_INTERVAL);
+ }
+ };
+ handler.post(updatingTimeTrackSaved);
+ }
+
+ private String getTimeTrackSaved() {
+ long timeTrackSaved = helper.getLastTimeFileSaved();
+ if (timeTrackSaved != 0) {
+ long now = System.currentTimeMillis();
+ CharSequence time = DateUtils.getRelativeTimeSpanString(timeTrackSaved, now, DateUtils.MINUTE_IN_MILLIS);
+ return String.valueOf(time);
+ } else {
+ return null;
+ }
+ }
+
+ private View createItem(LayoutInflater inflater, ItemType type, boolean enabled) {
+ return TripRecordingBottomFragment.createItem(app, nightMode, inflater, type, enabled, null);
+ }
+
+ private View createItem(LayoutInflater inflater, ItemType type) {
+ return TripRecordingBottomFragment.createItem(app, nightMode, inflater, type);
+ }
+
+ private SaveGpxListener createSaveListener() {
+ return new SaveGpxListener() {
+
+ @Override
+ public void gpxSavingStarted() {
+ }
+
+ @Override
+ public void gpxSavingFinished(Exception errorMessage) {
+ MapActivity mapActivity = getMapActivity();
+ OsmandMonitoringPlugin plugin = OsmandPlugin.getPlugin(OsmandMonitoringPlugin.class);
+ if (mapActivity != null && plugin != null) {
+ stopUpdatingTimeTrackSaved();
+ settings.SAVE_GLOBAL_TRACK_TO_GPX.set(false);
+ plugin.saveCurrentTrack(null, mapActivity, false, true);
+ dismiss();
+ dismissTargetDialog(TripRecordingOptionsBottomFragment.this, TripRecordingBottomFragment.class);
+ settings.SAVE_GLOBAL_TRACK_TO_GPX.set(true);
+ runUpdatingTimeTrackSaved();
+ }
+ }
+ };
+ }
+
+ @Nullable
+ public MapActivity getMapActivity() {
+ Activity activity = getActivity();
+ if (activity instanceof MapActivity) {
+ return (MapActivity) activity;
+ }
+ return null;
+ }
+
+ @Override
+ protected int getDismissButtonHeight() {
+ return getResources().getDimensionPixelSize(R.dimen.bottom_sheet_cancel_button_height);
+ }
+
+ @Override
+ protected int getDismissButtonTextId() {
+ return R.string.shared_string_back;
+ }
+
+ @Override
+ protected boolean useVerticalButtons() {
+ return true;
+ }
+
+}
diff --git a/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingStartingBottomSheet.java b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingStartingBottomFragment.java
similarity index 88%
rename from OsmAnd/src/net/osmand/plus/monitoring/TripRecordingStartingBottomSheet.java
rename to OsmAnd/src/net/osmand/plus/monitoring/TripRecordingStartingBottomFragment.java
index c8c96d1323..8d379237e2 100644
--- a/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingStartingBottomSheet.java
+++ b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingStartingBottomFragment.java
@@ -29,21 +29,21 @@ import net.osmand.plus.base.MenuBottomSheetDialogFragment;
import net.osmand.plus.base.bottomsheetmenu.BaseBottomSheetItem;
import net.osmand.plus.helpers.AndroidUiHelper;
import net.osmand.plus.helpers.FontCache;
-import net.osmand.plus.monitoring.TripRecordingActiveBottomSheet.ItemType;
+import net.osmand.plus.monitoring.TripRecordingBottomFragment.ItemType;
import net.osmand.plus.settings.backend.OsmandSettings;
import net.osmand.plus.settings.fragments.BaseSettingsFragment;
import net.osmand.plus.settings.fragments.BaseSettingsFragment.SettingsScreenType;
import static net.osmand.plus.monitoring.OsmandMonitoringPlugin.MINUTES;
import static net.osmand.plus.monitoring.OsmandMonitoringPlugin.SECONDS;
-import static net.osmand.plus.monitoring.TripRecordingActiveBottomSheet.UPDATE_TRACK_ICON;
-import static net.osmand.plus.monitoring.TripRecordingActiveBottomSheet.createItem;
-import static net.osmand.plus.monitoring.TripRecordingActiveBottomSheet.createShowTrackItem;
-import static net.osmand.plus.monitoring.TripRecordingActiveBottomSheet.updateTrackIcon;
+import static net.osmand.plus.monitoring.TripRecordingBottomFragment.UPDATE_TRACK_ICON;
+import static net.osmand.plus.monitoring.TripRecordingBottomFragment.createItem;
+import static net.osmand.plus.monitoring.TripRecordingBottomFragment.createShowTrackItem;
+import static net.osmand.plus.monitoring.TripRecordingBottomFragment.updateTrackIcon;
-public class TripRecordingStartingBottomSheet extends MenuBottomSheetDialogFragment {
+public class TripRecordingStartingBottomFragment extends MenuBottomSheetDialogFragment {
- public static final String TAG = TripRecordingStartingBottomSheet.class.getSimpleName();
+ public static final String TAG = TripRecordingStartingBottomFragment.class.getSimpleName();
public static final String UPDATE_LOGGING_INTERVAL = "update_logging_interval";
private OsmandApplication app;
@@ -52,7 +52,6 @@ public class TripRecordingStartingBottomSheet extends MenuBottomSheetDialogFragm
private AppCompatImageView upDownBtn;
private AppCompatImageView trackAppearanceIcon;
private TextView intervalValueView;
- private LinearLayout showTrackContainer;
private LinearLayout intervalContainer;
private RangeSlider intervalSlider;
@@ -60,7 +59,7 @@ public class TripRecordingStartingBottomSheet extends MenuBottomSheetDialogFragm
public static void showInstance(@NonNull FragmentManager fragmentManager) {
if (!fragmentManager.isStateSaved()) {
- TripRecordingStartingBottomSheet fragment = new TripRecordingStartingBottomSheet();
+ TripRecordingStartingBottomFragment fragment = new TripRecordingStartingBottomFragment();
fragment.show(fragmentManager, TAG);
}
}
@@ -91,10 +90,10 @@ public class TripRecordingStartingBottomSheet extends MenuBottomSheetDialogFragm
intervalSlider = itemView.findViewById(R.id.interval_slider);
updateIntervalValue();
- showTrackContainer = itemView.findViewById(R.id.show_track_on_map);
+ LinearLayout showTrackContainer = itemView.findViewById(R.id.show_track_on_map);
trackAppearanceIcon = showTrackContainer.findViewById(R.id.additional_button_icon);
createShowTrackItem(app, getMapActivity(), nightMode, showTrackContainer, trackAppearanceIcon,
- R.string.shared_string_show_on_map, TripRecordingStartingBottomSheet.this, new Runnable() {
+ R.string.shared_string_show_on_map, TripRecordingStartingBottomFragment.this, new Runnable() {
@Override
public void run() {
hide();
@@ -104,6 +103,7 @@ public class TripRecordingStartingBottomSheet extends MenuBottomSheetDialogFragm
updateUpDownBtn();
CardView cardLeft = itemView.findViewById(R.id.button_left);
+
createItem(app, nightMode, cardLeft, ItemType.CANCEL, true, null);
cardLeft.setOnClickListener(new View.OnClickListener() {
@Override
@@ -113,6 +113,7 @@ public class TripRecordingStartingBottomSheet extends MenuBottomSheetDialogFragm
});
CardView cardCenter = itemView.findViewById(R.id.button_center);
+
createItem(app, nightMode, cardCenter, ItemType.START_RECORDING, true, null);
cardCenter.setOnClickListener(new View.OnClickListener() {
@Override
@@ -122,6 +123,7 @@ public class TripRecordingStartingBottomSheet extends MenuBottomSheetDialogFragm
});
CardView cardRight = itemView.findViewById(R.id.button_right);
+
createItem(app, nightMode, cardRight, ItemType.SETTINGS, true, null);
cardRight.setOnClickListener(new View.OnClickListener() {
@Override
@@ -129,7 +131,7 @@ public class TripRecordingStartingBottomSheet extends MenuBottomSheetDialogFragm
MapActivity mapActivity = getMapActivity();
if (mapActivity != null) {
hide();
- BaseSettingsFragment.showInstance(mapActivity, SettingsScreenType.MONITORING_SETTINGS, TripRecordingStartingBottomSheet.this);
+ BaseSettingsFragment.showInstance(mapActivity, SettingsScreenType.MONITORING_SETTINGS, TripRecordingStartingBottomFragment.this);
}
}
});
@@ -214,7 +216,7 @@ public class TripRecordingStartingBottomSheet extends MenuBottomSheetDialogFragm
app.startNavigationService(NavigationService.USED_BY_GPX);
MapActivity mapActivity = getMapActivity();
if (mapActivity != null) {
- TripRecordingActiveBottomSheet.showInstance(mapActivity.getSupportFragmentManager(), helper.getCurrentTrack());
+ TripRecordingBottomFragment.showInstance(mapActivity.getSupportFragmentManager(), helper.getCurrentTrack());
}
dismiss();
}
diff --git a/OsmAnd/src/net/osmand/plus/settings/bottomsheets/BooleanPreferenceBottomSheet.java b/OsmAnd/src/net/osmand/plus/settings/bottomsheets/BooleanPreferenceBottomSheet.java
index 08a4e34b6b..e46e438f67 100644
--- a/OsmAnd/src/net/osmand/plus/settings/bottomsheets/BooleanPreferenceBottomSheet.java
+++ b/OsmAnd/src/net/osmand/plus/settings/bottomsheets/BooleanPreferenceBottomSheet.java
@@ -6,7 +6,6 @@ import android.graphics.drawable.LayerDrawable;
import android.os.Build;
import android.os.Bundle;
import android.view.View;
-import android.widget.CompoundButton;
import android.widget.LinearLayout;
import androidx.annotation.NonNull;
@@ -34,9 +33,8 @@ import net.osmand.plus.settings.preferences.SwitchPreferenceEx;
import org.apache.commons.logging.Log;
-import static net.osmand.plus.UiUtilities.CompoundButtonType.TOOLBAR;
import static net.osmand.plus.liveupdates.LiveUpdatesSettingsDialogFragmentNew.getActivePrimaryColorId;
-import static net.osmand.plus.monitoring.TripRecordingActiveBottomSheet.getSecondaryIconColorId;
+import static net.osmand.plus.monitoring.TripRecordingBottomFragment.getSecondaryIconColorId;
public class BooleanPreferenceBottomSheet extends BasePreferenceBottomSheet {
diff --git a/OsmAnd/src/net/osmand/plus/settings/fragments/BaseSettingsFragment.java b/OsmAnd/src/net/osmand/plus/settings/fragments/BaseSettingsFragment.java
index d71387c0ce..2faf24db46 100644
--- a/OsmAnd/src/net/osmand/plus/settings/fragments/BaseSettingsFragment.java
+++ b/OsmAnd/src/net/osmand/plus/settings/fragments/BaseSettingsFragment.java
@@ -61,7 +61,7 @@ import net.osmand.plus.activities.OsmandInAppPurchaseActivity;
import net.osmand.plus.audionotes.MultimediaNotesFragment;
import net.osmand.plus.development.DevelopmentSettingsFragment;
import net.osmand.plus.monitoring.MonitoringSettingsFragment;
-import net.osmand.plus.monitoring.TripRecordingStartingBottomSheet;
+import net.osmand.plus.monitoring.TripRecordingStartingBottomFragment;
import net.osmand.plus.openplacereviews.OprSettingsFragment;
import net.osmand.plus.osmedit.OsmEditingFragment;
import net.osmand.plus.profiles.SelectAppModesBottomSheetDialogFragment;
@@ -86,7 +86,7 @@ import java.io.Serializable;
import java.util.Set;
import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_SETTINGS_ID;
-import static net.osmand.plus.monitoring.TripRecordingStartingBottomSheet.UPDATE_LOGGING_INTERVAL;
+import static net.osmand.plus.monitoring.TripRecordingStartingBottomFragment.UPDATE_LOGGING_INTERVAL;
public abstract class BaseSettingsFragment extends PreferenceFragmentCompat implements OnPreferenceChangeListener,
OnPreferenceClickListener, AppModeChangedListener, OnConfirmPreferenceChange {
@@ -297,8 +297,8 @@ public abstract class BaseSettingsFragment extends PreferenceFragmentCompat impl
public void onDestroyView() {
super.onDestroyView();
Fragment target = getTargetFragment();
- if (target instanceof TripRecordingStartingBottomSheet) {
- ((TripRecordingStartingBottomSheet) target).show(UPDATE_LOGGING_INTERVAL);
+ if (target instanceof TripRecordingStartingBottomFragment) {
+ ((TripRecordingStartingBottomFragment) target).show(UPDATE_LOGGING_INTERVAL);
}
}
diff --git a/OsmAnd/src/net/osmand/plus/track/TrackAppearanceFragment.java b/OsmAnd/src/net/osmand/plus/track/TrackAppearanceFragment.java
index 807becbb1c..958f45193a 100644
--- a/OsmAnd/src/net/osmand/plus/track/TrackAppearanceFragment.java
+++ b/OsmAnd/src/net/osmand/plus/track/TrackAppearanceFragment.java
@@ -36,8 +36,8 @@ import net.osmand.plus.dialogs.GpxAppearanceAdapter;
import net.osmand.plus.dialogs.GpxAppearanceAdapter.AppearanceListItem;
import net.osmand.plus.dialogs.GpxAppearanceAdapter.GpxAppearanceAdapterType;
import net.osmand.plus.helpers.AndroidUiHelper;
-import net.osmand.plus.monitoring.TripRecordingActiveBottomSheet;
-import net.osmand.plus.monitoring.TripRecordingStartingBottomSheet;
+import net.osmand.plus.monitoring.TripRecordingBottomFragment;
+import net.osmand.plus.monitoring.TripRecordingStartingBottomFragment;
import net.osmand.plus.routepreparationmenu.cards.BaseCard;
import net.osmand.plus.routepreparationmenu.cards.BaseCard.CardListener;
import net.osmand.plus.settings.backend.CommonPreference;
@@ -64,7 +64,7 @@ import static net.osmand.plus.dialogs.ConfigureMapMenu.CURRENT_TRACK_COLOR_ATTR;
import static net.osmand.plus.dialogs.GpxAppearanceAdapter.TRACK_WIDTH_BOLD;
import static net.osmand.plus.dialogs.GpxAppearanceAdapter.TRACK_WIDTH_MEDIUM;
import static net.osmand.plus.dialogs.GpxAppearanceAdapter.getAppearanceItems;
-import static net.osmand.plus.monitoring.TripRecordingActiveBottomSheet.UPDATE_TRACK_ICON;
+import static net.osmand.plus.monitoring.TripRecordingBottomFragment.UPDATE_TRACK_ICON;
public class TrackAppearanceFragment extends ContextMenuScrollFragment implements CardListener, ColorPickerListener {
@@ -398,10 +398,10 @@ public class TrackAppearanceFragment extends ContextMenuScrollFragment implement
@Override
public void onContextMenuDismiss(@NonNull ContextMenuFragment fragment) {
Fragment target = getTargetFragment();
- if (target instanceof TripRecordingStartingBottomSheet) {
- ((TripRecordingStartingBottomSheet) target).show(UPDATE_TRACK_ICON);
- } else if (target instanceof TripRecordingActiveBottomSheet) {
- ((TripRecordingActiveBottomSheet) target).show(UPDATE_TRACK_ICON);
+ if (target instanceof TripRecordingStartingBottomFragment) {
+ ((TripRecordingStartingBottomFragment) target).show(UPDATE_TRACK_ICON);
+ } else if (target instanceof TripRecordingBottomFragment) {
+ ((TripRecordingBottomFragment) target).show(UPDATE_TRACK_ICON);
}
}
From 3bcf8d4e3ba4d68ab77fdf2577a0cf90fa98e32f Mon Sep 17 00:00:00 2001
From: Skalii
Date: Fri, 19 Mar 2021 15:00:37 +0200
Subject: [PATCH 010/103] small fixes;
---
.../plus/monitoring/TripRecordingBottomFragment.java | 7 -------
1 file changed, 7 deletions(-)
diff --git a/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingBottomFragment.java b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingBottomFragment.java
index 471ec813a6..36ecc4edfb 100644
--- a/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingBottomFragment.java
+++ b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingBottomFragment.java
@@ -72,13 +72,6 @@ public class TripRecordingBottomFragment extends MenuBottomSheetDialogFragment {
private GpxBlockStatisticsBuilder blockStatisticsBuilder;
private SelectedGpxFile selectedGpxFile;
-
- private View statusContainer;
- private LinearLayout showTrackContainer;
- private AppCompatImageView trackAppearanceIcon;
- private View buttonSave;
- private GpxBlockStatisticsBuilder blockStatisticsBuilder;
-
private final Handler handler = new Handler();
private Runnable updatingGPS;
From 35064dba0158091eac04d69c278722b73a09cf0a Mon Sep 17 00:00:00 2001
From: Skalii
Date: Fri, 19 Mar 2021 17:48:57 +0200
Subject: [PATCH 011/103] some fixes;
---
...tom_sheet_with_switch_divider_and_additional_button.xml | 4 ++--
OsmAnd/res/layout/preference_button_with_icon_triple.xml | 7 ++-----
OsmAnd/res/values/sizes.xml | 1 -
.../plus/monitoring/TripRecordingActiveBottomSheet.java | 5 +++--
.../plus/settings/fragments/BaseSettingsFragment.java | 4 +---
5 files changed, 8 insertions(+), 13 deletions(-)
diff --git a/OsmAnd/res/layout/bottom_sheet_with_switch_divider_and_additional_button.xml b/OsmAnd/res/layout/bottom_sheet_with_switch_divider_and_additional_button.xml
index e7b84c5305..1eb3dd1bd4 100644
--- a/OsmAnd/res/layout/bottom_sheet_with_switch_divider_and_additional_button.xml
+++ b/OsmAnd/res/layout/bottom_sheet_with_switch_divider_and_additional_button.xml
@@ -20,9 +20,9 @@
android:layout_marginRight="@dimen/content_padding_half"
android:layout_weight="1"
android:gravity="center_vertical"
- app:cardBackgroundColor="?attr/switch_button_active"
app:cardCornerRadius="4dp"
- app:cardElevation="0dp">
+ app:cardElevation="0dp"
+ tools:cardBackgroundColor="?attr/switch_button_active">
diff --git a/OsmAnd/res/values/sizes.xml b/OsmAnd/res/values/sizes.xml
index 79fa32d1c3..dae06fed05 100644
--- a/OsmAnd/res/values/sizes.xml
+++ b/OsmAnd/res/values/sizes.xml
@@ -418,5 +418,4 @@
3sp
80dp
- 160dp
\ No newline at end of file
diff --git a/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingActiveBottomSheet.java b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingActiveBottomSheet.java
index 7aaa832dd1..dc965143d3 100644
--- a/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingActiveBottomSheet.java
+++ b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingActiveBottomSheet.java
@@ -579,8 +579,9 @@ public class TripRecordingActiveBottomSheet extends MenuBottomSheetDialogFragmen
}
public static void setShowOnMapBackground(View view, boolean checked, boolean nightMode) {
- int background = checked ? getActiveTransparentBackgroundId(nightMode) : getInactiveStrokedBackgroundId(nightMode);
- view.setBackgroundResource(background);
+ Drawable background = AppCompatResources.getDrawable(view.getContext(),
+ checked ? getActiveTransparentBackgroundId(nightMode) : getInactiveStrokedBackgroundId(nightMode));
+ view.setBackgroundDrawable(background);
}
public static void setTextColor(Context context, TextView tv, boolean enabled, boolean nightMode, ItemType type) {
diff --git a/OsmAnd/src/net/osmand/plus/settings/fragments/BaseSettingsFragment.java b/OsmAnd/src/net/osmand/plus/settings/fragments/BaseSettingsFragment.java
index d71387c0ce..a426321eb9 100644
--- a/OsmAnd/src/net/osmand/plus/settings/fragments/BaseSettingsFragment.java
+++ b/OsmAnd/src/net/osmand/plus/settings/fragments/BaseSettingsFragment.java
@@ -923,9 +923,7 @@ public abstract class BaseSettingsFragment extends PreferenceFragmentCompat impl
args.putString(APP_MODE_KEY, appMode.getStringKey());
}
fragment.setArguments(args);
- if (target != null) {
- fragment.setTargetFragment(target, 0);
- }
+ fragment.setTargetFragment(target, 0);
activity.getSupportFragmentManager().beginTransaction()
.replace(R.id.fragmentContainer, fragment, screenType.fragmentName)
.addToBackStack(DRAWER_SETTINGS_ID + ".new")
From 7a985a4c0051ffab46ab096550cb7a383bdfaa1f Mon Sep 17 00:00:00 2001
From: Shjosan
Date: Fri, 19 Mar 2021 10:23:15 +0000
Subject: [PATCH 012/103] Translated using Weblate (Swedish)
Currently translated at 67.9% (2504 of 3685 strings)
---
OsmAnd/res/values-sv/strings.xml | 245 ++++++++++++++++++++++++++++---
1 file changed, 221 insertions(+), 24 deletions(-)
diff --git a/OsmAnd/res/values-sv/strings.xml b/OsmAnd/res/values-sv/strings.xml
index f9305301d2..0dd3173583 100644
--- a/OsmAnd/res/values-sv/strings.xml
+++ b/OsmAnd/res/values-sv/strings.xml
@@ -159,7 +159,7 @@
till vänster
framåt till vänster
mot
- Höjd
+ Höjd över havet
Kartutseende
Att hämta bilen på:
em
@@ -419,11 +419,11 @@ Nyttjat utrymme är {1} MB.
Visningsspråk
Nästa
Föregående
- Ändra enheter för avstånd.
- Enheter för avstånd
- Eng. mil/fot
- Eng. mil/yard
- Kilometer/meter
+ Ändra vad avstånd mäts i.
+ Enhet för längd
+ Miles/fot
+ Miles/yard
+ Kilomter/meter
yd
Dela platsen med
Plats: %1$s\n%2$s
@@ -1326,7 +1326,7 @@ Nyttjat utrymme är {1} MB.
Versioner
Punkter
Inaktiverad
- Aktiverad
+ Aktiverat
Redigera grupp
En Internetuppkoppling krävs för att installera denna modul.
Aktivera
@@ -1391,7 +1391,7 @@ Nyttjat utrymme är {1} MB.
Starta
Stoppa
Importera
- Exportera
+ Export
Mer…
Fler åtgärder
Visa inte nästa gång
@@ -1403,7 +1403,7 @@ Nyttjat utrymme är {1} MB.
Ett oväntat fel uppstod
Åtgärd {0}
Stäng
- Avsluta
+ Utgång
Visa
Visa alla
Visa på kartan
@@ -1605,12 +1605,12 @@ Long %2$s
Lägg till favorit
Ange enhet för hastighet.
Enhet för hastighet
- Sjömil
- Kilometer i timmen
- Engelska mil i timmen
- Meter i sekunden
+ Distansminuter
+ Kilometer per timme
+ Miles per timme
+ Meter per sekund
Minuter per kilometer
- Minuter per engelsk mil
+ Minuter per mile
Sjömil i timmen (knop)
Inspelning av resa
Navigering
@@ -1618,9 +1618,9 @@ Long %2$s
Lägg till ny
Välj kategori
Antal rader
- nmi
+ di
nmi/h
- min/m
+ min/mi
min/km
m/s
Konturlinjer inaktiverade
@@ -1676,7 +1676,7 @@ Long %2$s
Baskarta över världen (täcker hela världen med låg zoomningsgrad) saknas eller är gammal. Hämta gärna denna karta för en global översikt.
Skicka
Teckenförklaring
- Uppdatera
+ Uppdatering
Återkoppling
Läs mer
Nyheter
@@ -1728,7 +1728,7 @@ Long %2$s
Åtgärd ändra
Åtgärd ta bort
Nära
- Dölj
+ Göm
Lägsta kvalitet
Högsta kvalitet
Videokvalitet
@@ -1940,7 +1940,7 @@ Om du tycker om OsmAnd och OSM och vill stödja dem så är detta ett utmärkt s
Hoppa över nerladdning av kartor
Välj en annan region
Obegränsade nedladdningar av kartor, uppdateringar och Wikipedia-plugin.
- Mil/metrar
+ Miles/meter
Låt OsmAnd avgöra din plats och föreslå kartor att hämta för den regionen.
Platsen hittades inte
Ingen Internetanslutning
@@ -2055,7 +2055,7 @@ Vänligen tillhandahåll fullständig kod
Rutthöjd
Sänkning
Stigning
- Genomsnittshöjd
+ Genomsnittlig höjd
Tid
Total sträcka
Tidsspann
@@ -2064,7 +2064,7 @@ Vänligen tillhandahåll fullständig kod
Sluttid
Färg
Välj mapp för GPX-filer
- Medelhastighet
+ Genomsnittlig hastighet
Tid i rörelse
Högsta hastighet
Serbiska (latin)
@@ -2093,7 +2093,6 @@ Vänligen tillhandahåll fullständig kod
"Kartöverlägget har ändrats till \"%s\"."
Tryck länge och dra knappen för att ändra dess position på skärmen.
Använd höjddata
-
Visa djupkonturer och punkter.
Sluttning
Höjdområde
@@ -2882,7 +2881,7 @@ Vänligen tillhandahåll fullständig kod
Konfigurera ruttparametrar
Ruttparametrar
Appprofil ändrat till \"%s\"
- Logcat-buffert
+ Logcat buffer
Tilläggsinställningar
Sida vid sida
%1$d filer kopierades (%2$s).
@@ -3069,5 +3068,203 @@ Vänligen tillhandahåll fullständig kod
Undvik resor till
Ladda ner Wikipedia kartor
Få information om sevärdheter från Wikipedia, en inbunden samling av offline artiklar om ställen och destinationer.
-
+ Visa start och mål-ikoner
+ Kontrollera och dela detaljerade loggar för appen
+ Stängd OSM not
+ Ställ in arbetsdagar för att fortsätta
+ Rutt mellan punkter
+ Planera en rutt
+ Lägg till i ett spår
+ Välj intervall med vilket markeringar med avstånd eller tid på spåret ska visas.
+ Välj önskat delningsalternativ: efter tid eller efter avstånd.
+ Fast
+ Importera spår
+ Öppna befintligt spår
+ Skapa ny rutt
+ Välj en spårfil att öppna.
+ Skriv över spår
+ Spara som nytt spår
+ Omvänd rutt
+ Hela spåret beräknas om med den valda profilen.
+ Endast nästa segment beräknas om med den valda profilen.
+ Välj hur du ska ansluta punkterna, med en rak linje, eller beräkna en rutt mellan dem enligt nedan.
+ Hela spåret
+ Klicka sedan på ditt spår till närmaste tillåtna väg med en av dina navigationsprofiler för att använda detta alternativ.
+ Tröskelavstånd
+ Välj en spårfil som du vill lägga till det nya segmentet till.
+ Vid omvänd riktning
+ Spara som ny spårfil
+ Lägg till en spårfil
+ Spår
+ Spår
+ Spår
+ Logga spår till GPX-fil
+ Spårrutt
+ Lägg till spårfil
+ Lägg till spår waypoint
+ Lägg till spår waypoint
+ Spara som spårfil
+ Välj spårfil att följa
+ Välj spårfil att följa eller importera spåret från din enhet.
+ Navigera från min position till spåret
+ Punkt på spåret för att navigera
+ Fäst på vägarna
+ Spårloggning pausar när appen dödas (via senaste appar). (OsmAnd-bakgrundsindikationen försvinner från Android-meddelandefältet.)
+ Ange loggningsintervallet för den allmänna spårinspelningen (aktiverad via widgeten \'Trip recording\' på kartan).
+ • Uppdaterad Planera en ruttfunktion: gör det möjligt att använda olika navigeringstyper per segment och inkludera spår
+\n
+\n • Ny utseendemeny för spår: välj färg, tjocklek, visningspilar, start- och målikoner
+\n
+\n • Förbättrad synlighet för cykelnoder.
+\n
+\n • Spår kan nu tappas, har snabbmeny med grundläggande information.
+\n
+\n • Förbättrade sökalgoritmer
+\n
+\n • Förbättrade alternativ för följespår i Navigation
+\n
+\n • Fixade problem med import / export av profilinställningar
+\n
+\n
+ Tack för att du köpte \"Konturlinjer\"
+ Ditt AppGallery-konto debiteras vid köpbekräftelsen.
+\n
+\nAbonnemanget förlängs automatiskt såvida det inte sägs upp före förnyelsedatumet. Ditt konto debiteras för förnyelseperioden (månad / tre månader / år) endast på förnyelsedatumet.
+\n
+\nDu kan hantera och avbryta dina prenumerationer i dina AppGallery-inställningar.
+ Inbyggd kollektivtrafikutveckling
+ Byt till Java (säker) ruttberäkning för kollektivtrafik
+ Visa alla dina ändringar som ännu inte har laddats upp eller OSM-buggar i %1$s. Redan uppladdade ändringar visas inte längre.
+ Du måste logga in för att ladda upp nya eller modifierade ändringar.
+\n
+\nDu kan logga in med den säkra OAuth-metoden eller använda ditt användarnamn och lösenord.
+ \"Offentligt\" betyder att spårningen visas offentligt i dina GPS-spår, i offentliga GPS-spårningar och i den offentliga spårningslistan med tidsstämplar i råform. Data som visas via API hänvisar inte till din spårningssida. Tracepoint-tidsstämplar är inte tillgängliga via det offentliga GPS-API:et och spårpunkter är inte kronologiskt ordnade.
+ Lägg till online-dirigeringsmotorn
+ Redigera online-dirigeringsmotorn
+ Subtyp
+ Fordon
+ API-nyckel
+ Sever URL
+ Ange param
+ Behåll tom om inte
+ URL med alla parametrar kommer att se ut så här:
+ Testa ruttberäkning
+ Körning
+ Fot
+ Cykel
+ Bil
+ Kopiera adress
+ Online-routningsmotor
+ Online-routningsmotorer
+ Mappar
+ Välj mapp
+ Välj mapp eller lägg till en ny
+ Tom
+ Analysera delad intervall
+ Ladda upp till OpenStreetMap
+ Redigera spår
+ Byt namn på spår
+ Byt mapp
+ sek
+ Passerar
+ Närma sig
+ Långt förberedan
+ Förbereda
+ Av rutten
+ Anländer till destinationen
+ Sväng
+ Tid- och avstånds-intervaller
+ Meddelandetid för olika röstmeddelanden beror på typ, aktuell navigationshastighet och standardnavigeringshastighet.
+ Meddelandetid
+ Starta inspelning
+ Visa spår på kartan
+ Rullstol
+ Vandring
+ Gång
+ Elektrisk cykling
+ Bergscykling
+ Vägcyckling
+ Vanlig cyckling
+ Lastbil
+ Liten lastbil
+ Lastbil
+ Skoter
+ Racercykel
+ MTB
+ Serverfel: %1$s
+ Namnet finns redan
+ Ta bort den här online-dirigeringsmodulen\?
+ Läs allt
+ Redigera beskrivning
+ Ta bort waypoints
+ Kopiera till kartmarkeringar
+ Kopiera till favoriter
+ Uppladdning
+ Uppladdning klar
+ Laddar upp %1$d av %2$d
+ Välj segment
+ %1$s innehåller mer än ett segment, du måste välja önskad del för navigering.
+ Segment %1$d
+ OpenPlaceReviews är ett community-drivet projekt om offentliga platser som restauranger, hotell, museer, och waypoints. Det samlar all offentlig information om dem så som foton, recensioner, länkar till andra systemlänkar OpenStreetMap, Wikipedia.
+\n
+\nAll OpenPlaceReview-data är öppen och tillgänglig för alla: http://openplacereviews.org/data.
+\n
+\nDu kan läsa mer på: http://openplacereviews.org
+ Uppladdat %1$d av %2$d
+ Välj redigeringar för uppladdning
+ Berg relief/ sluttning / konturlinjer
+ OpenPlaceReviews
+ Använd test.openplacereviews.org
+ Logga in på OpenPlaCereViews
+ Vatten
+ Vinter
+ Snöskoter
+ Ridning
+ Racing
+ Mountainbike
+ Cyckling
+ Vandring
+ Löpning
+ Gående
+ Offroad
+ Motorcyckel
+ Bil
+ Använd vägbegränsningar som är aktiva nu på kartan
+ Optimerad kortare rutt (energibesparing)
+ Välj körsyfte för att få kortare, snabbare eller säkrare rutt
+ Ikonen för aktuell plats snappas till den aktuella navigeringsvägen
+ Rotera inte kartvyn om hastigheten är mindre än en tröskelvärde
+ Omstart
+ Alla regioner
+ Ta bort %1$d filer\?
+ Stoppa utan att spara
+ Spara och stoppa inspelningen
+ Spårinspelningen stoppades
+ Är du säker på att du vill stoppa inspelningen\?
+\nAll osparad data kommer att gå förlorad.
+ Pausad
+ Omstart av program krävs för att tillämpa vissa inställningar.
+ Ruttning kan undvika branta sluttningar.
+ En toggel för att visa eller dölja koordinatwidgeten på kartan.
+ Avståndsmätning genom att trycka
+ Senaste tillgängliga OpenStreetMap-uppdateringen:
+ Uppdaterad: %s
+ Senast kontrollerad: %s
+ Uppdateringsfrekvens
+ Kartuppdateringar kommer att kontrolleras varje vecka. Nästa gång %1$s i %2$s.
+ Kartuppdateringar kommer att kontrolleras varje dag. Nästa gång %1$s i %2$s.
+ Kartuppdateringar kontrolleras varje timme. Nästa gång %1$s i %2$s.
+ Ta bort uppdateringar
+ Är du säker på att du vill ta bort alla %s liveuppdateringar\?
+ Inköp
+ Välj en kategori eller skapa en ny
+ Inspelningen kommer fortsätta.
+ Kopiera POI namn
+ Visa/Göm
+ Intervall
+ Dölj naturreservat, skyddade områden och nationalparkgränser
+ Naturgränser
+ Spåret innehåller inte höjddata.
+ Spåret innehåller inte hastighetsdata.
+ Välj en annan typ av färgning.
\ No newline at end of file
From 442e50a26c80603a9eb9bb564e6ee8a2086a2351 Mon Sep 17 00:00:00 2001
From: letypequividelespoubelles
Date: Thu, 18 Mar 2021 14:12:30 +0000
Subject: [PATCH 013/103] Translated using Weblate (French)
Currently translated at 99.9% (3683 of 3685 strings)
---
OsmAnd/res/values-fr/strings.xml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/OsmAnd/res/values-fr/strings.xml b/OsmAnd/res/values-fr/strings.xml
index 6ccab62d05..2542de9309 100644
--- a/OsmAnd/res/values-fr/strings.xml
+++ b/OsmAnd/res/values-fr/strings.xml
@@ -4030,4 +4030,7 @@
Itinéraire court optimisé (plus économe en énergie)
Masquer les limites des réserves naturelles, des zones protégées et des parcs nationaux
Limites naturelles
+ %1$s contient plus d\'un segment, vous devez sélectionner le tronçon nécessaire à la navigation.
+ Sélectionnez le mode de conduite pour avoir l\'itinéraire le plus court, le plus rapide, ou le plus sûr
+ Appuyer pour afficher ou cacher le widget Coordonnées sur la carte.
\ No newline at end of file
From dd75f3f4ec967bfba634e52b43685bad73b7d43e Mon Sep 17 00:00:00 2001
From: Evgenii Martynenko
Date: Sat, 20 Mar 2021 01:17:02 +0000
Subject: [PATCH 014/103] Translated using Weblate (Russian)
Currently translated at 99.8% (3679 of 3685 strings)
---
OsmAnd/res/values-ru/strings.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/OsmAnd/res/values-ru/strings.xml b/OsmAnd/res/values-ru/strings.xml
index 5398b886f7..4c17c33453 100644
--- a/OsmAnd/res/values-ru/strings.xml
+++ b/OsmAnd/res/values-ru/strings.xml
@@ -4036,4 +4036,5 @@
Выберите категорию или добавьте новую
Копировать имя POI
Интервал
+ Скрыть природный заповедник, особо охраняемые природные территории и границы национального парка
\ No newline at end of file
From 7c47ef847cc07b152d8383afe4c875ea5022f202 Mon Sep 17 00:00:00 2001
From: iman
Date: Fri, 19 Mar 2021 07:36:49 +0000
Subject: [PATCH 015/103] Translated using Weblate (Persian)
Currently translated at 99.9% (3682 of 3685 strings)
---
OsmAnd/res/values-fa/strings.xml | 144 ++++++++++++++++++++++---------
1 file changed, 104 insertions(+), 40 deletions(-)
diff --git a/OsmAnd/res/values-fa/strings.xml b/OsmAnd/res/values-fa/strings.xml
index 872f82859f..656bb3afc8 100644
--- a/OsmAnd/res/values-fa/strings.xml
+++ b/OsmAnd/res/values-fa/strings.xml
@@ -56,7 +56,7 @@
فایل ضبطشده قابلپخش نیست.
حذف فایل ضبطشده
پخش
- ضبط
+ در حال ضبط
توقف
شروع
یادداشتهای صوتی/تصویری
@@ -118,7 +118,7 @@
دقیقه
ساعت پارک خودرو
حافظهٔ اختصاصیافته
- حافظهٔ کل سیستم
+ کل حافظهٔ native
مبدأ از نزدیکترین جاده خیلی دور است.
خودرو را از پارکینگ بردارید
هشدار
@@ -489,7 +489,7 @@
مرزهای مناطق را نشان نده (تقسیمات سیاسی سطح ۵–۹).
جستوجوی حرفبهحرف نام شهر
نقشههای فقط-جاده
- اجرای برنامه در حالت ایمن (بهجای کد اصلی از اندروید کُندتر استفاده میکند).
+ اجرای برنامه در حالت ایمن (بهجای کد native از کد Android که کُندتر است استفاده میکند).
برنامه در حالت ایمن اجرا شده است (از طریق تنظیمات آن را غیرفعال کنید).
سرویس پسزمینهٔ OsmAnd هنوز در حال اجراست. آن را هم متوقف میکنید؟
بستن بستهٔ تغییرات
@@ -617,11 +617,11 @@
قفلگشایی
تنظیم فواصل بیدارباش:
سرعت شبیهسازی مسیر:
- کل حافظهٔ اختصاصیافته به برنامه %1$s مگابایت (دالویک %2$s مگابایت، بقیه %3$s مگابایت).
-\nحافظهٔ نسبی %4$s مگابایت (حد آندروئید %5$s مگابایت، دالویک %6$s مگابایت).
+ کل حافظهٔ native اختصاصیافته به برنامه %1$s مگابایت (دالویک %2$s مگابایت، بقیه %3$s مگابایت).
+\nحافظهٔ proportional %4$s مگابایت (حد اندروید %5$s مگابایت، دالویک %6$s مگابایت).
حافظهٔ اختصاصیافته %1$s مگابایت (حد اندروید %2$s مگابایت، دالویک %3$s مگابایت).
مکان همرسانده
- قابلردگیری
+ قابلردیابی
قابلشناسایی
قالب
نقشهٔ پایه برای کارکرد اولیه موردنیاز است و در صف دانلود قرار گرفت.
@@ -679,8 +679,8 @@
آیا {0} فایل را دانلود میکنید؟
\n {1} مگابایت (از {2} مگابایت) استفاده خواهد شد.
پوستهٔ شفاف
- کتابخانهٔ بومی بر روی این دستگاه پشتیبانی نمیشود.
- مقداردهی اولیهٔ کتابخانهٔ بومی…
+ کتابخانهٔ native بر روی این دستگاه پشتیبانی نمیشود.
+ مقداردهی اولیهٔ کتابخانهٔ native…
نمای نقشه خودکار-مرکز
مدتزمانی که طول میکشد تا نقشه با موقعیت کنونی همگام شود.
ناوبری فقط با حالت خودکار-مرکز
@@ -973,7 +973,7 @@
این افزونه امکانات قابلیتدسترسی (accessibility) در دستگاهتان را مستقیماً در OsmAnd به کار میگیرد و تسهیلاتی را در اختیارتان میگذارد؛ مانند تنظیمکردن سرعت گفتار موتور صوتی، تبدیل متن به گفتار (مثل اعلام موقعیت شما)، پیمایش صفحه بهکمک صفحهٔ جهتی (D-pad) و استفاده از توپک (trackball) برای تنظیم زوم.
با ایجاد یا اصلاح نقاط توجه (POI)، ایجاد یادداشتهای OSM یا نظردادن روی آنها و بارگذاری فایلهای GPXای که ضبط کردهاید در تکمیل نقشهٔ OSM مشارکت کنید. برای این منظور لازم است نام کاربری و گذرواژهٔ خود را در OsmAnd وارد کنید. OpenStreetMap.org یک پروژهٔ نقشهکشی جامعهمحور، جهانی و در مالکیت عمومی است.
گفتاری را انتخاب کنید و با پخش پیامها، آن را امتحان کنید:
- رندر بومی
+ رندرگیری native
حالت قابلیت دسترسی
امکانات موردنیاز برای کاربران مبتلا به نارسایی جسمی را فعال میکند.
جهتها (۸سویه)
@@ -1540,7 +1540,7 @@
آبی شفاف
بنفش
بنفش شفاف
- برای اینکه تغییرات به کار بسته شود، یک بار برنامه را ببندید و باز کنید.
+ برای به کار بستن تغییرات، لازم است برنامه باز و بسته شود.
روشن
تیره
بنگالی
@@ -1631,7 +1631,7 @@
دانلود نامحدود نقشهها، روزآمدسازیهای نامحدود و افزونهٔ ویکیپدیا.
مایل/متر
صرفنظر از دانلود نقشهها
- شما نقشهٔ آفلاینی را نصب نکردهاید. نقشهای را از لیست انتخاب کنید یا اینکه بعداً از طریق «منو ← %1$s»، آن را دانلود کنید.
+ نقشهٔ آفلاینی نصب نکردهاید. نقشهای را از لیست انتخاب نمایید یا بعداً از طریق «منو ← %1$s»، آن را دانلود کنید.
منطقهٔ دیگری را انتخاب کنید
جستوجوی نقشهها…
اجازه دهید برنامه موقعیت شما را پیدا کند تا نقشهٔ آنجا را برای دانلود پیشنهاد بدهد.
@@ -1755,7 +1755,7 @@
خطا
از اینکه منحنیهای میزان عمق دریا را خریدید سپاسگزاریم
آنالیز روی نقشه
- در حال نمایش
+ نمایان
بازیابی خریدها
فونتهای نقشه
رانندگی از راست
@@ -1813,7 +1813,7 @@
منحنیهای میزان عمق دریا
تراکم منحنی میزان
تراکم منحنی میزان
- عرض منحنی میزان
+ ضخامت منحنی میزان
ضخامت منحنی میزان
استفاده از آزادراه
مسیردهی از آزادراه مجاز میشود.
@@ -3169,7 +3169,7 @@
پوستهٔ برنامه، یکاها، منطقه
پیکربندی پروفایل
پیامهای گفتاری فقط در هنگام ناوبری پخش میشود.
- راهنما و فرمانهای ناوبری
+ فرمانهای ناوبری و اعلام پیامها
پیامهای گفتاری
هشدارهای تصویری
پروفایل برنامه به «%s» تغییر کرد
@@ -3205,7 +3205,7 @@
پارک برفی
سورتمه کالسکهای
سورتمه
-
+ پیادهگردی
تور اسکی
دانهیل
نوردیک
@@ -3307,7 +3307,7 @@
%1$s پاکسازی شود؟
شبکههای گره
خاموش
- پیوند پارهها
+ اتصال پارهها
ثبت جهت
هنگام ضبط، جهت (heading) را برای هر یک از نقطههای رد ثبت میکند.
%1$s • %2$s
@@ -3382,7 +3382,7 @@
ردهای ضبطشدهٔ شما در %1$s یا در پوشهٔ OsmAnd قرار دارند.
یادداشتهای OSMای شما در %1$s قرار دارند.
همهٔ ویرایشها یا یادداشتهای OSMای آپلودنشدهٔ خود را در %1$s ببینید. تغییرات آپلودشده را دیگر نمیبینید.
- لاگهای جزئی برنامه را بررسی و همرسانی کنید
+ لاگهای باجزئیات برنامه را بررسی و همرسانی کنید
استفاده از برنامهٔ سیستم
صدای شاتر دوربین
احراز هویت موفقیتآمیز بود
@@ -3554,7 +3554,7 @@
%1$s / %2$s
هنگام تأیید خرید، بها از حساب گوگلپلی شما پرداخت میشود.
\n
-\nاگر اشتراک خود را پیش از پایان زمان اشتراک از تنظیمات گوگلپلی لغو کرده باشید، اشتراک شما بهطور خودکار تمدید نخواهد شد. فقط در موعد تمدید اشتراک، برای دورهٔ (ماهانه/سهماهه/سالانه) از حسابتان برداشت میشود.
+\nاشتراک شما بهطور خودکار تمدید خواهد شد مگر اینکه پیش از تاریخ تمدید، اشتراک خود را از تنظیمات گوگلپلی لغو کرده باشید. فقط در موعد تمدید اشتراک، برای دورهٔ تمدید (ماهانه / سهماهه / سالانه) از حسابتان برداشت میشود.
\n
\nبرای مدیریت یا لغو اشتراک خود، به تنظیمات گوگلپلی بروید.
OsmAnd tracker
@@ -3629,7 +3629,7 @@
جاهای پارک
بازنشانی ترتیب پیشفرض اقلام
OsmAnd GPX قالب درستی ندارد. لطفاً برای بررسی بیشتر با گروه پشتیبانی تماس بگیرید.
- زمان خاموشی صفحه پس از بیدارباش را انتخاب کنید. («%1$s» یعنی خاموش نشود)
+ زمان خاموشی صفحه پس از بیدارباش را انتخاب کنید. («%1$s» یعنی زمانی تنظیم نخواهد شد.)
اگر «%1$s» روشن باشد، زمان فعالیت به آن وابسته خواهد بود.
همیشه
کنترل صفحه
@@ -3641,14 +3641,14 @@
فشردن دکمهٔ خاموش/روشن دستگاه، صفحه را روشن میکند و OsmAnd را روی صفحهٔ قفل نمایش میدهد.
دکمهٔ خاموش/روشن
حسگر مجاورتی
- روشن نگه داشتن صفحه
+ صفحه روشن بماند
صفحه را خاموش نگه دار
فراتابی مرکاتور
یک فایل تصویر برای هر کاشی
- هنگام استفاده از منبع بهعنوان نقشه یا رولایه/زیرلایه، بر نمایش آن اثر میگذارند.
-\n
+ هنگامی که بهعنوان نقشه یا رولایه/زیرلایه استفاده میشود، نمایش آن تحت تأثیر قرار میگیرد:
+\n
\n%1$s: نقشه به دامنهٔ زوم انتخابشده محدود میشود.
-\n
+\n
\n%2$s: درجات زوم که در آن کاشیهای اصلی نمایان خواهند بود. خارج از این مقدارها افزایش یا کاهش مقیاس رخ خواهد داد.
فایل SQLiteDB
نامی برای منبع نقشهٔ آنلاین بنویسید.
@@ -3657,10 +3657,10 @@
زمان انقضا
قالب ذخیرهگاه
کمترین و بیشترین درجهٔ زوم را برای نمایش یا بارکردن نقشهٔ آنلاین تنظیم کنید.
- کاشیهای ذخیرهشده پس از این مدت (به دقیقه) مجدداً دانلود میشوند. این خانه را خالی بگذارید تا کاشیهای این منبع هیچگاه تازهسازی نشود.
-\n
-\nیک روز ۱ ۴۴۰ دقیقه است.
-\nیک هفته ۱۰ ۰۸۰ دقیقه است.
+ کاشیهای ذخیرهشده پس از این مدت (به دقیقه) مجدداً دانلود میشوند. این خانه را خالی بگذارید تا کاشیهای این منبع هیچگاه تازهسازی نشوند.
+\n
+\nیک روز ۱ ۴۴۰ دقیقه است.
+\nیک هفته ۱۰ ۰۸۰ دقیقه است.
\nیک ماه ۴۳ ۸۲۹ دقیقه است.
شیوهٔ ذخیرهسازی کاشیهای دانلودشده را انتخاب کنید.
زمان پیشفرض خاموشی صفحه
@@ -3675,7 +3675,7 @@
متر
جزئیات اضافهتر را روی نقشه آشکار یا پنهان کنید
نقشهٔ شب
- غیرفعال است. به گزینهٔ «روشن نگه داشتن صفحه» در قسمت «زمان خاموشی پس از بیدارباش» نیاز دارد.
+ غیرفعال است. به گزینهٔ «صفحه روشن بماند» در قسمت «زمان خاموشی پس از بیدارباش» نیاز دارد.
فراتابی شبه مرکاتور
اتصال
اتصال
@@ -3794,7 +3794,7 @@
نام فایل
پیشفرض سیستم
فقط پارهٔ انتخابشده با استفاده از پروفایل انتخابی بازمحاسبه میشود.
- آخرین تغییر
+ آخرین تغییریافته
نام: ی - الف
نام: الف - ی
ردنگاری خودکار در هنگام ناوبری
@@ -3828,7 +3828,7 @@
دادهٔ OsmAnd Live
دادهٔ OsmAnd Live
مسیریابی دومرحلهای برای ناوبری خودرویی.
- برای مسیریابی حملونقل عمومی از محاسبات جاوا (امن) استفاده میکند
+ برای مسیریابی حملونقل عمومی از محاسبات جاوا (ایمن) استفاده میکند
نقشههای محلی
ویژه
حملونقل
@@ -3838,8 +3838,8 @@
اورژانس
سفر
تازهها
- برای استفاده از قابلیتهای ویرایشی، از طریق OAuth ثبت ورود کنید
- ثبت ورود از طریق OAuth
+ برای استفاده از قابلیتهای ویرایشی، از طریق OAuth وارد شوید
+ ورود از طریق OAuth
پاکسازی توکن OAuth اوپناستریتمپ
خارج شدید
فایل قبلاً در OsmAnd درونبرد شده است
@@ -3852,7 +3852,7 @@
دستکم دو نقطه اضافه کنید
ورود به اوپناستریتمپ
ورود به OpenStreetMap.org
- ثبت ورود از طریق اوپناستریتمپ
+ ورود از طریق اوپناستریتمپ
برای آپلود تغییرات جدید باید وارد شوید (login).
\n
\nبرای ورود میتوانید از روش امن OAuth یا روش نام کاربری و گذرواژه استفاده کنید.
@@ -3877,20 +3877,20 @@
دستگاه شما تنها %1$s فضای خالی دارد. لطفا مقادری فضا خالی کنید و یا تعداد موارد برونریزی را کاهش دهید.
فضای کافی موجود نیست
گروههایی را که درونریزی خواهند شد را انتخاب کنید.
- مواردی را که درونریزی خواهند شد را انتخاب کنید.
+ مواردی که درونبرد خواهند شد را انتخاب کنید.
افزودن به مپیلاری
افزودن به OpenPlaceReviews
- برای امتحان کردن بارگذاری یادداشت / نقاط توجه و GPX از dev.openstreetmap.org به جای openstreetmep.org استفاده کنید.
- از dev.openstreetmap.org استفاده کنید
+ برای آپلود آزمایشی یادداشت / نقطهٔ توجه / GPX، بهجای openstreetmep.org از dev.openstreetmap.org استفاده کنید.
+ استفاده از dev.openstreetmap.org
برنامه OsmAnd عکسها را از چند منبع نشان میدهد:
\nاز OpenPlaceReview برای عکسهای نقاط توجه؛
\nاز مپیلاری برای تصویر سطح خیابان؛
\nاز وب و ویکیپدیا برای عکسهای نقاط توجه متناسب با دادههای اوپناستریتمپ.
هواپیمای سبک
- اتصال بخشها
+ اتصال پارهها
تقطیع از اینجا به قبل
تقطیع از این جا به بعد
- افزودن یک بخش جدید
+ افزودن یک پارهٔ جدید
نمایهٔ OsmAnd
نمایهٔ کاربر
زمانهای پیامهای گفتاری
@@ -3911,7 +3911,7 @@
برای درونبرد لازم است
برعکسکردن همهٔ نقطهها
پروفایلِ هنگام شروع برنامه را انتخاب کنید.
- آخرین استفاده
+ آخرین استفادهشده
افزودن موتور مسیریابی آنلاین
ویرایش موتور مسیریابی آنلاین
وسیله نقلیه
@@ -3923,7 +3923,7 @@
پا
دوچرخه
خودرو
- برای اینکه برخی تنظیمات به کار بسته شود، لازم است برنامه را ببندید و دوباره باز کنید.
+ برای به کار بستن برخی تنظیمات، لازم است برنامه باز و بسته شود.
پنهانکردن مرز ذخیرهگاههای طبیعی، مناطق حفاظتشده و پارکهای ملی
آخرین زمان بررسی: %s
آخرین روزآمدسازهٔ اوپناستریتمپ:
@@ -4005,4 +4005,68 @@
ضبط رد متوقف شد
آیا برای توقف ضبط مطمئن هستید؟
\nهرچه که ذخیره نشده، از دست خواهد رفت.
+ زیرنوع
+ پیادهسازی Native حملونقل عمومی
+ %1$s * %2$s
+ • گزینهای برای برونبرد و درونبرد همهٔ دادهها شامل تنظیمات، منابع و مکانهای من اضافه شد.
+\n
+\n • طراحی مسیر: برای پارههایی از رد که مسیر دارند نمودار رسم میشود. امکان ساخت و ویرایش چندین پارهٔ رد اضافه شد.
+\n
+\n • شیوهٔ احراز هویت OAuth برای OpenStreetMap اضافه شد، رابط کاربری کادرهای OSM بهبود یافت.
+\n
+\n • پشتیبانی از رنگهای دلخواه برای علاقهمندیها (favorites) و راهنشانهای رد (track waypoints)
+\n
+\n
+ MTB
+ ترجیح مسیرهای پیادهگردی
+ ترجیح مسیرهای پیادهگردی
+ رودهای کوچک و نهرهای مصنوعی مجاز باشد
+ مسیریابی از رودهای کوچک (stream) و نهرهای مصنوعی (drain) مجاز باشد
+ مسیریابی از آبراههای دورهای و غیردائمی را مجاز میکند
+ آبراههای غیردائمی مجاز باشد
+ sec
+ اسکوتر
+ تمامصفحه
+ لطفاً رنگبندی دیگری انتخاب کنید.
+ آلمانی (خودمانی)
+ مناسب برای اسنوموبیلسواری (برفروسواری) است. دارای مسیرها و جادههای ویژه.
+ هزینهٔ اشتراک با رسیدن موعد دورهٔ انتخابی از حسابتان پرداخت میشود. هر زمان که خواستید در AppGallery آن را لغو کنید.
+ هنگام تأیید خرید، بها از حساب AppGallery شما پرداخت میشود.
+\n
+\nاشتراک شما بهطور خودکار ادامه مییابد مگر اینکه پیش از تاریخ تمدید، اشتراک خود را لغو کرده باشید. فقط در موعد تمدید اشتراک، برای دورهٔ تمدید (ماهانه / سهماهه / سالانه) از حسابتان برداشت میشود.
+\n
+\nبرای مدیریت یا لغو اشتراک خود، به تنظیمات AppGallery بروید.
+ اشتراک OsmAnd Live لغو شده است (expired)
+ اشتراک OsmAnd Live موقتاً متوقف شده است (paused)
+ اشتراک OsmAnd Live در انتظار است (on hold)
+ کایاک
+ Server URL
+ اگر نیاز ندارد خالی بگذارید
+ کپی آدرس
+ موتور مسیریابی آنلاین
+ موتورهای مسیریابی آنلاین
+ پوشهها
+ انتخاب پوشه
+ پوشه را انتخاب کنید یا یکی جدید اضافه نمایید
+ تهی
+ تحلیل بازههای تقسیمشده
+ آپلود در OpenStreetMap
+ ویرایش رد
+ تغییر نام رد
+ تغییر پوشه
+ پیچ
+ هنگام گذر
+ نزدیکشدن
+ آمادگی زودتر
+ آمادگی
+ خروج از مسیر
+ رسیدن به مقصد
+ بازههای زمانی و مسافتی
+ زمان اعلام پیامهای گفتاری به نوع پیام، سرعت ناوبری جاری و سرعت ناوبری پیشفرض بستگی دارد.
+ زمان اعلام پیام
+ شروع دوباره
+ مکث کرده
+ دکمهای برای آشکار یا پنهان کردن ابزارک مختصات روی نقشه.
+ بازه
+ فاصله با لمس دوانگشتی
\ No newline at end of file
From df7574c4a8ce1cc428dd00b1c5eae470fe27e8ea Mon Sep 17 00:00:00 2001
From: ovl-1
Date: Fri, 19 Mar 2021 13:05:06 +0000
Subject: [PATCH 016/103] =?UTF-8?q?Translated=20using=20Weblate=20(Norwegi?=
=?UTF-8?q?an=20Bokm=C3=A5l)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Currently translated at 60.1% (2218 of 3685 strings)
---
OsmAnd/res/values-nb/strings.xml | 41 ++++++++++++++++++++------------
1 file changed, 26 insertions(+), 15 deletions(-)
diff --git a/OsmAnd/res/values-nb/strings.xml b/OsmAnd/res/values-nb/strings.xml
index 75fc2ea21e..8eefe0476c 100644
--- a/OsmAnd/res/values-nb/strings.xml
+++ b/OsmAnd/res/values-nb/strings.xml
@@ -699,7 +699,7 @@
Generelt loggeintervall
t
Varighet
- Avstand
+ Distanse
Turer
Alle
Mer…
@@ -796,7 +796,7 @@
Laster byer…
Ugyldige koordinater
Tilbake til kartet
- Kommentar er lagt til
+ Kommentar lagt til
Ingen bygninger funnet.
Laster gater/bygninger…
Favorittnavn endret til \"%1$s\" for å unngå duplisering.
@@ -924,7 +924,7 @@
Kopierer OsmAnd-datafiler…
Reisemål
GPX-filnavn
- Distansekalkulator & planleggingsverktøy
+ Distansekalkulator og planleggingsverktøy
Relieffskyggelag
Relieffskygger
Audio/Video-data
@@ -1339,7 +1339,7 @@
Legg til kommentar
Navigeringsoppsett.
Viser hvor mange gratis nedlastinger som er igjen.
- Avstand:
+ Distanse:
Tid:
Lyd
Tilgjengelige kart
@@ -1878,7 +1878,7 @@
Marker som parkeringsplass
Rundkjøring: Ta avkjøring %1$d og fortsett
Støtt nye funksjoner
- Maksimumshastighet
+ Maksimumsfart
Starttid
Sluttid
Farge
@@ -2945,7 +2945,7 @@
Velg typen data du vil dele:
Nedlastede kart
Besøkte skjermer
- Definer hvilken data du ønsker å dele med OsmAnd.
+ Bestem hvilke data OsmAnd kan dele.
Hjelp oss å forstå hvilke land- og regionkart som er mest populære.
Hjelp oss å forstå hvilke OsmAnd-funksjoner som er mest populære.
Trykk \"Tillat\" hvis du er enig med vår %1$s
@@ -3832,7 +3832,7 @@
Ressurser
Velg profilen som skal brukes når programmet starter.
Sist brukt
- Tillat bekker og avløp
+ Tillat bekker og dreneringsgrøfter
Tillat periodiske vannveier
Tillat periodiske vannveier
Kjøretøy
@@ -3854,7 +3854,7 @@
Endre mappe
Velg data å eksportere til filen.
Din enhet har kun %1$s ledig. Frigjør litt plass eller velg bort noen elementer fra eksporten.
- ffffffffff|
+ Velg grupper som skal importeres.
Reverser alle punkter
Liten lastebil
Lastebil
@@ -3874,18 +3874,18 @@
Forberedelse
Ankom målet
Sving
- Tid og avstansintervaller
- kunngjøringstid for forskjellige stemmeforespørsler avhenger av forespørselstype, nåværende navigasjonshastighet og forvalgt navigasjonshastighet.
+ Tid og avstandsintervaller
+ Kunngjøringstid for forskjellige talemeldinger avhenger av meldingstype, gjeldende navigasjonshastighet og standard-navigasjonshastighet.
Turgåing
- Fotgjengeri
+ Gåing
sek
Kunngjøringstid
Start opptak
Vis spor på kart
Rullestol
El-sykkel
- Terrengsykkel
- Temposykkel
+ Terrengsykling
+ Racersykkel
Landeveissykling
Vanlig sykling
Tjenerfeil: %1$s
@@ -3895,7 +3895,7 @@
Stor lastebil
Slett denne nettbaserte rutingsmotoren\?
Les hele
- Slett rutepunkt
+ Slett rutepunkter
Luke
Logg inn på OpenStreetMap
Logg inn
@@ -3921,10 +3921,21 @@
Kjøp
Velg kategori eller legg til en ny
Opptaket vil fortsette.
- Kopier POI-navn
+ Kopier interessepunktnavn
Vis/skjul
Intervall
Sporet inneholder ikke høydedata.
Sporet inneholder ikke hastighetsdata.
Velg en annen type fargelegging.
+ Alle regioner
+ Skjul grenser for naturreservat, beskyttede områder og nasjonalparker
+ Naturgrenser
+ Relieffskygge / Bakkehelling / Koter
+ Ridning
+ Turgåing
+ Løping
+ Gåing
+ Optimalisert kortere rute (energisparende)
+ Aktuelle posisjonsikon vil bli festet til gjeldende navigeringsrute
+ Ruting kan unngå kraftige oppoverbakker.
\ No newline at end of file
From 44762177550261eedbdf5b67be6a4d8128c5bd8d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Iv=C3=A1ns?=
Date: Thu, 18 Mar 2021 11:10:57 +0000
Subject: [PATCH 017/103] Translated using Weblate (Galician)
Currently translated at 100.0% (3685 of 3685 strings)
---
OsmAnd/res/values-gl/strings.xml | 33 ++++++++++++++++++++++++++------
1 file changed, 27 insertions(+), 6 deletions(-)
diff --git a/OsmAnd/res/values-gl/strings.xml b/OsmAnd/res/values-gl/strings.xml
index 2f3d46f62b..f129d431fb 100644
--- a/OsmAnd/res/values-gl/strings.xml
+++ b/OsmAnd/res/values-gl/strings.xml
@@ -2567,7 +2567,7 @@ Lon %2$s
Escoller variación da altitude
Amosar curvas e puntos do afundimento.
Curvas do afundimento náuticos
- División automática das gravacións en intres
+ Dividir gravacións após unha pausa
Comezar novo segmento despois dun intre de 6 min, nova pista despois dun intre de 2 h, ou novo ficheiro despois dun intre máis longo se mudaches a data.
Detido
Mínimo desprazamento para o rexistro
@@ -3695,9 +3695,9 @@ Lon %2$s
Fornece a lonxitude do teu vehículo. Algunhas restricións de ruta poden ser aplicadas a vehículos longos.
Eliminar punto de destino máis preto
Fornece un nome para o punto
- O punto de destino actual na ruta será eliminado. Se fora o destino, a navegación sería interrompida.
+ Elimina o seguinte destino da ruta. Se é o destino final, a navegación será detida.
Baixar mapas da Wikipedia
- Obter información sobre os puntos de interese da Wikipedia. É o teu guía de peto sen conexión - só activar o complemento da Wikipedia e desfrutar dos artigos sobre os elementos ó teu redor.
+ Obtén información sobre os puntos de interese da Wikipedia, unha guía de peto sen conexión que inclúe artigos sobre obxectos e destinos.
Enduro
Scooter
Cadeira de rodas
@@ -3808,11 +3808,11 @@ Lon %2$s
Iconas de inicio e fin
Grazas por mercar \'Curvas de nivel\'
A subscrición é cobrada por período escollido. Cancélaa na AppGallery en calquera intre.
- O pagamento será cargado na túa conta da AppGallery no mesmo intre da confirmación da compra.
+ O pagamento será cobrado á túa conta do AppGallery ao confirmar a compra.
\n
-\nA subscrición é renovada de xeito automático a menos que sexa cancelada antes da data de renovación. A túa conta será cargada polo período de renovación (mes/trimestre/ano) só na data de renovación.
+\nA subscrición é renovada de xeito automático a menos que se cancele antes da data de renovación. A conta será cobrada polo período de renovación (mes/trimestre/ano) só na data de renovación.
\n
-\nPodes xestionar e cancelar as túas subscricións indo ós axustes da AppGallery.
+\nPodes administrar e desbotar as subscricións nos axustes do AppGallery.
Evitar sendas peonís, camiños e beirarrúas
Evitar sendas peonís
Desenvolvemento
@@ -4033,4 +4033,25 @@ Lon %2$s
A pista non contén datos de altitude.
A pista non contén datos de velocidade.
Escolle outro tipo de cor.
+ As actualizacións de mapas serán comprobadas cada hora. A seguinte vez %1$s en %2$s.
+ Escoller segmentos
+ %1$s contén máis dun segmento, precisas selecionar a parte necesaria para a navegación.
+ Segmento %1$d
+ Auga
+ Inverno
+ Motoneve
+ Equitación
+ Carreira
+ Bicicleta de montaña
+ Bicicleta
+ Sendeirismo
+ Correndo
+ A pé
+ Todo terreo
+ Motocicleta
+ Automóbil
+ Empregar as restricións de estrada que están activas agora no mapa
+ Ruta optimizada máis curta (baixo consumo)
+ Escolle o propósito da condución para obter unha ruta máis curta, máis rápida ou máis segura
+ Agochar reservas naturais, áreas protexidas e de parques nacionais
\ No newline at end of file
From 37f13f4ee0ca4ba1a3b8f2da6c303267f98fb411 Mon Sep 17 00:00:00 2001
From: scai
Date: Fri, 19 Mar 2021 20:30:37 +0000
Subject: [PATCH 018/103] Translated using Weblate (German)
Currently translated at 100.0% (3894 of 3894 strings)
---
OsmAnd/res/values-de/phrases.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/OsmAnd/res/values-de/phrases.xml b/OsmAnd/res/values-de/phrases.xml
index c143b4967b..11ee006fc4 100644
--- a/OsmAnd/res/values-de/phrases.xml
+++ b/OsmAnd/res/values-de/phrases.xml
@@ -1232,7 +1232,7 @@
Material: Metall
Material: Stahl
Material: Stein
- Martial: Plastik
+ Material: Plastik
Material: Sandstein
Material: Granit
Material: Metall, Holz
@@ -1479,7 +1479,7 @@
Material: Stahlbeton
Material: Beton
Material: Mauerwerk
- Martial: Ziegel
+ Material: Ziegel
Material: Verbundstoff
Material: Kalkstein
Material: Marmor
From a484fcca36a3874ed37ecbbc8facd471552ea1f9 Mon Sep 17 00:00:00 2001
From: Ajeje Brazorf
Date: Thu, 18 Mar 2021 16:28:26 +0000
Subject: [PATCH 019/103] Translated using Weblate (Sardinian)
Currently translated at 99.6% (3882 of 3894 strings)
---
OsmAnd/res/values-sc/phrases.xml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/OsmAnd/res/values-sc/phrases.xml b/OsmAnd/res/values-sc/phrases.xml
index 72e5d794e5..ce6674505d 100644
--- a/OsmAnd/res/values-sc/phrases.xml
+++ b/OsmAnd/res/values-sc/phrases.xml
@@ -3891,4 +3891,7 @@
Cun àrbores: eja
Nùmene de sa pista
Brincu cun sos iscì
+ Riferimentu locale
+ Geodesista
+ Tzentru pro cunferèntzias
\ No newline at end of file
From d9cc0e33c901706d4fbd2fa100f85aced2a0cec8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Iv=C3=A1ns?=
Date: Thu, 18 Mar 2021 11:00:43 +0000
Subject: [PATCH 020/103] Translated using Weblate (Galician)
Currently translated at 100.0% (3894 of 3894 strings)
---
OsmAnd/res/values-gl/phrases.xml | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/OsmAnd/res/values-gl/phrases.xml b/OsmAnd/res/values-gl/phrases.xml
index 83d2d73eef..7b065fed21 100644
--- a/OsmAnd/res/values-gl/phrases.xml
+++ b/OsmAnd/res/values-gl/phrases.xml
@@ -3881,4 +3881,17 @@
Ponte para morcegos
Paso de fauna
Área de natación
+ Referencia local
+ Xeodésico
+ Centro de conferencias
+ Posición de parada de biblioteca móbil
+ Rexistro do cumio: no
+ Rexistro do cumio: si
+ Estado da pista: pechada
+ Estado da pista: aberta
+ Patrullado: non
+ Patrullado: si
+ Arborado: si
+ Nome da pista
+ Salto de esquí
\ No newline at end of file
From 806e25949756114a0959cf1233e2c9ed492eec09 Mon Sep 17 00:00:00 2001
From: iman
Date: Thu, 18 Mar 2021 18:21:38 +0000
Subject: [PATCH 021/103] Translated using Weblate (Persian)
Currently translated at 36.6% (1427 of 3894 strings)
---
OsmAnd/res/values-fa/phrases.xml | 47 ++++++++++++++++----------------
1 file changed, 24 insertions(+), 23 deletions(-)
diff --git a/OsmAnd/res/values-fa/phrases.xml b/OsmAnd/res/values-fa/phrases.xml
index 19e015f910..f02c2aa1db 100644
--- a/OsmAnd/res/values-fa/phrases.xml
+++ b/OsmAnd/res/values-fa/phrases.xml
@@ -8,10 +8,10 @@
فروشگاه نوشیدنی
فروشگاه گوشت
بقالی
- فروشگاه محصولات دامی
+ فروشگاه محصولات مزرعه
میوه و سبزیفروشی
فروشگاه غذاهای دریایی
- شیرینی و آجیل فروشی
+ شیرینی و آبنبات فروشی
بستنی فروشی
فروشگاه بزرگ
فروشگاه چای
@@ -19,18 +19,18 @@
دستگاه فروش خودکار
کتابفروشی
فروشگاه دوچرخه
- فروشگاه کارتون
+ فروشگاه انیمه
عتیقه فروشی
فروشگاه هنر
کالای کودک
- فروشگاه کیف
+ کیف فروشی
لوازم حمام
مبلمان اتاق خواب
بوتیک
- فروشگاه فرش
+ فرش فروشی
فروشگاه محصولات بهداشتی و آرایشی
فروشگاه پوشاک
- \فروشگاه پوشاک کودکان
+ فروشگاه پوشاک کودک
کفش فروشی
فروشگاه کامپیوتر
فروشگاه چاپ و تکثیر
@@ -63,7 +63,7 @@
فروشگاه لوزم موسیقی
روزنامه فروشی
عینک سازی
- مواد غذایی ارگانیک
+ محصولات ارگانیک
بازار روز
رنگ فروشی
فروشگاه حیوانات خانگی
@@ -72,8 +72,8 @@
کشتی
لوازم ورزشی
فروشگاه نوشت افزار
- فروشگاه کارد و چنگال
- فروشگاه بلیط
+ فروشگاه ظروف غذاخوری
+ بلیت فروشی
دخانیات
اسباب بازی فروشی
@@ -121,7 +121,7 @@
معاینه فنی خودرو
کارواش
جایگاه سوخت; جایگاه سوختگیری; پمپ بنزین; پمپ گاز
- ایستگاه شارژ
+ ایستگاه شارژ; ایستگاه شارژ خودروی برقی
سطح شیب دار خودرو
هوای فشرده
پارکینگ
@@ -196,7 +196,7 @@
اسکله
نظارت
رصد خانه
- رصدخانه نجوم
+ نجومی
ساخت و ساز
کارگاه
معدن
@@ -317,7 +317,7 @@
اسکیت روی یخ
زمین یخ
زمین بسکتبال اسکاتلندی
- پیست موتور سواری
+ ورزش موتورسواری
چندورزشی
ورزش جهت یابی
تنیس پدالی
@@ -428,11 +428,11 @@
باشگاه گردشگری
کلوپ خیریه
کتابخانه
- مرکز هنر
+ مرکز هنری
سینما
کازینو
مرکز اجتماع
- مرکز سوسیال
+ مرکز اجتماعی
تئاتر
سیرک
رقص
@@ -446,7 +446,7 @@
لنگرگاه تفریحی
گلف کوچک
زمین بازی
- استخر
+ استخر شنا
پارک آبی
پارک
کافه
@@ -509,7 +509,7 @@
قبرکن
صنایع کامپیوتر
سالن زیبایی
- کاشت ناخن
+ کاشت ناخن; مانیکور
آرایشگر
سالن ماساژ
سالن تاتو
@@ -519,7 +519,7 @@
جمعه بازار خودرو
جمعه بازار قایق
بارانداز
- سرویس بهداشتی
+ سرویس بهداشتی; دستشویی; مستراح
سونا
سردخانه مردگان
@@ -667,7 +667,7 @@
تنظیمات ساعت
کمپ گردشگری
کمپ بدون امکانات
- مراقبت از پیست
+ آمادهسازی پیست
نشستن بیرون
دخانیات
تحویل
@@ -766,7 +766,7 @@
دفتر
گردشگری
دیدنیها
- محل اسکان
+ محل اسکان; اقامت
دسترسی اینترنت
اوقات فراغت
باشگاه
@@ -1070,13 +1070,13 @@
سوپ
نقطهٔ گردشگری
دسترسی اینترنت: ندارد
- دسترسی اینترنت - رایگان
+ دسترسی اینترنت: رایگان
خیر
خیر
خیر
- خیر
+ صدا: خیر
خیر
- "معدن تاریخی سنگ "
+ معدن تاریخی سنگ
گیاهخواری
فقط گیاهخواری
گیاهخواری
@@ -1188,7 +1188,7 @@
دسترسی اینترنت: عمومی
دسترسی اینترنت: با خدمات
دسترسی اینترنت: دارد
- دسترسی اینترنت - پولی
+ دسترسی اینترنت: پولی
در اتاق جداگانه
در یک اتاق جدا
اسکوتر
@@ -1448,4 +1448,5 @@
بله
منطقهٔ حفاظتشده
بدمینتون
+ خدمات خودرو; مکانیکی
\ No newline at end of file
From e84b9ddc6da1c05d6d16b58f8f34e4e22dce2ad1 Mon Sep 17 00:00:00 2001
From: ovl-1
Date: Fri, 19 Mar 2021 19:54:45 +0000
Subject: [PATCH 022/103] =?UTF-8?q?Translated=20using=20Weblate=20(Norwegi?=
=?UTF-8?q?an=20Bokm=C3=A5l)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Currently translated at 41.4% (1616 of 3894 strings)
---
OsmAnd/res/values-nb/phrases.xml | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/OsmAnd/res/values-nb/phrases.xml b/OsmAnd/res/values-nb/phrases.xml
index dd15e88444..2d3d19f765 100644
--- a/OsmAnd/res/values-nb/phrases.xml
+++ b/OsmAnd/res/values-nb/phrases.xml
@@ -1622,4 +1622,29 @@
Video
Status
Type
+ Sivilisasjon: gresk-egyptisk (332 f.Kr. – 30 f.Kr.)
+ Sivilisasjon: Det gamle Egypt (inntil 332 f.Kr.)
+ Sivilisasjon: Det kinesiske keiserriket (221 f.Kr. – 1911 e.Kr.)
+ Historisk stein
+ Historisk periode: neolittisk tid
+ Historisk periode: mesolittisk tid
+ Historisk periode: paleolittisk tid (2,6 millioner – 10000 år før nåtid)
+ Historisk periode: Det ptolemeiske Egypt (305 f.Kr. – 30 f.Kr.)
+ Historisk periode: Det hellenistiske Hellas
+ Historisk periode: Den romerske republikk (508 f.Kr. – 27 f.Kr.)
+ Sivilisasjon: Den romerske antikken (753 f.Kr. – 284 e.Kr.)
+ Historisk periode: jernalder
+ Historisk periode: Det arkaiske Hellas
+ Historisk periode: Det klassiske Hellas (5. – 4. århundre f.Kr.)
+ Historisk periode: bronsealder
+ Historisk periode: steinalder / bronsealder (ubestemt)
+ Sivilisasjon: minoisk
+ Sivilisasjon: vestromersk (285 – 476)
+ Sivilisasjon: keltisk
+ Sivilisasjon: bysantinsk (285 – 1453)
+ Sivilisasjon: romersk
+ Sivilisasjon: Den greske antikken
+ Sivilisasjon: forhistorisk tid
+ Historisk herregård
+ Historisk objekt
\ No newline at end of file
From c42f2240f9f96ffa30fbe1e7ac6aa218589459d5 Mon Sep 17 00:00:00 2001
From: Shjosan
Date: Fri, 19 Mar 2021 22:50:21 +0000
Subject: [PATCH 023/103] Translated using Weblate (Swedish)
Currently translated at 83.5% (3253 of 3894 strings)
---
OsmAnd/res/values-sv/phrases.xml | 106 ++++++++++++++++++++++++++++---
1 file changed, 97 insertions(+), 9 deletions(-)
diff --git a/OsmAnd/res/values-sv/phrases.xml b/OsmAnd/res/values-sv/phrases.xml
index 93aabdcb68..e3ed4a4936 100644
--- a/OsmAnd/res/values-sv/phrases.xml
+++ b/OsmAnd/res/values-sv/phrases.xml
@@ -316,7 +316,7 @@
El
Flygbränsle
Bensinstation för båtar
- Laddstation
+ Laddstation; Laddningsstation för elfordon; Laddningsstation för el; Elektrisk laddningspunkt; Laddningspunkt; Elektronisk laddstation; Utrustning för elförsörjning av elfordon
Fordonsramp
Tryckluft
Parkering
@@ -627,7 +627,7 @@
Hästkapplöpning
Skridskoåkning
Islager
- Korfbal
+ Korfball
Motorsport
Multisport
Orientering
@@ -780,8 +780,8 @@
Tillgång till Internet: service
Tillgång till Internet: ja
Tillgång till Internet: nej
- Tillgång till Internet - avgift
- Tillgång till Internet - ingen avgift
+ Tillgång till internet: avgift
+ Tillgång till internet: ingen avgift
Kloster
Religiöst område
Vägkors
@@ -1342,7 +1342,7 @@
Ingen pump
Ja
Mineral
- Vattenegenskap: lera
+ Lera
Svavel
Vattenpunkt
Vägstolpe
@@ -1382,7 +1382,7 @@
Ja
Utan taktil beläggning
Ja
- Nej
+ Ljud: nej
Endast när gång är tillåtet
Räddningsstation
Serviceområde
@@ -1669,13 +1669,13 @@
Reparation av elektriska fordon
Mc-reparation
Ja
- Ingen självbetjäning
+ Nej
Ja
Inte automatisk
Full service
Ja
Borstlös: nej
- Biltvätt: ingen
+ Nej
Offentligt bad
Hane
Förbjudet för män
@@ -2055,7 +2055,7 @@
100LL bränsle
Autogas
Jet A-1 bränsle
- AdBlue bränsle
+ Dieselavgasvätska
Bränsle: trä
Bränsle: träkol
Bränsle: kol
@@ -3165,4 +3165,92 @@
Konstgräs
Hard court
Metallgitter
+ Plats: ovan
+ Plats: ovan jord
+ Plats: under vattnet
+ Plats: underjordisk
+ Social trygghet
+ Vinterrum: nej
+ Vinterrum: ja
+ Standard
+ Enduro
+ Off-road
+ Chopper
+ Sport motorcykel
+ Skoter
+ Motorcykelkläder: nej
+ Motorcykelkläder
+ Däck: nej
+ Däck
+ Delar: nej
+ Delar
+ Reparation
+ Reparation: nej
+ Uthyrning: nej
+ Uthyrning
+ Försäljning: ja, begagnad
+ Försäljning: begagnad
+ Försäljning: nej
+ Försäljning
+ Samarbetsyta
+ Souvlaki
+ Piadina
+ Salta pannkakor
+ Soba
+ Buschenschank
+ Heuriger
+ Gastropub
+ Gyudon
+ Ramen
+ Typ: läsruta
+ Jul: hemsida
+ Jul: plats
+ Jul: öppettider
+ Jul: Obs
+ Xmas: period för evenemanget
+ Brandoperatör
+ Hög provision
+ Permanent representation
+ Huvudfördelningsram
+ Effekt (el): nej
+ ATM: ja
+ Strålbehandling
+ Beteckning
+ Energikälla: biomassa
+ Reddit
+ Historisk tank
+ Små elektriska apparater
+ Medborgartjänster
+ Invandrarvisum
+ Visum som inte är invandrare
+ Förbindelse
+ Konsulat
+ Ambasad
+ Avgångstavlan
+ Påfyllning av dricksvatten
+ Pil
+ Vibrationer
+ Tryck
+ Video
+ SMS
+ Status
+ Typ
+ Utomhus
+ Typ
+ Kontantuttag
+ Tillgänglighet för funktionshindrade
+ Tillgång för lätta lastbilar
+ HGV-åtkomst
+ Mofa-åtkomst
+ Mopedåtkomst
+ Motorcykelåtkomst
+ Släpvangsåtkomst
+ Husbilsåtkomst
+ Husvangsåtkomst
+ Bussåtkomst
+ Snöskoteråtkomst
+ Ja
+ Klättring
+ Svårighetskategori
+ Parkera och åk
\ No newline at end of file
From 733c115d2bdad2b9d026263a8cd766ed792d111b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kristjan=20R=C3=A4ts?=
Date: Sat, 20 Mar 2021 04:38:54 +0000
Subject: [PATCH 024/103] Translated using Weblate (Estonian)
Currently translated at 100.0% (3685 of 3685 strings)
---
OsmAnd/res/values-et/strings.xml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/OsmAnd/res/values-et/strings.xml b/OsmAnd/res/values-et/strings.xml
index f212d41299..f78e97a163 100644
--- a/OsmAnd/res/values-et/strings.xml
+++ b/OsmAnd/res/values-et/strings.xml
@@ -3925,9 +3925,9 @@
Sai üleslaaditud
Laadin üles
Maastikul
- Kaardi värskendusi kontrollitakse kord nädalas. Järgmine kord %1$s %2$s.
- Kaardi värskendusi kontrollitakse kord päevas. Järgmine kord %1$s %2$s.
- Kaardi värskendusi kontrollitakse kord tunnis. Järgmine kord %1$s %2$s.
+ Kaardi värskendusi kontrollitakse kord nädalas. Järgmine kord: %1$s %2$s.
+ Kaardi värskendusi kontrollitakse kord päevas. Järgmine kord: %1$s %2$s.
+ Kaardi värskendusi kontrollitakse kord tunnis. Järgmine kord: %1$s %2$s.
Häälteavituste ajad
Eelista matkaradu
Eelista matkaradu
From 90f3102b1f00f11b9c41833f1599c0b50840bbdd Mon Sep 17 00:00:00 2001
From: Rex_sa
Date: Fri, 19 Mar 2021 21:15:34 +0000
Subject: [PATCH 025/103] Translated using Weblate (Arabic)
Currently translated at 93.2% (3632 of 3894 strings)
---
OsmAnd/res/values-ar/phrases.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/OsmAnd/res/values-ar/phrases.xml b/OsmAnd/res/values-ar/phrases.xml
index 0c42643a7a..372df7b654 100644
--- a/OsmAnd/res/values-ar/phrases.xml
+++ b/OsmAnd/res/values-ar/phrases.xml
@@ -3702,4 +3702,5 @@
القفز على الجليد
الجيوديسيا (شكل الأرض ومساحتها)
المرجع المحلي
+ الزحلقه
\ No newline at end of file
From c1b3be76fca2ab60fb40433d340fd75686ff4c2c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sveinn=20=C3=AD=20Felli?=
Date: Thu, 18 Mar 2021 09:32:06 +0000
Subject: [PATCH 026/103] Translated using Weblate (Icelandic)
Currently translated at 100.0% (3685 of 3685 strings)
---
OsmAnd/res/values-is/strings.xml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/OsmAnd/res/values-is/strings.xml b/OsmAnd/res/values-is/strings.xml
index 6a5f04adec..432b5a9946 100644
--- a/OsmAnd/res/values-is/strings.xml
+++ b/OsmAnd/res/values-is/strings.xml
@@ -4035,9 +4035,9 @@
Uppfært: %s
Síðast athugað: %s
Uppfærslutíðni
- Uppfærslur korta verða athugaðar í hverri viku. Næsta skipti%1$s eftir %2$s.
- Uppfærslur korta verða athugaðar á hverjum degi. Næsta skipti%1$s eftir %2$s.
- Uppfærslur korta verða athugaðar á klukkustundar fresti. Næsta skipti%1$s eftir %2$s.
+ Uppfærslur korta verða athugaðar í hverri viku. Næsta skipti %1$s eftir %2$s.
+ Uppfærslur korta verða athugaðar á hverjum degi. Næsta skipti %1$s eftir %2$s.
+ Uppfærslur korta verða athugaðar á klukkustundar fresti. Næsta skipti %1$s eftir %2$s.
Eyða uppfærslum
Ertu viss um að þú viljir eyða öllum %s raunuppfærslum\?
Innkaup
From 3bfae7e3fe33d9612302a97262747119f97a1d39 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sveinn=20=C3=AD=20Felli?=
Date: Thu, 18 Mar 2021 09:38:35 +0000
Subject: [PATCH 027/103] Translated using Weblate (Icelandic)
Currently translated at 100.0% (3894 of 3894 strings)
---
OsmAnd/res/values-is/phrases.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/OsmAnd/res/values-is/phrases.xml b/OsmAnd/res/values-is/phrases.xml
index 87e5c434ea..a67dc7b9f3 100644
--- a/OsmAnd/res/values-is/phrases.xml
+++ b/OsmAnd/res/values-is/phrases.xml
@@ -3893,4 +3893,5 @@
Skíðastökk
Staðvær tilvísun
Ráðstefnumiðstöð
+ Landmælingar
\ No newline at end of file
From bf075cc7c675c6d5adda1fccfb3f230eb195d15c Mon Sep 17 00:00:00 2001
From: Liu Tao
Date: Sat, 20 Mar 2021 07:30:06 +0000
Subject: [PATCH 028/103] Translated using Weblate (Chinese (Simplified))
Currently translated at 80.7% (2974 of 3685 strings)
---
OsmAnd/res/values-zh-rCN/strings.xml | 26 +++++++++++++++++++++++++-
1 file changed, 25 insertions(+), 1 deletion(-)
diff --git a/OsmAnd/res/values-zh-rCN/strings.xml b/OsmAnd/res/values-zh-rCN/strings.xml
index 092e435048..3e325159f3 100644
--- a/OsmAnd/res/values-zh-rCN/strings.xml
+++ b/OsmAnd/res/values-zh-rCN/strings.xml
@@ -2903,7 +2903,7 @@
搜索兴趣点类型
半径尺
订阅 - OsmAnd Live
- 创建/编辑兴趣点
+ 创建或编辑兴趣点
编辑在线资源
正轴等角圆柱投影
储存格式
@@ -3538,4 +3538,28 @@
请选择另一种颜色。
删除更新
您确认想要删除所有 %s 实时更新吗?
+ 导入的项目将添加前缀
+ 全部替换
+ 我的位置和路线之间的最小角度
+ 自定义配置文件
+ 导入完成
+ 已添加项目
+ 无法备份配置文件。
+ 恢复所有的配置文件设置?
+ 是否确定要清除录制的数据?
+ 抽屉
+ 上下文菜单操作
+ 该点以下的元素用分隔线隔开。
+ 这些项目从菜单中被隐藏,但所代表的选项或插件将继续工作。
+ 隐藏设置会将其重置为原始状态。
+ 只有四个按钮。
+ 主要动作
+ 滑雪旅游
+ 自定义 OsmAnd 插件
+ 无法从 \'%1$s\' 中读取。
+ 无法写到 \'%1$s\'。
+ 无法从 \'%1$s\' 导入。
+ 选择轨迹文件
+ 需要其他地图才能在地图上查看维基百科兴趣点。
+ 操作按钮在选定的配置文件之间切换。
\ No newline at end of file
From bcae0a2de52dc5c7f0e60817f26be908bf732118 Mon Sep 17 00:00:00 2001
From: iman
Date: Thu, 18 Mar 2021 10:08:22 +0000
Subject: [PATCH 029/103] Translated using Weblate (Persian)
Currently translated at 30.2% (82 of 271 strings)
Translation: OsmAnd/Telegram
Translate-URL: https://hosted.weblate.org/projects/osmand/telegram/fa/
---
OsmAnd-telegram/res/values-fa/strings.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/OsmAnd-telegram/res/values-fa/strings.xml b/OsmAnd-telegram/res/values-fa/strings.xml
index 577fea7240..963c3068e6 100644
--- a/OsmAnd-telegram/res/values-fa/strings.xml
+++ b/OsmAnd-telegram/res/values-fa/strings.xml
@@ -81,5 +81,5 @@
ارسال گزارش
برونبرد
بافر لاگکت
- لاگهای جزئی برنامه را بررسی و همرسانی کنید
+ لاگهای باجزئیات برنامه را بررسی و همرسانی کنید
\ No newline at end of file
From 92d610751c32daa076420d54c3b9218e2e885688 Mon Sep 17 00:00:00 2001
From: Evgenii Martynenko
Date: Sat, 20 Mar 2021 01:12:29 +0000
Subject: [PATCH 030/103] Translated using Weblate (Russian)
Currently translated at 99.7% (3885 of 3894 strings)
---
OsmAnd/res/values-ru/phrases.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/OsmAnd/res/values-ru/phrases.xml b/OsmAnd/res/values-ru/phrases.xml
index cd790de9b7..7b2f28b784 100644
--- a/OsmAnd/res/values-ru/phrases.xml
+++ b/OsmAnd/res/values-ru/phrases.xml
@@ -467,7 +467,7 @@
Информация
Часы
Турагентство;Туристическое агентство
- Место с хорошим видом;Обзорная площадка
+ Обзорная площадка;Место с хорошим видом
Место для лагеря
Ночлег
Место для пикника
@@ -2785,7 +2785,7 @@
Отсутствуют
Исключительно
Дорожное зеркало
- Вид
+ Дипломатическое учреждение
Консульство
Генеральное консульство
Почётное консульство
From a40ed4a7dd3f83a7f32aa7017dd8f3ce1091962c Mon Sep 17 00:00:00 2001
From: Shjosan
Date: Fri, 19 Mar 2021 10:24:19 +0000
Subject: [PATCH 031/103] Translated using Weblate (Swedish)
Currently translated at 100.0% (271 of 271 strings)
Translation: OsmAnd/Telegram
Translate-URL: https://hosted.weblate.org/projects/osmand/telegram/sv/
---
OsmAnd-telegram/res/values-sv/strings.xml | 270 ++++++++++++++++++++++
1 file changed, 270 insertions(+)
diff --git a/OsmAnd-telegram/res/values-sv/strings.xml b/OsmAnd-telegram/res/values-sv/strings.xml
index d5705b8e2d..cbf274305e 100644
--- a/OsmAnd-telegram/res/values-sv/strings.xml
+++ b/OsmAnd-telegram/res/values-sv/strings.xml
@@ -1,4 +1,274 @@
Senaste uppdatering från Telegram: %1$s
+ Tidslinje
+ Direkt nu
+ Min plats
+ OsmAnd Tracker låter dig dela din plats och se andras i OsmAnd.
Appen använder Telegram API, så du behöver ett Telegram-konto.
+ sek
+ min
+ t
+ Miles/meter
+ Distansminuter
+ Kilomter/meter
+ Miles/yard
+ Miles/fot
+ Distansminuter per timme (knop)
+ Minuter per mile
+ Minuter per kilometer
+ Meter per sekund
+ Miles per timme
+ Kilometer per timme
+ mph
+ km/h
+ m/s
+ di/h
+ min/km
+ min/mi
+ di
+ m
+ km
+ mi
+ ft
+ yd
+ Välkommen
+ Ange ditt Telegram-telefonnummer i internationellt format
+ Tillstånd
+ Aktivera chattar
+ Visa användare på kartan
+ Installera OsmAnd
+ Du måste installera den gratis eller betalda versionen av OsmAnd först
+ OsmAnd logotyp
+ OsmAnd Tracker tjänst
+ Delar plats
+ Dela plats
+ Avstånd
+ OsmAnd Tracker körs i bakgrunden med skärmen av.
+ Bakgrundsläge
+ Välj en av platsleverantörerna för att dela din plats.
+ Aktivera \"Plats\" i systeminställningarna
+ App saknar behörighet för plats data.
+ Inställningar
+ Avbryt
+ Fortsätt
+ Du är inte inloggad
+ Starta \"Platsdelning\"\?
+ Stänger
+ Loggar ut
+ Startar
+ Logga ut
+ Logga in
+ Telegram-lösenord
+ Ange lösenord
+ Telegram har skickat en kod till dig för OmsAnd för inloggning till ditt konto.
+ Autentiseringskod
+ Ange kod
+ Lösenord
+ Telefonnummer i internationellt format
+ Telefonnummer
+ OsmAnd Online GPS Tracker
+ Visa på karta
+ Platsdelning
+ Sök: Grupp och kontakt
+ Välj de kontakter och grupper du vill dela din plats med.
+ Ange tid
+ Ställ in tiden att dina valda kontakter och grupper ska se din plats i realtid.
+ Synlig tid för alla
+ Bakåt
+ Dela
+ Installera
+ %1$d t
+ %1$d m
+ %1$d t %2$d m
+ Ställ in synlig tid för alla
+ Ange autentiseringskod
+ Skriv in telefonnummer
+ Jag har inget Telegramkonto
+ Du behöver ett registrerat Telegramkonto och ett telefonnummer
+ Av
+ Alla
+ Efter det kan du använda denna app.
+ Installera Telegram och registrera ett konto.
+ Du behöver ett Telegramkonto för att använda platsdelning.
+ Registrering i Telegram
+ Bot
+ Direkt
+ Öppna OsmAnd
+ Stäng av platsdelning
+ Delning är påslagen (stäng av)
+ Går ut
+ Delningstid
+ Plats
+ Skicka min plats
+ Ställ in minsta intervall för platsdelning.
+ Ingen rörelse
+ Senaste tid en kontakt rört sig.
+ Platshistorik
+ Göm kontakter som inte har rört sig inom given tid.
+ Anslutning till OsmAnd
+ Välj den OsmAnd-version som OsmAnd Tracker använder för att visa positioner.
+ i %1$s
+ Konto
+ Anlutet konto
+ Hur man stänger av OsmAnd Tracker från Telegram
+ Hur man stänger av OsmAnd Tracker från Telegram
+ För att återkalla platsdelningsåtkomst. Öppna Telegram, gå till Inställningar → Sekretess och säkerhet → Sessioner och avsluta OsmAnd Tracker-sessionen.
+ Stäng
+ Anslut till internet för att logga ut ordentligt från Telegram.
+ Grupp
+ Senaste svar
+ sedan
+ Utgång
+ Stäng av allt
+ Inaktivera all delning
+ Stäng av platsdelning i alla valda chatter (%1$d).
+ Välj OsmAnd version att använda
+ Välj OsmAnd version där kontakter kommer att visas på kartan.
+ Sortera efter
+ Sortera
+ Efter grupp
+ Efter namn
+ Avstånd
+ Namn
+ Logga ut från OsmAnd Tracker\?
+ Är du säker på att du vill logga ut från OsmAnd Tracker så att du inte kan dela plats eller se andras plats\?
+ Kontakter och grupper delar plats med dig.
+ Dela plats som
+ Lägg till enhet
+ Spara
+ Inaktivera
+ Ingen internet-anslutning
+ Ingen GPS-anslutning
+ Status
+ Aktiverat
+ Delar: %1$s
+ Delar status
+ Senaste tillgängliga plats
+ Skicka plats igen
+ Hittades inte än
+ Inte skickat än
+ Senare
+ Gå till inställningar
+ Delar i bakgrunden
+ Stäng av batterioptimering för OsmAnd Tracker så att den inte plötsligt stängs av i bakgrunden.
+ Bakgrundsarbete
+ Ändra batterioptimeringsinställningarna för att stabilisera platsdelning.
+ Ansluter till internet
+ Positionering …
+ Startar
+ Skickar plats
+ Väntar på svar från Telegram
+ Inte möjligt att skicka till Telegram-chattar:
+ Skickades och uppdaterades
+ Senast uppdaterad plats:
+ Om du vill ansluta flera enheter till ett telegramkonto måste du använda olika enheter för att dela din plats.
+ Du kan skapa och visa enhets-ID i Telegram-klienten genom att använda %1$s chatt-bot. %2$s
+ Göm
+ Enhetsnamn
+ Enhetsnamn kan inte vara tomt
+ Enhetsnamn för långt
+ Namnge din nya enhet med max 200 symboler.
+ Kunde inte lägga till ny enhet
+ Lägg till
+ %1$s tillagt.
+ Välj ett namn som du inte redan har använt
+ Senaste uppdatering från Telegram
+ Karta och text
+ Text
+ Karta
+ Välj hur meddelanden med din plats ska se ut.
+ Skicka plats som
+ Start datum
+ Slutdatum
+ Visa i OsmAnd
+ Genomsnittlig hastighet
+ Genomsnittlig höjd
+ Rörelse tid
+ Övervakning är inaktiverad
+ Övervakning är aktiverad
+ Skickat
+ GPS-punkter
+ Samlade
+ Datum
+ %1$d punkter
+ skicka (%1$d i buffer)
+ Uppdatering
+ var snäll uppdatera OsmAnd för att visa data på kartan
+ Visa antal samlade och skickade GPS-punkter.
+ Visa GPS-punkter
+ Utseende
+ Fick GPX-punkter: %1$s
+ Hur det fungerar
+ OsmAnd integritetspolicy
+ Telegram integritetspolicy
+ Acceptera
+ Genom att klicka på \"Fortsätt\" godkänner du villkoren i Telegram- och OsmAnds integritetspolicy.
+ OsmAnd tracker är en av klienterna som använder Telegram öppen plattform. Dina kontakter kan använda vilken Telegram-klient som helst.
+ Telegram (meddelandeappen) används för att ansluta och kommunicera med människor.
+ Telegram
+ OsmAnd Tracker
+ Aktivera övervakning för att spara alla platser i historiken.
+ Platsinspelning aktiverad
+ Deaktivera övervakning
+ Tidslinje är nu tillgängligt utan extra kostnad.
+ OK
+ Sök
+ Skriv kontakt eller gruppnamn
+ Sök i alla dina grupper och kontakter.
+ Sök kontakter
+ Riktning
+ Höjd över havet
+ Precision
+ Riktning
+ Integritet
+ Proxy
+ Proxy-inställningar
+ Frånkopplad
+ Ansluten
+ Proxy-typ
+ Aktivera
+ Anslutning
+ Server
+ Port
+ Referenser
+ Användarnamn
+ Lösenord
+ Nyckel
+ GPX-inställningar
+ Filter: ingen loggning under valda hastigheten
+ Minsta loggningshastighet
+ Filter: ingen loggning utan att nogranheten är nodd
+ Minsta loggningsnoggrannhet
+ Filter: minsta avstånd för att logga en ny punkt
+ Minsta loggningsavstånd
+ Välj
+ Ingen data
+ Vi har inget sparad data för den valda dagen
+ Start - Slut datum
+ Välj tid att visa
+ Verkställ
+ Start
+ Slut
+ Sparade meddelanden
+ Enhet för hastighet
+ Definera enhet för hastighet.
+ Enhet för längd
+ Ändra vad avstånd mäts i.
+ Enheter & format
+ Tidszon
+ Välj tidszon som ska visas i dina platsmeddelanden.
+ Buffertens utgångstid
+ Maximal tid att lagra poäng i bufferten
+ OsmAnd Tracler status
+ Förslagen
+ Tillbaka till OsmAnd
+ %1$s sedan
+ Senaste svar: %1$s sedan
+ Senaste uppdatering från Telegram: %1$s sedan
+ Senast response: %1$s
+ ERR
+ Export
+ Logcat buffer
+ Kontrollera och dela detaljerade loggar för appen
+ Skicka rapport
\ No newline at end of file
From 2b3fc8e809305d4d227244ce4b1b80fff353ec25 Mon Sep 17 00:00:00 2001
From: Evgenii Martynenko
Date: Sat, 20 Mar 2021 13:17:18 +0000
Subject: [PATCH 032/103] Translated using Weblate (Russian)
Currently translated at 99.8% (3681 of 3685 strings)
---
OsmAnd/res/values-ru/strings.xml | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/OsmAnd/res/values-ru/strings.xml b/OsmAnd/res/values-ru/strings.xml
index 4c17c33453..307ddf07bc 100644
--- a/OsmAnd/res/values-ru/strings.xml
+++ b/OsmAnd/res/values-ru/strings.xml
@@ -3902,7 +3902,7 @@
\n
\n• Добавлен OAuth метод аутентификации для OpenStreetMap, улучшен интерфейс диалоговых OSM.
\n
-\n • Поддержка пользовательских цветов для избранного и путевых точек трека.
+\n• Поддержка пользовательских цветов для избранных и путевых точек.
\n
\n
Скопировать адрес
@@ -4037,4 +4037,6 @@
Копировать имя POI
Интервал
Скрыть природный заповедник, особо охраняемые природные территории и границы национального парка
+ «Отслеживаемый» означает, что трек не будет виден в любых общедоступных списках, но обработанные точки из него будут доступны через public GPS API c временными отметками. Другие пользователи смогут лишь загружать обработанные точки из вашего трека. При этом трек не будет ассоциирован с вами.
+ «Идентифицируемый» означает, что трек будет виден всем в разделе треки пользователя, загрузившего трек и в общем списке треков, доступным на закладке GPS-треки. Другие пользователи смогут загрузить данные трека и в свойствах трека будет указано имя пользователя, загрузившего трек. Отметки времени точек трека доступны через public GPS API.
\ No newline at end of file
From 947204be3fe2050c01d6a4973e212988f556f64e Mon Sep 17 00:00:00 2001
From: Filip Czaplicki
Date: Sat, 20 Mar 2021 14:46:51 +0100
Subject: [PATCH 033/103] README.md: remove extra p closing tag
---
README.md | 1 -
1 file changed, 1 deletion(-)
diff --git a/README.md b/README.md
index 83dbde7b9a..207a545740 100644
--- a/README.md
+++ b/README.md
@@ -124,4 +124,3 @@ Tokelau, Tonga, Trinidad and Tobago, Tunisia, Turkey, Turkmenistan, Tuvalu, Ugan
Ukraine, United Arab Emirates, United Kingdom (UK), United States of America (USA),
Uruguay, Uzbekistan, Vanuatu, Venezuela, Vietnam, Wallis and Futuna, Western Sahara,
Yemen, Zambia, Zimbabwe.
-
From 590d6392a2a4f14b344d93eb864f376a5102174f Mon Sep 17 00:00:00 2001
From: Evgenii Martynenko
Date: Sat, 20 Mar 2021 13:19:32 +0000
Subject: [PATCH 034/103] Translated using Weblate (Russian)
Currently translated at 99.9% (3683 of 3685 strings)
---
OsmAnd/res/values-ru/strings.xml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/OsmAnd/res/values-ru/strings.xml b/OsmAnd/res/values-ru/strings.xml
index 307ddf07bc..8243817771 100644
--- a/OsmAnd/res/values-ru/strings.xml
+++ b/OsmAnd/res/values-ru/strings.xml
@@ -4039,4 +4039,6 @@
Скрыть природный заповедник, особо охраняемые природные территории и границы национального парка
«Отслеживаемый» означает, что трек не будет виден в любых общедоступных списках, но обработанные точки из него будут доступны через public GPS API c временными отметками. Другие пользователи смогут лишь загружать обработанные точки из вашего трека. При этом трек не будет ассоциирован с вами.
«Идентифицируемый» означает, что трек будет виден всем в разделе треки пользователя, загрузившего трек и в общем списке треков, доступным на закладке GPS-треки. Другие пользователи смогут загрузить данные трека и в свойствах трека будет указано имя пользователя, загрузившего трек. Отметки времени точек трека доступны через public GPS API.
+ «Общедоступный» означает, что трек будет виден всем в разделе треки пользователя, загрузившего трек и в общем списке треков, доступным на закладке GPS-треки. Отметки времени точек трека не доступны через public GPS API. Однако, другие пользователи по-прежнему могут загрузить файл трека из общего списка треков и данные трека будут иметь все отметки времени.
+ «Частный» означает, что трек не будет виден в любых общедоступных списках, но точки из него будут доступны через public GPS API без отметок времени.
\ No newline at end of file
From 0bf8f357569eb469000d924a44b7cb62c42fd985 Mon Sep 17 00:00:00 2001
From: max-klaus
Date: Sat, 20 Mar 2021 18:54:27 +0300
Subject: [PATCH 035/103] Fix crash
---
OsmAnd/src/net/osmand/plus/views/layers/GPXLayer.java | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/OsmAnd/src/net/osmand/plus/views/layers/GPXLayer.java b/OsmAnd/src/net/osmand/plus/views/layers/GPXLayer.java
index 95d599fb56..c55fb675fd 100644
--- a/OsmAnd/src/net/osmand/plus/views/layers/GPXLayer.java
+++ b/OsmAnd/src/net/osmand/plus/views/layers/GPXLayer.java
@@ -927,7 +927,11 @@ public class GPXLayer extends OsmandMapLayer implements IContextMenuProvider, IM
}
}
+ @Nullable
public static Pair findPointsNearSegment(RotatedTileBox tb, List points, int r, int mx, int my) {
+ if (Algorithms.isEmpty(points)) {
+ return null;
+ }
WptPt prevPoint = points.get(0);
int ppx = (int) tb.getPixXFromLatLon(prevPoint.lat, prevPoint.lon);
int ppy = (int) tb.getPixYFromLatLon(prevPoint.lat, prevPoint.lon);
From c6d66c81ad8c189c95eecf48d8a0e8c4d84572fd Mon Sep 17 00:00:00 2001
From: max-klaus
Date: Sat, 20 Mar 2021 21:16:45 +0300
Subject: [PATCH 036/103] Fix #11205
---
OsmAnd/src/net/osmand/plus/track/TrackPointsCard.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/OsmAnd/src/net/osmand/plus/track/TrackPointsCard.java b/OsmAnd/src/net/osmand/plus/track/TrackPointsCard.java
index fe824bafc8..7af804ef84 100644
--- a/OsmAnd/src/net/osmand/plus/track/TrackPointsCard.java
+++ b/OsmAnd/src/net/osmand/plus/track/TrackPointsCard.java
@@ -184,7 +184,13 @@ public class TrackPointsCard extends BaseCard implements OnChildClickListener, O
}
private List getDisplayGroups() {
- return selectedGroup != null ? Collections.singletonList(selectedGroup) : getOriginalGroups();
+ if (selectedGroup != null) {
+ List res = new ArrayList<>();
+ res.add(selectedGroup);
+ return res;
+ } else {
+ return getOriginalGroups();
+ }
}
@Override
From a8d0d60381fe57fe6b69b096c6953038b4a5501b Mon Sep 17 00:00:00 2001
From: solokot
Date: Sat, 20 Mar 2021 14:28:24 +0000
Subject: [PATCH 037/103] Translated using Weblate (Russian)
Currently translated at 100.0% (3685 of 3685 strings)
---
OsmAnd/res/values-ru/strings.xml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/OsmAnd/res/values-ru/strings.xml b/OsmAnd/res/values-ru/strings.xml
index 8243817771..17f9218ad8 100644
--- a/OsmAnd/res/values-ru/strings.xml
+++ b/OsmAnd/res/values-ru/strings.xml
@@ -4041,4 +4041,6 @@
«Идентифицируемый» означает, что трек будет виден всем в разделе треки пользователя, загрузившего трек и в общем списке треков, доступным на закладке GPS-треки. Другие пользователи смогут загрузить данные трека и в свойствах трека будет указано имя пользователя, загрузившего трек. Отметки времени точек трека доступны через public GPS API.
«Общедоступный» означает, что трек будет виден всем в разделе треки пользователя, загрузившего трек и в общем списке треков, доступным на закладке GPS-треки. Отметки времени точек трека не доступны через public GPS API. Однако, другие пользователи по-прежнему могут загрузить файл трека из общего списка треков и данные трека будут иметь все отметки времени.
«Частный» означает, что трек не будет виден в любых общедоступных списках, но точки из него будут доступны через public GPS API без отметок времени.
+ Выберите цель, чтобы проложить к ней короткий, быстрый или безопасный маршрут
+ Удалить %1$d файлов\?
\ No newline at end of file
From 8168fcde22c10bbd8236ccd4751a438b113e34ac Mon Sep 17 00:00:00 2001
From: iman
Date: Sat, 20 Mar 2021 15:49:44 +0000
Subject: [PATCH 038/103] Translated using Weblate (Persian)
Currently translated at 99.9% (3682 of 3685 strings)
---
OsmAnd/res/values-fa/strings.xml | 40 ++++++++++++++++----------------
1 file changed, 20 insertions(+), 20 deletions(-)
diff --git a/OsmAnd/res/values-fa/strings.xml b/OsmAnd/res/values-fa/strings.xml
index 656bb3afc8..ff02ab8a68 100644
--- a/OsmAnd/res/values-fa/strings.xml
+++ b/OsmAnd/res/values-fa/strings.xml
@@ -1275,7 +1275,7 @@
همه
راهنشانها
هشدارهای ترافیکی
- نقاط علاقهمندی نزدیک
+ علاقهمندیهای نزدیک
نقاط توجه نزدیک
آیا نقشههای ناموجود را دانلود میکنید %1$s (%2$d مگابایت)؟
بیشتر…
@@ -2400,16 +2400,16 @@
برنامهٔ OsmAnd (مخفف OSM Automated Navigation Directions بهمعنی راهنمای خودکار ناوبری بر پایهٔ OSM) یک نرمافزار نقشه و ناوبری است که به گسترهٔ وسیعی از دادهٔ OSM دسترسی دارد. این دادهٔ رایگان و جهانی با بالاترین کیفیت ارائه میشود.
\n
\nناوبری دیداری و شنیداری، مشاهدهٔ نقاط توجه (POIها یا Points of interest)، ایجاد و مدیریت ردهای GPX، استفاده از تصویرسازی منحنیهای میزان و اطلاعات ارتفاع (با استفاده از افزونه)، انتخاب حالتهای پیاده، دوچرخه، خودرو، امکان ویرایش مکانها و... چیزهایی هستند که تجربهٔ مؤثر و لذتبخشی در کار با نقشه را برایتان به ارمغان میآورند.
- ناوبری با GPS
-\n • امکان انتخاب بین حالت آنلاین و آفلاین؛ در حالت آفلاین هزینهٔ دیگری بابت اینترنت نمیپردازید و در حالت آنلاین عملکرد سریعتری را تجربه میکنید
-\n • راهنمای گامبهگام گفتاری که در پیمودن مسیر راهنماییتان میکند (با پیامهای گفتاری انسانی و ماشینی)
-\n • اگر از مسیر منحرف شوید، مسیر جدیدی برایتان پیدا میکند
-\n • راهنمای خطوط عبوری، نام خیابانها و زمان تخمینی رسیدن را دریافت میکنید که در طول مسیر راهنمای شماست
-\n • برای داشتن سفری ایمنتر، حالات شب/روز بهصورت خودکار انتخاب میشود
-\n • اعلام محدودیتهای سرعت را فعال کنید تا در صورت تجاوز از سرعت مجاز به شما هشدار دهد
-\n • زوم نقشه متناسب با سرعتتان تنظیم میشود
-\n • با استفاده از نشانی، نوع مکان (مثلاً پارکینگ، رستوران، هتل، پمپ گاز، موزه) یا مختصات جغرافیایی به جستوجو بپردازید
-\n • نقاط بینراهی مسیرتان را مشخص کنید
+ ناوبری با GPS
+\n • امکان انتخاب بین حالت آنلاین و آفلاین؛ در حالت آفلاین هزینهٔ دیگری بابت اینترنت نمیپردازید و در حالت آنلاین عملکرد سریعتری را تجربه میکنید
+\n • راهنمای گامبهگام گفتاری که در پیمودن مسیر راهنماییتان میکند (با پیامهای گفتاری انسانی و ماشینی)
+\n • اگر از مسیر منحرف شوید، مسیر جدیدی برایتان پیدا میکند
+\n • راهنمای خطوط عبوری، نام خیابانها و زمان تخمینی رسیدن را دریافت میکنید که در طول مسیر راهنمای شماست
+\n • برای داشتن سفری ایمنتر، حالات شب/روز بهصورت خودکار انتخاب میشود
+\n • اعلام محدودیتهای سرعت را فعال کنید تا در صورت تجاوز از سرعت مجاز به شما هشدار دهد
+\n • زوم نقشه متناسب با سرعتتان تنظیم میشود
+\n • با استفاده از نشانی، نوع مکان (مثلاً پارکینگ، رستوران، هتل، پمپ گاز، موزه) یا مختصات جغرافیایی به جستوجو بپردازید
+\n • پشتیبانی از نقاط میانی در برنامهریزی سفر
\n • رد خودتان را ثبت کنید یا یک رد GPX را دانلود و آن را دنبال کنید
\n
مسافت اصلاحشده
@@ -2492,12 +2492,12 @@
\n • جنوبگان: *
\nبا این نرمافزار نقشهٔ بیشتر مناطق جهان را خواهید یافت!
\nاز یک مسیریاب معتبر و قابلاعتماد استفاده کنید. هر کجا که هستید؛ در فرانسه، آلمان، انگلستان، مکزیک، آمریکا، هلند، ایران، روسیه، برزیل یا هر جای دیگر، فرقی نمیکند.
- ناوبری
-\n • امکان انتخاب بین حالت آنلاین (سریع) و آفلاین (بدون هزینهٔ اضافی بابت اینترنت)
-\n • راهنمای گامبهگام گفتاری (پیامهای گفتاری انسانی و ماشینی)
-\n • راهنمای خطوط عبوری، نام خیابانها و زمان تخمینی رسیدن
-\n • پشتیبانی از نقاط بینراهی مسیر
-\n • اگر از مسیر منحرف شوید، مسیر جدیدی برایتان پیدا میکند
+ ناوبری
+\n • امکان انتخاب بین حالت آنلاین (سریع) و آفلاین (بدون هزینهٔ اضافی بابت اینترنت)
+\n • راهنمای گامبهگام گفتاری (پیامهای گفتاری انسانی و ماشینی)
+\n • راهنمای خطوط عبوری، نام خیابانها و زمان تخمینی رسیدن
+\n • پشتیبانی از نقاط میانی در برنامهریزی سفر
+\n • اگر از مسیر منحرف شوید، مسیر جدیدی برایتان پیدا میکند
\n • جستوجو با استفاده از نشانی، نوع مکان (مثلاً پارکینگ، رستوران، هتل، پمپ گاز، موزه) یا مختصات جغرافیایی
پوشش و کیفیت تقریبی نقشه:
\nاروپای غربی: ****
@@ -3770,7 +3770,7 @@
مشخص کنید نقطهها با خط مستقیم به هم وصل شوند یا مسیر بینشان مطابق تنظیمات زیر محاسبه شود.
تمام رد
پارهٔ بعدی
- در ادامه برای استفاده از این گزینه، با یکی از پروفایلهای ناوبریتان رد خود را به نزدیکترین جادهٔ مجاز بچسبانید.
+ در ادامه، رد خود را به نزدیکترین جادهٔ مجاز متناسب با یکی از پروفایلهای ناوبریتان بچسبانید، تا از این گزینه استفاده کنید.
پروفایل ناوبری
یک فایل رد انتخاب کنید تا پارهٔ جدید را به آن بیفزایید.
تصاویر سطح خیابان
@@ -3820,7 +3820,7 @@
موتور پرشی
اسکوتر موتوری
ویلچر رو به جلو
- فاصله آستانه
+ فاصلهٔ آستانه
نمادهای ابتدا و انتها
راههای پیاده
از راههای پیاده پرهیز میکند
@@ -3997,7 +3997,7 @@
خودرو
محدودیتهای جاده که اکنون روی نقشه فعال هستند را لحاظ کن
هدف رانندگی را انتخاب نمایید تا مسیری کوتاهتر، سریعتر یا ایمنتر دریافت کنید
- اگر سرعت پایینتر از حدی است نمای نقشه را نچرخان
+ اگر سرعت پایینتر از مقدار زیر بود، نمای نقشه را نچرخان
همهٔ مناطق
%1$d فایل را حذف میکنید؟
توقف بدون ذخیرهسازی
From 2f874ae448fffa87f948a035cabdcea2cd602e65 Mon Sep 17 00:00:00 2001
From: Ajeje Brazorf
Date: Sat, 20 Mar 2021 17:14:24 +0000
Subject: [PATCH 039/103] Translated using Weblate (Sardinian)
Currently translated at 99.4% (3665 of 3685 strings)
---
OsmAnd/res/values-sc/strings.xml | 46 +++++++++++++++++++++++++++++---
1 file changed, 43 insertions(+), 3 deletions(-)
diff --git a/OsmAnd/res/values-sc/strings.xml b/OsmAnd/res/values-sc/strings.xml
index d00dbd0aab..f2fdc6c6d8 100644
--- a/OsmAnd/res/values-sc/strings.xml
+++ b/OsmAnd/res/values-sc/strings.xml
@@ -1370,7 +1370,7 @@
Impossìbile iscarrigare. Pro praghere còmpida sa connessione tua pro sighire.
Totu sos iscarrigamentos
Agiornamentos
- Iscarrigadas
+ Installadas
Zona
In diretzione Nord
In diretzione Est
@@ -2163,7 +2163,6 @@
Curvas de profondidade nàuticas
Ammustra sas lìnias de profondidade.
Imprea sos datos de s\'artària
-
Istile de ghia
Artària de su caminu
Falada
@@ -3163,7 +3162,7 @@
Paràmetros de su veìculu
Sos annùntzios vocales benint riproduidos petzi durante sa navigatzione.
Istrutziones e annùntzios de navigatzione
- Annùntzios vocales
+ Indicatziones vocales
Avisos in s\'ischermu
Cunfigura sos paràmetros de s\'àndala
Paràmetros de s\'àndala
@@ -4002,4 +4001,45 @@
Foras de camineras
Moto
Màchina
+ Ischerta sos segmentos
+ %1$s cuntenet prus de unu segmentu. Depes ischertare sa parte chi serbit pro sa navigatzione.
+ Segmentu %1$d
+ Imprea sas restritziones de sos caminos chi sunt ativas como in sa mapa
+ Àndala prus curtza otimizada (rispàrmiu energèticu)
+ Ischerta sa modalidade pro sa ghia pro otènnere un\'àndala prus curtza, prus lestra o prus segura
+ S\'icona de sa positzione atuale s\'at a ligare a s\'àndala de navigatzione atuale
+ Non rodes sa vista de sa mapa si sa lestresa est in suta de unu lìmite
+ Torra a incumintzare
+ Totu sas regiones
+ Iscantzellare %1$d documentos\?
+ Acabba chene sarvare
+ Sarva e acabba sa registratzione
+ Registratzione de sa rasta firmada
+ Ses seguru de chèrrere acabbare cun sa registratzione\?
+\nTotu sos datos non sarvados s\'ant a pèrdere.
+ In pàusa
+ Pro aplicare unas cantas impostatziones diat pòdere èssere netzessàriu torrare a allùghere s\'aplicatzione.
+ Su càrculu de s\'àndala diat pòdere evitare artziadas mannas.
+ Unu butone pro ammustrare o cuare su widget de sas coordinadas in sa mapa.
+ Ùrtimu agiornamentu de OpenStreetMap a disponimentu:
+ Agiornadu: %s
+ Ùrtima verìfica: %s
+ Frecuèntzia de sos agiornamentos
+ Sos agiornamentos de sa mapa ant a èssere verificados cada chida. Sa borta chi benit: %1$s in %2$s.
+ Sos agiornamentos de sa mapa ant a èssere verificados cada die. Sa borta chi benit: %1$s in %2$s.
+ Sos agiornamentos de sa mapa ant a èssere verificados cada ora. Sa borta chi benit: %1$s in %2$s.
+ Iscantzella sos agiornamentos
+ Ses seguru de chèrrere iscantzellare totu sos %s agiornamentos in direta\?
+ Ischerta una categoria o annanghe·nde una noa
+ Sa registratzione at a sighire.
+ Còpia su nùmene de su PDI
+ Ammustra/cua
+ Intervallu
+ Cua sas làcanas de sas riservas naturales, de sas àreas amparadas e de sos parcos natzionales
+ Làcanas naturales
+ Sa rasta non cuntenet datos de artària.
+ Sa rasta non cuntenet datos de lestresa.
+ Ischerta un\'àtera casta de coloratzione.
+ Còmporas
+ Distàntzia pro tocu
\ No newline at end of file
From 34d0d6e8d4fb85a77eaa0f68739c492477681dbf Mon Sep 17 00:00:00 2001
From: ace shadow
Date: Sat, 20 Mar 2021 19:08:36 +0000
Subject: [PATCH 040/103] Translated using Weblate (Slovak)
Currently translated at 96.0% (3740 of 3894 strings)
---
OsmAnd/res/values-sk/phrases.xml | 36 ++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/OsmAnd/res/values-sk/phrases.xml b/OsmAnd/res/values-sk/phrases.xml
index da5fec65f7..8cb67c413d 100644
--- a/OsmAnd/res/values-sk/phrases.xml
+++ b/OsmAnd/res/values-sk/phrases.xml
@@ -3704,4 +3704,40 @@
Hlbinná psychológia
Chiropraxia
Pôrodníctvo (postnatálne)
+ Radarová veža
+ Malé odpočívadlo
+ Prístrešky
+ Na streche
+ Bod GPX
+ Vrcholová kniha: nie
+ Vrcholová kniha: áno
+ Stav zjazdovky: zatvorená
+ Stav zjazdovky: otvorená
+ Strážené: nie
+ Strážené: áno
+ Názov zjazdovky
+ Lyžiarsky skok
+ Netopierí tunel
+ Netopierí most
+ Ekodukt
+ Plavecká zóna
+ Miesto na pranie šiat
+ Prekladisko odpadu
+ Sídlo lesnej správy
+ Jazero
+ Rieka
+ Studňa
+ Poháňané čerpadlo
+ Vodná nádrž
+ Kohútik
+ Vodáreň
+ Potrubná studňa
+ Očkovanie: COVID19
+ Očkovanie
+ Stanica záchranárov
+ Siréna
+ Číslo nástupišťa
+ Geodet
+ Konferenčné centrum
+ Horský žľab
\ No newline at end of file
From fa254ad6904fd09353293a8110487f28a92d6df2 Mon Sep 17 00:00:00 2001
From: Franco
Date: Sat, 20 Mar 2021 19:17:21 +0000
Subject: [PATCH 041/103] Translated using Weblate (Spanish (Argentina))
Currently translated at 100.0% (3685 of 3685 strings)
---
OsmAnd/res/values-es-rAR/strings.xml | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/OsmAnd/res/values-es-rAR/strings.xml b/OsmAnd/res/values-es-rAR/strings.xml
index 4646f1e575..08ecee8769 100644
--- a/OsmAnd/res/values-es-rAR/strings.xml
+++ b/OsmAnd/res/values-es-rAR/strings.xml
@@ -4032,9 +4032,9 @@
Actualizado: %s
Última comprobación: %s
Frecuencia de actualización
- Las actualizaciones del mapa serán comprobadas cada semana. La próxima vez %1$s en %2$s.
- Las actualizaciones del mapa serán comprobadas cada día. La próxima vez %1$s en %2$s.
- Las actualizaciones del mapa serán comprobadas cada hora. La próxima vez %1$s en %2$s.
+ Las actualizaciones del mapa serán comprobadas cada semana. Próxima vez el %1$s a las %2$s hs.
+ Las actualizaciones del mapa serán comprobadas cada día. Próxima vez el %1$s a las %2$s hs.
+ Las actualizaciones del mapa serán comprobadas cada hora. Próxima vez el %1$s a las %2$s hs.
Borrar actualizaciones
¿Borrar todas las actualizaciones en vivo de «%s»\?
Compras
@@ -4045,4 +4045,6 @@
La traza no contiene datos de altitud.
La traza no contiene datos de velocidad.
Elige otro tipo de color.
+ Fronteras naturales
+ Oculta fronteras de reservas naturales, áreas protegidas y parques nacionales
\ No newline at end of file
From 3d36bccaf65d86a3dd10668c8332eff734347dfd Mon Sep 17 00:00:00 2001
From: Eduardo Addad de Oliveira
Date: Sat, 20 Mar 2021 20:18:26 +0000
Subject: [PATCH 042/103] Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (3685 of 3685 strings)
---
OsmAnd/res/values-pt-rBR/strings.xml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/OsmAnd/res/values-pt-rBR/strings.xml b/OsmAnd/res/values-pt-rBR/strings.xml
index 543748fcb5..5cb9de5bb1 100644
--- a/OsmAnd/res/values-pt-rBR/strings.xml
+++ b/OsmAnd/res/values-pt-rBR/strings.xml
@@ -4038,4 +4038,6 @@
A trilha não contém dados de altitude.
A trilha não contém dados de velocidade.
Selecione outro tipo de colorização.
+ Limites naturais
+ Segmento %1$d
\ No newline at end of file
From c6731760dd70539311250c9b449db79fc62a2711 Mon Sep 17 00:00:00 2001
From: Eduardo Addad de Oliveira
Date: Sat, 20 Mar 2021 20:17:53 +0000
Subject: [PATCH 043/103] Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (3894 of 3894 strings)
---
OsmAnd/res/values-pt-rBR/phrases.xml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/OsmAnd/res/values-pt-rBR/phrases.xml b/OsmAnd/res/values-pt-rBR/phrases.xml
index 37cd897bcd..560f405680 100644
--- a/OsmAnd/res/values-pt-rBR/phrases.xml
+++ b/OsmAnd/res/values-pt-rBR/phrases.xml
@@ -3892,4 +3892,6 @@
Nome da pista
Salto de esqui
Centro de conferências
+ Geodesia
+ Geodesia
\ No newline at end of file
From f7b74ce0a2e8e209abd219c13e907a686a4a4dee Mon Sep 17 00:00:00 2001
From: Franco
Date: Sat, 20 Mar 2021 19:25:55 +0000
Subject: [PATCH 044/103] Translated using Weblate (Spanish (American))
Currently translated at 100.0% (3685 of 3685 strings)
---
OsmAnd/res/values-es-rUS/strings.xml | 65 +++++++++++++++++++++++-----
1 file changed, 53 insertions(+), 12 deletions(-)
diff --git a/OsmAnd/res/values-es-rUS/strings.xml b/OsmAnd/res/values-es-rUS/strings.xml
index 8bc855c80d..1669ea5037 100644
--- a/OsmAnd/res/values-es-rUS/strings.xml
+++ b/OsmAnd/res/values-es-rUS/strings.xml
@@ -380,10 +380,10 @@
No se ha encontrado un desvío
Actualización disponible para %1$s mapa(s)
Encender pantalla
- Accede a tantos tipos de mapas en línea (llamados teselas o ráster) que desees, desde teselas predefinidas de OSM (como Mapnik) a imágenes satelitales y capas de propósito especial como mapas del tiempo, mapas del clima, mapas geológicos, capas de sombreado, etc.
-\n
-\nCualquiera de estos mapas puede usarse como el mapa predefinido que se mostrará, o como una superposición o subyacencia de otro mapa base (como los mapas estándar de OsmAnd en línea). Ciertos elementos de los mapas vectoriales de OsmAnd pueden ocultarse a través del menú «Configurar mapa» para hacer cualquier subyacencia mas visible.
-\n
+ Accede a tantos tipos de mapas en línea (llamados teselas o ráster) que desees, desde teselas predefinidas de OSM (como Mapnik) a imágenes satelitales y capas de propósito especial como mapas meteorológicos, mapas del clima, mapas geológicos, capas de sombreado, etc.
+\n
+\nCualquiera de estos mapas puede usarse como el mapa predefinido que se mostrará, o como una superposición o subyacencia de otro mapa base (como los mapas estándar de OsmAnd en línea). Ciertos elementos de los mapas vectoriales de OsmAnd pueden ocultarse a través del menú «Configurar mapa» para hacer cualquier subyacencia mas visible.
+\n
\nDescarga las teselas de los mapas directamente en línea, o prepáralo para su uso sin conexión (copiar manualmente en la carpeta de datos OsmAnd) como una base de datos SQLite que puede ser producida por una variedad de herramientas de preparación de mapas de terceros.
Activa la funcionalidad para registrar y guardar tus trazas manualmente pulsando el widget de grabación GPX en el mapa, o automáticamente registrando todas tus rutas navegadas en un archivo GPX.
\n
@@ -418,7 +418,7 @@
Registra dónde se ha estacionado el automóvil, incluyendo cuánto tiempo queda.
\n Tanto la ubicación como el tiempo del estacionamiento se muestran en el menú principal y en un widget sobre el mapa. Se puede añadir una alarma de recordatorio al calendario de Android.
Crea caminos pulsando el mapa, usando o modificando archivos GPX existentes, para planificar un viaje y medir la distancia entre puntos. El resultado puede guardarse como un archivo GPX y usarse luego para la orientación.
- Activa las funciones de accesibilidad del dispositivo, directamente en OsmAnd. Facilita por ejemplo, el ajuste de la velocidad de la voz para voces de texto a voz, la configuración de navegación D-pad, usando la rueda de desplazamiento para el control del zoom, o la retroalimentación de texto a voz, por ejemplo, para anunciar la ubicación automáticamente.
+ Activa las funciones de accesibilidad del dispositivo, directamente en OsmAnd. Facilita por ejemplo, el ajuste de la velocidad de la voz para voces de texto a voz, la configuración de navegación del pad direccional, usando la rueda de desplazamiento para el control del zoom, o la retroalimentación de texto a voz, por ejemplo, para anunciar la ubicación automáticamente.
Haz contribuciones en OSM, como el crear o modificar objetos PDI, abrir o comentar notas de OSM y contribuir con archivos de trazas GPX grabados en OsmAnd, proporcionando tu nombre de usuario y contraseña. OpenStreetMap.org es un proyecto de mapeo de dominio público, global, libre e impulsado por la comunidad.
Ajusta las funciones de desarrollo y depuración, como la simulación de navegación, el rendimiento del renderizado o las indicaciones por voz. Destinado para desarrolladores, no es necesario para el normal uso de la aplicación.
Descargar el mapa especial sin conexión para mostrar las instalaciones de esquí.
@@ -1057,7 +1057,7 @@
Suburbio
Aldea
Villa
- Pueblo
+ Ciudad pequeña
Ciudad
Parar simulación
Iniciar simulación
@@ -1662,7 +1662,7 @@
Navegación
Ejecutar en modo reposo
Información del favorito
- Añadir a Favoritos
+ Añadir favorito
Caminos
Define la unidad de velocidad.
Unidad de velocidad
@@ -2667,7 +2667,7 @@
Wikiviajes
Artículos de Wikiviajes en todo el mundo
La página sólo está disponible en línea. ¿Abrirla en el navegador web?
- Caché de imágenes
+ Almacén de imágenes
Borrar historial de búsquedas
Mostrar imágenes
No
@@ -3301,7 +3301,7 @@
Elegir el color
Los perfiles predefinidos de OsmAnd no se pueden borrar, sino desactivar (en la pantalla anterior) u ordenarse en la parte inferior.
Editar perfiles
- El «Tipo de navegación» rige la forma en que se calculan las rutas.
+ El «Tipo de navegación» determina cómo se calculan las rutas.
Aspecto del perfil
Icono, color y nombre
Editar la lista de perfiles
@@ -3530,7 +3530,7 @@
Buscar por tipos de PDI
Regla radial
Acción rápida
- Compras de OsmAnd
+ Compras en OsmAnd
El pago será cargado a la cuenta de Google Play al confirmar la compra.
\n
\nLa suscripción se renueva automáticamente a menos que se cancele antes de la fecha de renovación. Se le cobrará a su cuenta el período de renovación (mes/trimestre/año) sólo en la fecha de renovación.
@@ -3561,7 +3561,7 @@
Kirguís
Kazajo
Javanés
- Gujarati
+ Gujaratí
Chuvash
Checheno
Bávaro
@@ -3905,7 +3905,7 @@
Añadir nuevo segmento
%1$s * %2$s
Alemán (casual)
- Avión ligero
+ Aeronave ligera
Usado por última vez
Preferir rutas de senderismo
Prefiere rutas de senderismo
@@ -4006,4 +4006,45 @@
Senderismo
Bicicleta
Automóvil
+ Elegir segmentos
+ «%1$s» contiene más de un segmento, debe marcar la parte necesaria para la navegación.
+ Segmento %1$d
+ Usar las restricciones viales que están activas ahora en el mapa
+ Ruta optimizada más corta (bajo consumo)
+ Elige el propósito de la conducción para obtener la ruta más corta, más rápida o más segura
+ El icono de la ubicación actual se ajustará a la ruta de navegación actual
+ No girar la vista del mapa si la velocidad es inferior a un umbral
+ Reiniciar
+ Todas las regiones
+ ¿Borrar %1$d archivos\?
+ Parar sin guardar
+ Guardar y parar la grabación
+ Grabación de la traza detenida
+ ¿Dejar de grabar\?
+\nTodos los datos no guardados se perderán.
+ En pausa
+ Es necesario reiniciar la aplicación para aplicar algunos ajustes.
+ La ruta podría evitar las fuertes subidas.
+ Alternar para mostrar u ocultar el widget de coordenadas en el mapa.
+ Distancia al pulsar
+ Última actualización de OpenStreetMap disponible:
+ Actualizado: %s
+ Última comprobación: %s
+ Frecuencia de actualización
+ Las actualizaciones del mapa serán comprobadas cada semana. Próxima vez el %1$s a las %2$s hs.
+ Las actualizaciones del mapa serán comprobadas cada día. Próxima vez el %1$s a las %2$s hs.
+ Las actualizaciones del mapa serán comprobadas cada hora. Próxima vez el %1$s a las %2$s hs.
+ Borrar actualizaciones
+ ¿Borrar todas las actualizaciones en vivo de «%s»\?
+ Compras
+ Marca una categoría o añade una nueva
+ La grabación continuará.
+ Copiar nombre del PDI
+ Mostrar/Ocultar
+ Intervalo
+ Oculta fronteras de reservas naturales, áreas protegidas y parques nacionales
+ Fronteras naturales
+ La traza no contiene datos de altitud.
+ La traza no contiene datos de velocidad.
+ Elige otro tipo de color.
\ No newline at end of file
From c129ef5ce71bcacf5f8f149affd9652d05475a06 Mon Sep 17 00:00:00 2001
From: Liu Tao
Date: Sat, 20 Mar 2021 16:47:42 +0000
Subject: [PATCH 045/103] Translated using Weblate (Chinese (Simplified))
Currently translated at 85.2% (3142 of 3685 strings)
---
OsmAnd/res/values-zh-rCN/strings.xml | 251 +++++++++++++++++----------
1 file changed, 159 insertions(+), 92 deletions(-)
diff --git a/OsmAnd/res/values-zh-rCN/strings.xml b/OsmAnd/res/values-zh-rCN/strings.xml
index 3e325159f3..8c7ed3af42 100644
--- a/OsmAnd/res/values-zh-rCN/strings.xml
+++ b/OsmAnd/res/values-zh-rCN/strings.xml
@@ -149,8 +149,8 @@
离线编辑
始终使用离线编辑。
正在上传…
- 上传修改OSM
- 删除修改
+ 上传编辑到 OSM
+ 删除编辑
所有上传
免费版
北美
@@ -166,8 +166,8 @@
大洋洲
全球和专题地图
全球维基百科的POI
- 语音包(录制,功能有限)
- 语音包(TTS合成,优先选用)
+ 语音提示(录音,功能有限)
+ 语音提示(TTS,首选)
维基百科(离线)
用户自定义
用户配置文件
@@ -186,7 +186,7 @@
城市
升级OsmAnd+
重命名
- 上传GPX文件OSM社区。它们将被用于改善地图。
+ 将 GPX 文件上传到 OSM 社区,改进地图。
发送到OSM
家
朋友
@@ -195,11 +195,11 @@
类别
谢谢,不用了
渲染调试信息
- 反向GPX方向
+ 反转轨迹方向
在没有连接到互联网的情况下,无法进行操作。
下一页
上一页
- 更改长度单位。
+ 改变测量的距离。
长度单位
英里/英尺
英里/码
@@ -251,7 +251,7 @@
导入
发送报告
任何
- 由于Yandex的交通信息。
+ 感谢 Yandex 提供交通信息。
Yandex的流量
路线
收藏
@@ -269,7 +269,7 @@
头
后来
下载区域
- 正在搜索信号…
+ 等待信号……
竖屏
横屏
屏幕方向
@@ -292,9 +292,9 @@
无法保存 GPX 文件。
你已到达。
无效的座标
- 回到OsmAnd地图
+ 返回地图
关闭
- 将GPX轨迹保存到SD卡…
+ 保存 GPX 文件……
成品
使用互联网计算路线。
使用在线导航
@@ -351,18 +351,18 @@
版本:
关于
版本信息,许可证,项目成员
- 过期(分钟):%1$s
+ 到期时间(分钟): %1$s
可下载:%1$s
最大显示级别:%1$s
最小显示级别:%1$s
地图瓦片数据:%1$s
地图瓦片数据源 %1$s 已成功保存
- 椭圆墨卡托
+ 椭圆墨卡托投影
最大显示级别
- 过期(分钟)
+ 到期时间(分钟)
最小显示级别
URL
- 选择已有来源…
+ 选择现有的……
定义/编辑…
FPS 调试信息
选择驾驶区域:美国、欧洲、英国、亚洲等。
@@ -370,14 +370,14 @@
日本
美国
加拿大
- 欧洲、亚洲、拉丁美洲及相似地区
- 英国、印度、澳大利亚及其他
+ 欧洲、亚洲、拉丁美洲和类似地区
+ 英国、印度和类似地区
播报…
设置街道名称、交通警告(强制停车、减速带)、测速仪警告、限速等公告。
播报限速
播报测速电子眼
播报交通信息
- 请在设置中指定OSM用户名和密码
+ 请在“设置”中指定 OSM 用户和密码
设为终点
设为起点
地图:
@@ -387,7 +387,7 @@
起点:
终点 %1$s
设为终点
- 先选择城市或街道
+ 首先设置城市或街道
在相邻城市搜索街道
OSM 修改文件已成功生成 %1$s
无法备份 OSM 更改。
@@ -402,7 +402,7 @@
开始编辑
完成编辑
清除所有点
- 打开已有 GPX
+ 打开现有的 GPX 文件
请等待当前任务完成
完整版本
停止导航
@@ -438,7 +438,7 @@
使用系统应用拍照。
设置音频和视频设置。
音频/视频设置
- 录制时发生错误
+ 录制失败
摄像头不可用
音频/视频正在记录,要停止请点击AV窗体。
打开外部播放器
@@ -510,7 +510,7 @@
使用在线地图(在储存卡上下载并缓存瓦片)。
在线地图
配置在线或缓存瓦片地图来源。
- 显示特殊可用性功能的设置。
+
矢量地图很可能显示更快速。但在某些设备上不能正常工作。
测试语音提示
这个位置没有离线矢量地图。您可以从设置(数据管理)中下载,或者切换到在线地图。
@@ -530,7 +530,7 @@
异步 OSM 编辑:
OSM兴趣点/注记已在设备上保存
显示当前轨迹
- 此 OsmAnd 免费版本最多支持下载 %1$s 套数据,并且不支持离线维基百科文章。
+ 你可以下载或更新 %1$s 地图。
显示 POI 描述。
已存在上次导出的收藏夹文件。是否要替换它?
指定导航选项。
@@ -552,30 +552,32 @@
删除 %1$s?
停止模拟导航
开始模拟导航
- 文件无法重命名。
- 同名文件已存在。
- 找到了几个相关的 POI 类别。
- 用于搜索POI的本地数据不存在。
+ 无法重命名文件。
+ 已经有一个同名的文件存在。
+ 找到了几个相关的兴趣点类别。
+ 下载离线数据以搜索兴趣点。
按名称搜索
兴趣点数据文件 \'%1$s\' 是多余的,可以删除。
用于维护 POI 改动的本地文件不存在,且无法创建。
- 服务器包含与您当前应用版本不兼容的地图文件。要下载并使用这些文件,请将应用程序升级至新版本。
+ 下载新版本的应用程序,以便能够使用新的地图文件。
搜索位置…
我的位置(已找到)
地址…
收藏夹…
未定义
上次地图显示位置
- 路线已成功保存为 \'%1$s\'。
+ 路线保存为“%1$s”。
文件名:
同名文件已存在。
保存
%2$d 个项目中的 %1$d 个已成功上传。
显示更多地图细节
- 收藏点已成功删除。
+ 收藏点已删除。
您将要删除 %1$d 个收藏点和 %2$d 个收藏组。是否确认?
基础世界地图(小比例尺下覆盖整个世界)丢失。请考虑下载 World_basemap_x.obf 以确保应用运行环境完整。
- \n\n长按进入选项
+ "
+\n
+\n长按选项"
本地版本
管理地图文件。
下载
@@ -583,8 +585,8 @@
地址数据
交通设施数据
地图数据
- 语音数据(TTS)
- 语音数据(录制)
+ 语音提示(TTS)
+ 语音提示(录音)
兴趣点数据
TTS语音
新搜索
@@ -592,18 +594,18 @@
地图字体大小
显示渲染性能。
解包新数据…
- 已选择在线导航服务,但网络连接不可用。
+ 在线导航不能离线工作。
不支持的语言
数据丢失
使用当前终点
提醒语音音频
- 媒体/音乐音频
+ 媒体/导航音频
应用程序无法下载地图图层 %1$s,请尝试重新安装。
调整叠加层透明度。
叠加层透明度
调整基本地图透明度。
基础地图透明度
- 背景层地图…
+ 背景层地图……
背景层地图
选择背景层地图
叠加层地图…
@@ -635,7 +637,7 @@
存储目录
GPS 状态应用未安装。是否转到应用市场中搜索?
语音指引不可用。请到“设置”→“常规设置”→“语音指引”中选择想要的语音数据包并下载。
- 未选择引导语音
+ 选择一个语音提示包
调整夜间和白天模式之间的切换。
是否下载 {0} 个文件({1} MB)?
已选择 {0} 个项目
@@ -646,11 +648,11 @@
下载地图
此地图无法下载
无法绘制所选区域。
- 使用位置 …
- 渲染器已成功加载
+ 使用位置……
+ 已加载渲染器
无法加载渲染器。
矢量渲染器
- 选择渲染器外观
+ 选择渲染外观
显示POI网址
显示POI电话
搜索交通设施
@@ -659,17 +661,18 @@
离线矢量地图
修改 POI
删除 POI
- 保持地图正北朝上
+ 不旋转(正北永远朝上)
地图对齐方式:
地图朝向
路线详情
- 收藏夹已成功导入
+ 收藏已导入
选择是否有拍照声。
- 拍照时播放声音
+ 播放相机快门声
语音数据版本不支持
指定的语音数据已损坏
- 选择的语音数据不可用
- SD卡无法访问。\n您将无法查看地图和进行搜索。
+ 所选语音提示包不可用
+ 无法访问存储卡。
+\n你将无法看到地图或查找内容。
SD卡处于只读状态。\n您将只能查看已有地图,无法从互联网下载。
正在解压缩文件…
在上一次地图中心附近搜索
@@ -679,14 +682,14 @@
添加新规则
在地图上显示公共交通站点。
显示公共交通站点
- 导航应用 OsmAnd
+ OsmAnd 导航应用
POI 数据已成功更新 ({0} 已载入)
无法更新本地兴趣点列表。
无法从服务器加载数据。
此区域没有可用的离线 POI 数据
小比例尺下更新 POI 功能不可用
更新 POI
- 是否要通过互联网更新本地数据?
+ 从互联网更新本地数据?
城市:{0}
街道:{0},{1}
交叉路口:{0} x {1} 在 {2}
@@ -705,7 +708,7 @@
总距离 %1$s,行驶时间 %2$d 时 %3$d 分。
在线或离线导航服务。
导航服务
- SD卡上的数据存储目录无法访问!
+ 存储卡上的存储文件夹无法访问!
是否下载 {0} - {1}?
{0} 的离线数据已经存在({1})。是否要更新它({2})?
地址
@@ -713,7 +716,7 @@
正在下载可用区域的列表…
区域列表未能从 osmand.net 获取。
收藏点已被编辑
- 请首先选择目的地
+ 请先设置目的地
营业时间
正在打开修改集…
正在关闭修改集…
@@ -739,23 +742,23 @@
更新地图
重新载入地图瓦片
目标
- 加入收藏夹
+ 添加到“收藏”
在当地名称和英文名称之间选择。
- 在地图中使用英文名称
- 应用程序设置
+ 在地图上使用英文名称
+ 应用设置
搜索地址
选择建筑物
选择街道
选择城市
选择国家
显示上一次使用的兴趣点叠加层。
- 显示POI
+ 显示兴趣点叠加
选择在线或缓存地图瓦片的来源。
瓦片地图来源
地图来源
显示位置
使用互联网下载丢失的地图瓦片
- 导航应用程序
+ 导航应用
选择POI
搜索更多
从列表中选择区域
@@ -785,13 +788,13 @@
已删除
添加
修改
- 动作 {0} 已成功完成。
- 执行动作 {0} 时发生意外的错误。
+ 动作 {0} 已完成。
+ 无法执行动作 {0}。
执行动作 {0} 时发生 I/O 错误。
节点的信息未能加载
所有其他标记都已保留
- 是否删除选中的过滤器?
- 过滤器 %1$s 已被删除
+ 删除此筛选规则?
+ 筛选规则“%1$s”已被删除
过滤器 %1$s 已创建
自动对焦
清除中途点
@@ -819,11 +822,11 @@
顶栏
完整报告
重新计算路线
- OpenStreetMap 登录名和密码
+ OSM 用户名和密码
捐赠
接收者数量
编辑数 %1$s,排名 %2$s,总计编辑 %3$s
- OSM 编辑排名
+ OSM 编辑者排名
订阅
OsmAnd 实时订阅
公开名称
@@ -849,16 +852,16 @@
工具栏
小工具
添加地图标记
- 您确定要添加所有地点到地图标记?
+ 将所有点添加为地图标记?
选择地图标记
反向顺序
激活地图标记功能。
- 您要移除所有有效标记?
- 您要清除历史地图标记?
+ 删除所有的活动标记?
+ 清除地图标记历史记录?
激活标记
地图标记
地图标记
- 显示 MTB 路线
+ 显示山地自行车道
显示多边形
电子邮件地址
隐藏地下物体
@@ -948,7 +951,7 @@
米/秒
分钟每千米
分钟/英里
- 海里/小时 (节)
+ 海里每小时(节)
节
分钟每米
分/千米
@@ -1005,7 +1008,7 @@
爱沙尼亚语
宿务语
避免独立日志
- 位置服务未启用。您确定要开启?
+ 位置服务已关闭。要开启吗?
下载额外的维基百科数据 (%1$s MB) 吗?
导入到 OsmAnd
阅读完整文章(在线)
@@ -1016,10 +1019,10 @@
已禁用
退出
隐藏门牌号码
- 复制文件失败
+ 移动文件失败
外部存储
多用户存储
- 内部应用存储
+ 内部存储
手动指定
内部存储
地图存储
@@ -1076,11 +1079,11 @@
更多…
匿名上传您的 OSM 注记,或者使用您的 OpenStreetMap.org 账号。
附近的维基百科文章
- 搜索城市或地区
+ 城市或地区
上传兴趣点
路线计算
- 您暂时没有轨迹
- 您也可以将轨迹添加到文件夹下
+ 你还没有任何轨迹文件
+ 你也可以将轨迹文件添加到文件夹
继续
暂停
无数据
@@ -1088,7 +1091,7 @@
筛选器:不记录低于该速度的点。
通知
圣诞兴趣点
- 显示圣诞兴趣点?
+ 显示圣诞假期兴趣点?
输入城市、地址、兴趣点名称
创建自定义过滤器
自定义搜索
@@ -1184,7 +1187,7 @@
德国道路地图
高对比度道路
美国道路地图
- 兴趣点…
+ 兴趣点叠加层……
地图来源…
改变地图来源
添加地图来源
@@ -1212,7 +1215,7 @@
速度限制容忍程度
其他地图属性
显示路线
- 搜索地理位置
+ 按地理位置搜索
颜色方案
改变颜色
编辑名称
@@ -1332,7 +1335,7 @@
轻点动作按钮会在地图上显示或隐藏 OSM 注记。
按距离排序
在我的收藏中搜索
- 要在地图上看到起伏的山坡,您需要下载这个地区的地形阴影层地图。
+ 下载“山体阴影”叠加层地图以显示垂直阴影。
安装“等高线”插件以显示渐变的垂直区域。
基于缩放级别开始隐藏
下载本地区使用的“等高线”地图。
@@ -1341,7 +1344,7 @@
从缩放级别开始显示
组名称
动画处理我的位置
- 在导航过程中打开\"我的位置\"的动画地图平移。
+ 在导航过程中开启“我的位置”的动画地图平移。
轻点按钮将在屏幕中心位置添加一个目的地。以前设定的目的地成为最后的中转点。
使画面居中的新航线目的地的按钮,取代之前选择的目的地(如果有的话)。
使屏幕居中的按钮,是第一中间目的。
@@ -1351,8 +1354,8 @@
海洋等深线和航海点。
感谢你购买“航海等深线”
航海等深线
- 南半球航海等深线
- 北半球航海等深线
+ 南半球航海深度点
+ 北半球航海深度点
航海等深线
航海地图
在地图上分析
@@ -1366,7 +1369,7 @@
坡度
添加新文件夹
转到这条路线上
- 在这条路线的突出点
+ 航点、兴趣点、命名的特征
轨迹
移动的时间
时间跨度
@@ -1412,7 +1415,7 @@
如果 %1$s 的名称缺失则音译
音译名称
请输入新筛选器的名称,该名称将添加到你的\"类别\"选项卡中。
- 每个月会收取认购费用。您可以在 Google Play 随时取消您的订购。
+ 订阅按选定的时间段收费。可随时在 Google Play 上取消。
你的部分捐款将发送给 OSM 捐助者。订阅费用保持不变。
启用认购可每小时、每天、每周的更新以及世界各地所有的地图无限制的下载。
获得
@@ -1466,7 +1469,7 @@
触觉方向
由振动指示目标点方向。
启用导航时由 OsmAnd 实时服务提供的更新。
- 未设置目的地
+ 辅助功能插件:没有设置目的地
磁方位
相对方位
当您离开道路时不重新计算路线
@@ -2174,7 +2177,7 @@
停用
已停用
安装的 Android TTS(文本到语音)引擎不支持所选语言,将使用其预设的 TTS 语言。在市场上寻找其他 TTS 引擎?
- 安装所选语言没有数据。你想要去市场安装吗?
+ 去应用市场下载选定的语言?
沿着整条轨迹
指定以脱机矢量地图显示
\n
@@ -2214,9 +2217,9 @@
没有我的收藏标点要保存
通过 OsmAnd 分享我的收藏夹
在 SD 卡上找到的区域没有离线数据。从互联网下载区域数据。
- 输入搜索条件来查找 POI
+ 输入查找兴趣点
地图图层
- POI 搜索
+ 搜索兴趣点
使用轨迹球设备来移动地图。
使用轨迹球
设置每个背景位置固定所允许的最高等待时间。
@@ -2420,14 +2423,14 @@
重新载入
重置
按月将记录的轨迹存放在文件夹中
- 按照月份将记录的轨迹存储在子文件夹中(例如 2017-01)。
+ 按照月份将记录的轨迹存储在子文件夹中(例如 2018-01)。
重新加载区片以查看最新的数据。
区片缓存
平均
升序/降序
最大/最小
%2$d 中的 %1$d
- 移动时间
+ 运动时间
最小/最大
暂停/继续导航
暂停或恢复导航的按钮。
@@ -2478,8 +2481,8 @@
点击地图上的标记将其移动到活动标记的顶端, 而不打开上下文菜单。
\'一个点击\'激活
做注记!
- 使用小部件或上下文菜单, 在地图上的每个点添加音频、视频或照片注释。
- 按日期说明
+ 通过使用小部件或上下文菜单将音频、视频或照片注记添加到地图上的任何点。
+ 按日期排序的视频或音频注记
按日期
按类型
用航路点寻找轨迹
@@ -2501,7 +2504,7 @@
显示从你的位置到活动标记位置的方向线。
显示一个或两个箭头指示方向到活动标记。
选择如何显示到活动标记的距离。
- 选择想显示多少的方向指标。
+ 指定方向指示器的数量。
小数位数
右方
左方
@@ -2514,7 +2517,7 @@
明日开始营业时间
兴趣点(POI)标签
显示数字盘
- 在地图上显示/隐藏 OSM 注记。
+ 在地图上显示或隐藏 OSM 注记。
GPX - 适合导出到 JOSM 或其它 OSM 编辑器。
OSC - 适合导出到 OSM。
GPX 文件
@@ -2667,7 +2670,7 @@
夜间模式
切换日间/夜间模式
此地区
- 编辑活动
+ 编辑动作
你增加了%1$s 个目标。输入文件名后点击\"保存\"。
请在允许OsmAnd获取定位信息后继续。
平顺度
@@ -2724,7 +2727,7 @@
逐步
道路类型
退出于
- 在地图中显示或隐藏已选中的GPX轨迹的按钮。
+ 在地图上显示或隐藏所选轨迹的按钮。
请先设置目的地
为OsmAnd Live启用公共交通的变更情况。
添加出发地和目的地
@@ -3562,4 +3565,68 @@
选择轨迹文件
需要其他地图才能在地图上查看维基百科兴趣点。
操作按钮在选定的配置文件之间切换。
+ Parrot
+ WunderLINQ
+ 外部输入设备
+ 按类别排序
+ MGRS
+ 奥克西坦语
+ 使用录制的 GPX 轨迹模拟你的位置。
+ 编辑 %1$s,总计 %2$s mBTC
+ 选择导航配置文件
+ 继续在地图上显示
+ 距离指示
+ 最后使用:%1$s
+ 在地图上显示箭头
+ 显示方向线
+ 移动到历史
+ 你必须至少添加一个标记才能使用此功能。
+ 导入为收藏
+ 添加始发站
+ 从地图标记中删除的航点
+ 使用两位数的经度
+ 搜索国家、城市或省份
+ 删除搜索历史记录
+ 页面仅在线提供。在网页浏览器中打开?
+ 选择一本旅游书籍
+ 仅在 Wi-Fi 上
+ 仅在 Wi-Fi 上
+ 选择合适的项目
+ 购买以下其中一项,即可获得离线旅游指南功能:
+ 解锁所有 OsmAnd 功能
+ 等高线和山体阴影地图
+ 每小时更新地图
+ 每月更新地图
+ 欢迎使用公开测试版
+ 任何人都可以编辑的自由的全球旅游指南。
+ 下载 Wikivoyage 旅行指南,在没有连接到互联网的情况下查看世界各地的文章。
+ 旧的默认 \'Mapnik\' 风格。与 \'Mapnik\' 颜色相似。
+ 在地图上保留已通过的标记
+ 选择要跟随的轨迹文件
+ 国道
+ 选择要在应用程序中可见的配置文件。
+ BRouter(离线)
+ 船、划船、帆船
+ 散步、徒步、跑步
+ 山地自行车、轻便摩托车、马
+ 汽车、卡车、摩托车
+ 选择导航类型
+ 基于你的自定义配置文件的默认应用程序配置文件之一,这定义了基本的设置,如部件的默认可见性和速度和距离的单位。这些是默认的应用程序配置文件,以及它们可以扩展到的自定义配置文件的例子:
+ 选择用以开始的配置文件
+ 是否确定要删除“%s”配置文件
+ 首先保存配置文件的更改
+ 你不能删除 OsmAnd 的基本配置文件
+ 已经有该名称的配置文件
+ 你必须先指定一个配置文件名称。
+ 输入配置文件名称
+ 请为新应用配置文件选择导航类型
+ 选择导航类型
+ 用户模式,派生自: %s
+ 显示指南针标尺
+ 选择你分享的数据
+ 如果同意我们的%1$s,请点击“允许”
+ 帮助我们了解 OsmAnd 功能的受欢迎程度。
+ 帮助我们了解国家和地区地图的受欢迎程度。
+ 定义允许 OsmAnd 分享哪些数据。
+ 选择要分享的数据类型:
\ No newline at end of file
From f16b46295dd62551a05ef5f959f95e265e8d8664 Mon Sep 17 00:00:00 2001
From: cepprice
Date: Sun, 21 Mar 2021 14:44:37 +0500
Subject: [PATCH 046/103] Make track arrows more visible when track line is
thin
---
.../views/layers/geometry/GpxGeometryWay.java | 20 ++++++--
.../geometry/GpxGeometryWayContext.java | 11 +++++
.../layers/geometry/GpxGeometryWayDrawer.java | 46 ++++++++++++++++++-
3 files changed, 71 insertions(+), 6 deletions(-)
diff --git a/OsmAnd/src/net/osmand/plus/views/layers/geometry/GpxGeometryWay.java b/OsmAnd/src/net/osmand/plus/views/layers/geometry/GpxGeometryWay.java
index 24d49df0b1..0e9b73dc82 100644
--- a/OsmAnd/src/net/osmand/plus/views/layers/geometry/GpxGeometryWay.java
+++ b/OsmAnd/src/net/osmand/plus/views/layers/geometry/GpxGeometryWay.java
@@ -2,13 +2,14 @@ package net.osmand.plus.views.layers.geometry;
import android.graphics.Bitmap;
-import androidx.annotation.NonNull;
-
+import net.osmand.AndroidUtils;
import net.osmand.GPXUtilities.WptPt;
import net.osmand.data.RotatedTileBox;
import java.util.List;
+import androidx.annotation.NonNull;
+
public class GpxGeometryWay extends GeometryWay> {
private List points;
@@ -76,7 +77,9 @@ public class GpxGeometryWay extends GeometryWay {
- private static final double DIRECTION_ARROW_DISTANCE_MULTIPLIER = 10.0;
+ private static final float TRACK_WIDTH_THRESHOLD = 8f;
+ private static final float ARROW_DISTANCE_MULTIPLIER = 1.5f;
+ private static final float SPECIAL_ARROW_DISTANCE_MULTIPLIER = 10f;
private Bitmap arrowBitmap;
@@ -114,6 +117,9 @@ public class GpxGeometryWay extends GeometryWay {
@@ -22,31 +25,70 @@ public class GpxGeometryWayDrawer extends GeometryWayDrawer style) {
super(x, y, angle, style);
+ createCircleBitmap((GeometryArrowsStyle) style);
}
@Override
void draw(Canvas canvas, GeometryWayContext context) {
if (style instanceof GeometryArrowsStyle) {
+ Context ctx = style.getCtx();
GeometryArrowsStyle arrowsWayStyle = (GeometryArrowsStyle) style;
Bitmap bitmap = style.getPointBitmap();
+ boolean useSpecialArrow = arrowsWayStyle.useSpecialArrow();
- float newWidth = arrowsWayStyle.getTrackWidth() / 2f;
+ float newWidth = useSpecialArrow ? AndroidUtils.dpToPx(ctx, 12) : arrowsWayStyle.getTrackWidth() / 2f;
float paintH2 = bitmap.getHeight() / 2f;
float paintW2 = newWidth / 2f;
Matrix matrix = getMatrix();
matrix.reset();
- matrix.postScale(newWidth / bitmap.getWidth(), 1);
+ float sy = useSpecialArrow ? newWidth / bitmap.getHeight() : 1;
+ matrix.postScale(newWidth / bitmap.getWidth(), sy);
matrix.postRotate((float) angle, paintW2, paintH2);
matrix.postTranslate(x - paintW2, y - paintH2);
+ if (useSpecialArrow) {
+ drawCircle(canvas, arrowsWayStyle);
+ }
+
Paint paint = context.getPaintIconCustom();
Integer pointColor = style.getPointColor();
paint.setColorFilter(new PorterDuffColorFilter(pointColor, PorterDuff.Mode.SRC_IN));
canvas.drawBitmap(bitmap, matrix, paint);
}
}
+
+ private void drawCircle(Canvas canvas, GeometryArrowsStyle style) {
+ float offset = circleBitmap.getWidth() / 2f;
+ float angleOffset = AndroidUtils.dpToPx(style.getCtx(), 1);
+ double rad = Math.toRadians(angle + 90);
+ float x = (float) (this.x - offset - angleOffset * Math.cos(rad));
+ float y = (float) (this.y - offset - angleOffset * Math.sin(rad));
+ canvas.drawBitmap(circleBitmap, x, y, null);
+ }
+
+ private void createCircleBitmap(GeometryArrowsStyle style) {
+ Context ctx = style.getCtx();
+ int size = AndroidUtils.dpToPx(ctx, 16);
+ circleBitmap = Bitmap.createBitmap(size, size, style.getPointBitmap().getConfig());
+ Paint paint = new Paint(Paint.DITHER_FLAG | Paint.ANTI_ALIAS_FLAG);
+ paint.setStyle(Paint.Style.FILL);
+
+ Canvas c = new Canvas(circleBitmap);
+
+ paint.setColor(0x33000000);
+ Path path = new Path();
+ path.addCircle(size / 2f, size / 2f, AndroidUtils.dpToPx(ctx, 8), Path.Direction.CW);
+ c.drawPath(path, paint);
+
+ paint.setColor(style.getTrackColor());
+ path.reset();
+ path.addCircle(size / 2f, size / 2f, AndroidUtils.dpToPx(ctx, 7), Path.Direction.CW);
+ c.drawPath(path, paint);
+ }
}
}
\ No newline at end of file
From e06478d4fe94e6b4af55dccd5e7d2ecae58b3806 Mon Sep 17 00:00:00 2001
From: Vitaliy
Date: Sun, 21 Mar 2021 15:25:45 +0200
Subject: [PATCH 047/103] Revert "Compute obstaclesTime before adding final
segment"
---
.../src/main/java/net/osmand/router/BinaryRoutePlanner.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/OsmAnd-java/src/main/java/net/osmand/router/BinaryRoutePlanner.java b/OsmAnd-java/src/main/java/net/osmand/router/BinaryRoutePlanner.java
index 4c85058fa3..0769e1390c 100644
--- a/OsmAnd-java/src/main/java/net/osmand/router/BinaryRoutePlanner.java
+++ b/OsmAnd-java/src/main/java/net/osmand/router/BinaryRoutePlanner.java
@@ -457,10 +457,10 @@ public class BinaryRoutePlanner {
directionAllowed = false;
continue;
}
- obstaclesTime += obstacle;
- obstaclesTime += heightObstacle;
boolean alreadyVisited = checkIfOppositeSegmentWasVisited(ctx, reverseWaySearch, graphSegments, segment, oppositeSegments,
segmentPoint, segmentDist, obstaclesTime);
+ obstaclesTime += obstacle;
+ obstaclesTime += heightObstacle;
if (alreadyVisited) {
directionAllowed = false;
continue;
From 53c817e8112dc49c9905995c982ba904836ac2a2 Mon Sep 17 00:00:00 2001
From: androiddevkotlin <64539346+androiddevkotlin@users.noreply.github.com>
Date: Sun, 21 Mar 2021 15:39:13 +0200
Subject: [PATCH 048/103] Review
---
.../GpxApproximationFragment.java | 19 ++++++-----
.../MeasurementToolFragment.java | 34 ++++++++-----------
2 files changed, 25 insertions(+), 28 deletions(-)
diff --git a/OsmAnd/src/net/osmand/plus/measurementtool/GpxApproximationFragment.java b/OsmAnd/src/net/osmand/plus/measurementtool/GpxApproximationFragment.java
index cea8ff65a4..521034a430 100644
--- a/OsmAnd/src/net/osmand/plus/measurementtool/GpxApproximationFragment.java
+++ b/OsmAnd/src/net/osmand/plus/measurementtool/GpxApproximationFragment.java
@@ -158,15 +158,6 @@ public class GpxApproximationFragment extends ContextMenuScrollFragment
updateCardsLayout();
}
updateCards();
- final LockableScrollView profileContainer = mainView.findViewById(R.id.route_menu_bottom_scroll);
- profileContainer.postDelayed(new Runnable() {
- @Override
- public void run() {
- if (snapToRoadAppMode.getOrder() > 4) {
- profileContainer.fullScroll(View.FOCUS_DOWN);
- }
- }
- }, 100);
updateButtons(mainView);
progressBar = mainView.findViewById(R.id.progress_bar);
@@ -185,6 +176,16 @@ public class GpxApproximationFragment extends ContextMenuScrollFragment
calculateGpxApproximation(true);
+ final LockableScrollView profileView = mainView.findViewById(R.id.route_menu_bottom_scroll);
+ final LinearLayout profileContainer = mainView.findViewById(R.id.route_menu_cards_container);
+ profileView.postDelayed(new Runnable() {
+ @Override
+ public void run() {
+ int selectedProfilePosition = profileContainer.getHeight() / ApplicationMode.values(getMyApplication()).size() * snapToRoadAppMode.getOrder();
+ profileView.scrollTo(0, selectedProfilePosition);
+ }
+ }, 100);
+
return mainView;
}
diff --git a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java
index 34fde58555..23a86009a0 100644
--- a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java
+++ b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java
@@ -132,8 +132,7 @@ public class MeasurementToolFragment extends BaseOsmAndFragment implements Route
private ImageView mainIcon;
private String fileName;
private OnBackPressedCallback onBackPressedCallback;
- private boolean isShowSnapWarning;
- private static final String SHOW_SNAP_WARNING = "show_snap_warning";
+ private boolean showSnapWarning;
private InfoType currentInfoType;
@@ -237,11 +236,7 @@ public class MeasurementToolFragment extends BaseOsmAndFragment implements Route
if (mapActivity == null) {
return null;
}
- if (savedInstanceState != null) {
- restoreState(savedInstanceState);
- } else if (getArguments() != null) {
- restoreState(getArguments());
- }
+
final MeasurementToolLayer measurementLayer = mapActivity.getMapLayers().getMeasurementToolLayer();
final OsmandApplication app = mapActivity.getMyApplication();
@@ -559,12 +554,11 @@ public class MeasurementToolFragment extends BaseOsmAndFragment implements Route
}
});
- isShowSnapWarning = getArguments().getBoolean(SHOW_SNAP_WARNING);
initMeasurementMode(gpxData, savedInstanceState == null);
if (savedInstanceState == null) {
if (fileName != null) {
addNewGpxData(getGpxFile(fileName));
- } else if (editingCtx.isApproximationNeeded() && isFollowTrackMode()) {
+ } else if (editingCtx.isApproximationNeeded() && isFollowTrackMode() && showSnapWarning) {
enterApproximationMode(mapActivity);
}
} else {
@@ -673,6 +667,15 @@ public class MeasurementToolFragment extends BaseOsmAndFragment implements Route
this.fileName = fileName;
}
+
+ public boolean isShowSnapWarning() {
+ return this.showSnapWarning;
+ }
+
+ public void setShowSnapWarning(boolean showSnapWarning) {
+ this.showSnapWarning = showSnapWarning;
+ }
+
public MeasurementEditingContext getEditingCtx() {
return editingCtx;
}
@@ -1965,13 +1968,11 @@ public class MeasurementToolFragment extends BaseOsmAndFragment implements Route
}
public static boolean showInstance(FragmentManager fragmentManager, MeasurementEditingContext editingCtx,
- boolean followTrackMode, boolean isShowSnapWarning) {
+ boolean followTrackMode, boolean showSnapWarning) {
MeasurementToolFragment fragment = new MeasurementToolFragment();
fragment.setEditingCtx(editingCtx);
fragment.setMode(FOLLOW_TRACK_MODE, followTrackMode);
- Bundle bundle = new Bundle();
- bundle.putBoolean(SHOW_SNAP_WARNING, isShowSnapWarning);
- fragment.setArguments(bundle);
+ fragment.setShowSnapWarning(showSnapWarning);
return showFragment(fragment, fragmentManager);
}
@@ -2114,9 +2115,7 @@ public class MeasurementToolFragment extends BaseOsmAndFragment implements Route
manager.beginTransaction()
.hide(this).commit();
layer.setTapsDisabled(true);
- if (isShowSnapWarning) {
- SnapTrackWarningFragment.showInstance(mapActivity.getSupportFragmentManager(), this);
- }
+ SnapTrackWarningFragment.showInstance(mapActivity.getSupportFragmentManager(), this);
AndroidUiHelper.setVisibility(mapActivity, View.GONE, R.id.map_ruler_container);
}
}
@@ -2142,7 +2141,4 @@ public class MeasurementToolFragment extends BaseOsmAndFragment implements Route
void onUpdateInfo();
}
- public void restoreState(Bundle bundle) {
- isShowSnapWarning = bundle.getBoolean(SHOW_SNAP_WARNING);
- }
}
\ No newline at end of file
From fcd2eed6525258e036152f969d2fa062b9c9d14b Mon Sep 17 00:00:00 2001
From: Vitaliy
Date: Sun, 21 Mar 2021 17:25:58 +0200
Subject: [PATCH 049/103] Small fixes
---
.../measurementtool/MeasurementToolFragment.java | 2 +-
.../routepreparationmenu/FollowTrackFragment.java | 12 ++++++------
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java
index b59915ecdb..9e88c5689f 100644
--- a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java
+++ b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java
@@ -571,7 +571,7 @@ public class MeasurementToolFragment extends BaseOsmAndFragment implements Route
if (savedInstanceState == null) {
if (fileName != null) {
addNewGpxData(getGpxFile(fileName));
- } else if (editingCtx.isApproximationNeeded() && isFollowTrackMode() && showSnapWarning) {
+ } else if (editingCtx.isApproximationNeeded() && isFollowTrackMode() && isShowSnapWarning()) {
enterApproximationMode(mapActivity);
}
} else {
diff --git a/OsmAnd/src/net/osmand/plus/routepreparationmenu/FollowTrackFragment.java b/OsmAnd/src/net/osmand/plus/routepreparationmenu/FollowTrackFragment.java
index a5209eac18..8228fa6192 100644
--- a/OsmAnd/src/net/osmand/plus/routepreparationmenu/FollowTrackFragment.java
+++ b/OsmAnd/src/net/osmand/plus/routepreparationmenu/FollowTrackFragment.java
@@ -57,8 +57,8 @@ import net.osmand.plus.routepreparationmenu.cards.ReverseTrackCard;
import net.osmand.plus.routepreparationmenu.cards.SelectTrackCard;
import net.osmand.plus.routepreparationmenu.cards.TrackEditCard;
import net.osmand.plus.routepreparationmenu.cards.TracksToFollowCard;
-import net.osmand.plus.routing.IRouteInformationListener;
import net.osmand.plus.routing.GPXRouteParams.GPXRouteParamsBuilder;
+import net.osmand.plus.routing.IRouteInformationListener;
import net.osmand.plus.routing.RouteService;
import net.osmand.plus.routing.RoutingHelper;
import net.osmand.plus.settings.backend.ApplicationMode;
@@ -452,12 +452,12 @@ public class FollowTrackFragment extends ContextMenuScrollFragment implements Ca
} else if (card instanceof TrackEditCard) {
openPlanRoute(false);
close();
+ } else if (card instanceof SelectTrackCard) {
+ updateSelectionMode(true);
+ } else if (card instanceof ReverseTrackCard
+ || card instanceof NavigateTrackOptionsCard) {
+ updateMenu();
}
- } else if (card instanceof SelectTrackCard) {
- updateSelectionMode(true);
- } else if (card instanceof ReverseTrackCard
- || card instanceof NavigateTrackOptionsCard) {
- updateMenu();
}
}
From 170c70e42bc555daf3015c776123234db90086cf Mon Sep 17 00:00:00 2001
From: cepprice
Date: Sun, 21 Mar 2021 20:54:58 +0500
Subject: [PATCH 050/103] Refactor to optimize memory consumption and rendering
speed
---
.../views/layers/geometry/GpxGeometryWay.java | 26 ++++++++++++--
.../geometry/GpxGeometryWayContext.java | 15 ++++++++
.../layers/geometry/GpxGeometryWayDrawer.java | 34 ++++---------------
3 files changed, 45 insertions(+), 30 deletions(-)
diff --git a/OsmAnd/src/net/osmand/plus/views/layers/geometry/GpxGeometryWay.java b/OsmAnd/src/net/osmand/plus/views/layers/geometry/GpxGeometryWay.java
index 0e9b73dc82..c0fdf55930 100644
--- a/OsmAnd/src/net/osmand/plus/views/layers/geometry/GpxGeometryWay.java
+++ b/OsmAnd/src/net/osmand/plus/views/layers/geometry/GpxGeometryWay.java
@@ -77,18 +77,27 @@ public class GpxGeometryWay extends GeometryWay {
- private static final float TRACK_WIDTH_THRESHOLD = 8f;
+ private static final float TRACK_WIDTH_THRESHOLD_DP = 8f;
private static final float ARROW_DISTANCE_MULTIPLIER = 1.5f;
private static final float SPECIAL_ARROW_DISTANCE_MULTIPLIER = 10f;
+ private final float TRACK_WIDTH_THRESHOLD_PIX;
private Bitmap arrowBitmap;
+ public static final int OUTER_CIRCLE_COLOR = 0x33000000;
protected int pointColor;
protected int trackColor;
protected float trackWidth;
+ private float circleAngleOffset;
+ private float outerCircleRadius;
+ private float innerCircleRadius;
+
GeometryArrowsStyle(GpxGeometryWayContext context, int arrowColor, int trackColor, float trackWidth) {
this(context, null, arrowColor, trackColor, trackWidth);
+ circleAngleOffset = AndroidUtils.dpToPx(context.getCtx(), 1);
+ outerCircleRadius = AndroidUtils.dpToPx(context.getCtx(), 8);
+ innerCircleRadius = AndroidUtils.dpToPx(context.getCtx(), 7);
}
GeometryArrowsStyle(GpxGeometryWayContext context, Bitmap arrowBitmap, int arrowColor, int trackColor, float trackWidth) {
@@ -97,6 +106,7 @@ public class GpxGeometryWay extends GeometryWay style) {
super(x, y, angle, style);
- createCircleBitmap((GeometryArrowsStyle) style);
}
@Override
@@ -63,32 +59,14 @@ public class GpxGeometryWayDrawer extends GeometryWayDrawer
Date: Sun, 21 Mar 2021 18:06:57 +0200
Subject: [PATCH 051/103] Fix scroll to profile item
---
.../measurementtool/GpxApproximationFragment.java | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/OsmAnd/src/net/osmand/plus/measurementtool/GpxApproximationFragment.java b/OsmAnd/src/net/osmand/plus/measurementtool/GpxApproximationFragment.java
index 521034a430..a8e19d7141 100644
--- a/OsmAnd/src/net/osmand/plus/measurementtool/GpxApproximationFragment.java
+++ b/OsmAnd/src/net/osmand/plus/measurementtool/GpxApproximationFragment.java
@@ -8,6 +8,7 @@ import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
+import android.widget.ScrollView;
import androidx.activity.OnBackPressedCallback;
import androidx.annotation.NonNull;
@@ -21,7 +22,6 @@ import net.osmand.GPXUtilities.WptPt;
import net.osmand.LocationsHolder;
import net.osmand.PlatformUtil;
import net.osmand.ResultMatcher;
-import net.osmand.plus.LockableScrollView;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R;
import net.osmand.plus.UiUtilities;
@@ -176,13 +176,15 @@ public class GpxApproximationFragment extends ContextMenuScrollFragment
calculateGpxApproximation(true);
- final LockableScrollView profileView = mainView.findViewById(R.id.route_menu_bottom_scroll);
- final LinearLayout profileContainer = mainView.findViewById(R.id.route_menu_cards_container);
+ final ScrollView profileView = (ScrollView) getBottomScrollView();
profileView.postDelayed(new Runnable() {
@Override
public void run() {
- int selectedProfilePosition = profileContainer.getHeight() / ApplicationMode.values(getMyApplication()).size() * snapToRoadAppMode.getOrder();
- profileView.scrollTo(0, selectedProfilePosition);
+ View view = profileView.findViewWithTag(snapToRoadAppMode.getStringKey());
+ if (view != null) {
+ int headerHeight = getResources().getDimensionPixelSize(R.dimen.measurement_tool_button_height);
+ profileView.scrollTo(0, view.getTop() + headerHeight);
+ }
}
}, 100);
From e058dad69257b6e90c6d16050b75b1745072d719 Mon Sep 17 00:00:00 2001
From: cepprice
Date: Sun, 21 Mar 2021 21:57:59 +0500
Subject: [PATCH 052/103] Don't bias arrow's position
---
.../osmand/plus/views/layers/geometry/GpxGeometryWay.java | 6 ------
.../plus/views/layers/geometry/GpxGeometryWayDrawer.java | 3 ---
2 files changed, 9 deletions(-)
diff --git a/OsmAnd/src/net/osmand/plus/views/layers/geometry/GpxGeometryWay.java b/OsmAnd/src/net/osmand/plus/views/layers/geometry/GpxGeometryWay.java
index c0fdf55930..5ba26346a3 100644
--- a/OsmAnd/src/net/osmand/plus/views/layers/geometry/GpxGeometryWay.java
+++ b/OsmAnd/src/net/osmand/plus/views/layers/geometry/GpxGeometryWay.java
@@ -89,13 +89,11 @@ public class GpxGeometryWay extends GeometryWay
Date: Sun, 21 Mar 2021 20:52:57 +0200
Subject: [PATCH 053/103] Remove unnecessary changes and fix cards update
---
.../wikivoyage/explore/ExploreRvAdapter.java | 4 ++--
.../wikivoyage/explore/ExploreTabFragment.java | 17 ++++++++++++++---
.../explore/WikivoyageExploreActivity.java | 8 +++++++-
3 files changed, 23 insertions(+), 6 deletions(-)
diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreRvAdapter.java b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreRvAdapter.java
index becc599ced..6883aa2abd 100644
--- a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreRvAdapter.java
+++ b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreRvAdapter.java
@@ -158,8 +158,8 @@ public class ExploreRvAdapter extends RecyclerView.Adapter, List> res) {
ExploreTabFragment fragment = weakFragment.get();
- if (res != null && fragment != null && fragment.isResumed()) {
+ if (res != null && fragment != null && fragment.isAdded()) {
fragment.addIndexItemCards(res.first, res.second);
+ fragment.removeRedundantCards();
+ if (!fragment.isResumed()) {
+ fragment.invalidateAdapter();
+ }
}
}
}
diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/WikivoyageExploreActivity.java b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/WikivoyageExploreActivity.java
index 3bfa4b7a14..55f81ad441 100644
--- a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/WikivoyageExploreActivity.java
+++ b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/WikivoyageExploreActivity.java
@@ -373,7 +373,13 @@ public class WikivoyageExploreActivity extends TabActivity implements DownloadEv
@Override
public void savedArticlesUpdated() {
- updateFragments();
+ ExploreTabFragment exploreTabFragment = getExploreTabFragment();
+ SavedArticlesTabFragment savedArticlesTabFragment = getSavedArticlesTabFragment();
+ if (exploreTabFragment != null && savedArticlesTabFragment != null
+ && exploreTabFragment.isAdded() && savedArticlesTabFragment.isAdded()) {
+ exploreTabFragment.savedArticlesUpdated();
+ savedArticlesTabFragment.savedArticlesUpdated();
+ }
}
public static class LoadWikivoyageData extends AsyncTask {
From 490d42f3340a7e1cd9cfdffcdd1bcca4bb2ace0a Mon Sep 17 00:00:00 2001
From: Vitaliy
Date: Sun, 21 Mar 2021 23:17:16 +0200
Subject: [PATCH 054/103] Fix last view visibility
---
.../fragments/BaseSettingsListFragment.java | 21 +++++++++++++++++++
.../fragments/ExportSettingsAdapter.java | 7 -------
2 files changed, 21 insertions(+), 7 deletions(-)
diff --git a/OsmAnd/src/net/osmand/plus/settings/fragments/BaseSettingsListFragment.java b/OsmAnd/src/net/osmand/plus/settings/fragments/BaseSettingsListFragment.java
index 70cc3e95e0..6e2129deab 100644
--- a/OsmAnd/src/net/osmand/plus/settings/fragments/BaseSettingsListFragment.java
+++ b/OsmAnd/src/net/osmand/plus/settings/fragments/BaseSettingsListFragment.java
@@ -6,8 +6,10 @@ import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
+import android.widget.AbsListView;
import android.widget.ExpandableListView;
import android.widget.LinearLayout;
+import android.widget.ListView;
import androidx.activity.OnBackPressedCallback;
import androidx.annotation.NonNull;
@@ -18,6 +20,8 @@ import androidx.core.view.ViewCompat;
import androidx.fragment.app.FragmentActivity;
import androidx.fragment.app.FragmentManager;
+import com.github.ksoichiro.android.observablescrollview.ScrollUtils;
+
import net.osmand.AndroidUtils;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R;
@@ -129,6 +133,7 @@ public abstract class BaseSettingsListFragment extends BaseOsmAndFragment implem
adapter = new ExportSettingsAdapter(app, exportMode, this, nightMode);
adapter.updateSettingsItems(dataList, selectedItemsMap);
expandableList.setAdapter(adapter);
+ setupListView(expandableList);
updateAvailableSpace();
return root;
@@ -195,6 +200,22 @@ public abstract class BaseSettingsListFragment extends BaseOsmAndFragment implem
});
}
+ private void setupListView(@NonNull final ListView listView) {
+ if (listView.getFooterViewsCount() == 0) {
+ int padding = getResources().getDimensionPixelSize(R.dimen.toolbar_height_expanded);
+
+ View emptyView = new View(listView.getContext());
+ emptyView.setLayoutParams(new AbsListView.LayoutParams(AbsListView.LayoutParams.MATCH_PARENT, padding));
+ listView.addFooterView(emptyView);
+ ScrollUtils.addOnGlobalLayoutListener(listView, new Runnable() {
+ @Override
+ public void run() {
+ listView.requestLayout();
+ }
+ });
+ }
+ }
+
protected void updateAvailableSpace() {
long calculatedSize = ExportSettingsAdapter.calculateItemsSize(adapter.getData());
if (calculatedSize != 0) {
diff --git a/OsmAnd/src/net/osmand/plus/settings/fragments/ExportSettingsAdapter.java b/OsmAnd/src/net/osmand/plus/settings/fragments/ExportSettingsAdapter.java
index 634d317b05..360f786b77 100644
--- a/OsmAnd/src/net/osmand/plus/settings/fragments/ExportSettingsAdapter.java
+++ b/OsmAnd/src/net/osmand/plus/settings/fragments/ExportSettingsAdapter.java
@@ -58,7 +58,6 @@ public class ExportSettingsAdapter extends OsmandBaseExpandableListAdapter {
private final int secondaryColorRes;
private final int groupViewHeight;
private final int childViewHeight;
- private final int listBottomPadding;
ExportSettingsAdapter(OsmandApplication app, boolean exportMode, OnItemSelectedListener listener, boolean nightMode) {
this.app = app;
@@ -71,7 +70,6 @@ public class ExportSettingsAdapter extends OsmandBaseExpandableListAdapter {
secondaryColorRes = nightMode ? R.color.icon_color_secondary_dark : R.color.icon_color_secondary_light;
groupViewHeight = app.getResources().getDimensionPixelSize(R.dimen.setting_list_item_group_height);
childViewHeight = app.getResources().getDimensionPixelSize(R.dimen.setting_list_item_large_height);
- listBottomPadding = app.getResources().getDimensionPixelSize(R.dimen.fab_recycler_view_padding_bottom);
}
@Override
@@ -118,9 +116,6 @@ public class ExportSettingsAdapter extends OsmandBaseExpandableListAdapter {
}
});
- boolean addPadding = !isExpanded && groupPosition == getGroupCount() - 1;
- group.setPadding(0, 0, 0, addPadding ? listBottomPadding : 0);
-
adjustIndicator(app, groupPosition, isExpanded, group, nightMode);
AndroidUiHelper.updateVisibility(group.findViewById(R.id.divider), isExpanded);
AndroidUiHelper.updateVisibility(group.findViewById(R.id.card_top_divider), true);
@@ -188,8 +183,6 @@ public class ExportSettingsAdapter extends OsmandBaseExpandableListAdapter {
notifyDataSetChanged();
}
});
- boolean addPadding = isLastChild && groupPosition == getGroupCount() - 1;
- child.setPadding(0, 0, 0, addPadding ? listBottomPadding : 0);
AndroidUiHelper.updateVisibility(child.findViewById(R.id.card_bottom_divider), isLastChild);
return child;
From 83870f0f458092809450f713115564887ebb77e7 Mon Sep 17 00:00:00 2001
From: Vitaliy
Date: Mon, 22 Mar 2021 00:21:35 +0200
Subject: [PATCH 055/103] Fix unselected item icon color
---
.../SimpleBottomSheetItem.java | 2 +-
.../fragments/ExportItemsBottomSheet.java | 153 ++++++++++--------
2 files changed, 88 insertions(+), 67 deletions(-)
diff --git a/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/SimpleBottomSheetItem.java b/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/SimpleBottomSheetItem.java
index bb93494214..b1cdaa6963 100644
--- a/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/SimpleBottomSheetItem.java
+++ b/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/SimpleBottomSheetItem.java
@@ -49,7 +49,7 @@ public class SimpleBottomSheetItem extends BaseBottomSheetItem {
}
- public void setTitle(String title) {
+ public void setTitle(CharSequence title) {
this.title = title;
titleTv.setText(title);
}
diff --git a/OsmAnd/src/net/osmand/plus/settings/fragments/ExportItemsBottomSheet.java b/OsmAnd/src/net/osmand/plus/settings/fragments/ExportItemsBottomSheet.java
index 5bfed7996f..c3e318b35b 100644
--- a/OsmAnd/src/net/osmand/plus/settings/fragments/ExportItemsBottomSheet.java
+++ b/OsmAnd/src/net/osmand/plus/settings/fragments/ExportItemsBottomSheet.java
@@ -6,6 +6,13 @@ import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.core.content.ContextCompat;
+import androidx.core.widget.CompoundButtonCompat;
+import androidx.fragment.app.Fragment;
+import androidx.fragment.app.FragmentManager;
+
import net.osmand.AndroidUtils;
import net.osmand.GPXUtilities.GPXTrackAnalysis;
import net.osmand.IndexConstants;
@@ -61,13 +68,6 @@ import java.io.File;
import java.util.ArrayList;
import java.util.List;
-import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
-import androidx.core.content.ContextCompat;
-import androidx.core.widget.CompoundButtonCompat;
-import androidx.fragment.app.Fragment;
-import androidx.fragment.app.FragmentManager;
-
import static net.osmand.view.ThreeStateCheckbox.State.CHECKED;
import static net.osmand.view.ThreeStateCheckbox.State.MISC;
import static net.osmand.view.ThreeStateCheckbox.State.UNCHECKED;
@@ -142,15 +142,21 @@ public class ExportItemsBottomSheet extends MenuBottomSheetDialogFragment {
selectedItems.remove(item[0].getTag());
}
updateTitleView();
+ setupBottomSheetItem(item[0], item[0].getTag());
}
})
.setTag(object);
- setupBottomSheetItem(builder, object);
item[0] = builder.create();
items.add(item[0]);
}
}
+ @Override
+ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
+ super.onViewCreated(view, savedInstanceState);
+ updateItems();
+ }
+
@Override
public void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
@@ -177,7 +183,7 @@ public class ExportItemsBottomSheet extends MenuBottomSheetDialogFragment {
selectedItems.clear();
}
updateTitleView();
- updateItems(checked);
+ updateItems();
}
});
setupDescription(view);
@@ -221,10 +227,12 @@ public class ExportItemsBottomSheet extends MenuBottomSheetDialogFragment {
return itemsSize;
}
- private void updateItems(boolean checked) {
+ private void updateItems() {
for (BaseBottomSheetItem item : items) {
- if (item instanceof BottomSheetItemWithCompoundButton) {
- ((BottomSheetItemWithCompoundButton) item).setChecked(checked);
+ if (item instanceof BottomSheetItemWithCompoundButton && item.getTag() != null) {
+ BottomSheetItemWithCompoundButton bottomSheetItem = (BottomSheetItemWithCompoundButton) item;
+ setupBottomSheetItem(bottomSheetItem, item.getTag());
+ bottomSheetItem.setChecked(selectedItems.contains(item.getTag()));
}
}
}
@@ -274,7 +282,7 @@ public class ExportItemsBottomSheet extends MenuBottomSheetDialogFragment {
return null;
}
- private void setupBottomSheetItem(Builder builder, Object object) {
+ private void setupBottomSheetItem(BottomSheetItemWithCompoundButton item, Object object) {
if (object instanceof ApplicationModeBean) {
ApplicationModeBean modeBean = (ApplicationModeBean) object;
String profileName = modeBean.userProfileName;
@@ -286,7 +294,7 @@ public class ExportItemsBottomSheet extends MenuBottomSheetDialogFragment {
profileName = StringUtils.capitalize(modeBean.stringKey);
}
}
- builder.setTitle(profileName);
+ item.setTitle(profileName);
String routingProfile = "";
String routingProfileValue = modeBean.routingProfile;
@@ -300,122 +308,135 @@ public class ExportItemsBottomSheet extends MenuBottomSheetDialogFragment {
}
}
if (!Algorithms.isEmpty(routingProfile)) {
- builder.setDescription(getString(R.string.ltr_or_rtl_combine_via_colon, getString(R.string.nav_type_hint), routingProfile));
+ item.setDescription(getString(R.string.ltr_or_rtl_combine_via_colon, getString(R.string.nav_type_hint), routingProfile));
} else {
- builder.setDescription(getString(R.string.profile_type_osmand_string));
+ item.setDescription(getString(R.string.profile_type_osmand_string));
}
int profileIconRes = AndroidUtils.getDrawableId(app, modeBean.iconName);
ProfileIconColors iconColor = modeBean.iconColor;
Integer customIconColor = modeBean.customIconColor;
- int actualIconColor = customIconColor != null ?
- customIconColor : ContextCompat.getColor(app, iconColor.getColor(nightMode));
- builder.setIcon(uiUtilities.getPaintedIcon(profileIconRes, actualIconColor));
+ int actualIconColor;
+ if (selectedItems.contains(object)) {
+ actualIconColor = customIconColor != null ? customIconColor : ContextCompat.getColor(app, iconColor.getColor(nightMode));
+ } else {
+ actualIconColor = ContextCompat.getColor(app, secondaryColorRes);
+ }
+ item.setIcon(uiUtilities.getPaintedIcon(profileIconRes, actualIconColor));
} else if (object instanceof QuickAction) {
QuickAction quickAction = (QuickAction) object;
- builder.setTitle(quickAction.getName(app));
- builder.setIcon(uiUtilities.getIcon(quickAction.getIconRes(), activeColorRes));
+ item.setTitle(quickAction.getName(app));
+ item.setIcon(uiUtilities.getIcon(quickAction.getIconRes(), getItemIconColor(object)));
} else if (object instanceof PoiUIFilter) {
PoiUIFilter poiUIFilter = (PoiUIFilter) object;
- builder.setTitle(poiUIFilter.getName());
+ item.setTitle(poiUIFilter.getName());
int iconRes = RenderingIcons.getBigIconResourceId(poiUIFilter.getIconId());
- builder.setIcon(uiUtilities.getIcon(iconRes != 0 ? iconRes : R.drawable.ic_action_user, activeColorRes));
+ item.setIcon(uiUtilities.getIcon(iconRes != 0 ? iconRes : R.drawable.ic_action_user, activeColorRes));
} else if (object instanceof TileSourceTemplate || object instanceof SQLiteTileSource) {
ITileSource tileSource = (ITileSource) object;
- builder.setTitle(tileSource.getName());
- builder.setIcon(uiUtilities.getIcon(R.drawable.ic_map, activeColorRes));
+ item.setTitle(tileSource.getName());
+ item.setIcon(uiUtilities.getIcon(R.drawable.ic_map, getItemIconColor(object)));
} else if (object instanceof File) {
- setupBottomSheetItemForFile(builder, (File) object);
+ setupBottomSheetItemForFile(item, (File) object);
} else if (object instanceof GpxSettingsItem) {
- GpxSettingsItem item = (GpxSettingsItem) object;
- setupBottomSheetItemForGpx(builder, item.getFile(), item.getAppearanceInfo());
+ GpxSettingsItem settingsItem = (GpxSettingsItem) object;
+ setupBottomSheetItemForGpx(item, settingsItem.getFile(), settingsItem.getAppearanceInfo());
} else if (object instanceof FileSettingsItem) {
- FileSettingsItem item = (FileSettingsItem) object;
- setupBottomSheetItemForFile(builder, item.getFile());
+ FileSettingsItem settingsItem = (FileSettingsItem) object;
+ setupBottomSheetItemForFile(item, settingsItem.getFile());
} else if (object instanceof AvoidRoadInfo) {
AvoidRoadInfo avoidRoadInfo = (AvoidRoadInfo) object;
- builder.setTitle(avoidRoadInfo.name);
- builder.setIcon(uiUtilities.getIcon(R.drawable.ic_action_alert, activeColorRes));
+ item.setTitle(avoidRoadInfo.name);
+ item.setIcon(uiUtilities.getIcon(R.drawable.ic_action_alert, getItemIconColor(object)));
} else if (object instanceof OsmNotesPoint) {
OsmNotesPoint osmNotesPoint = (OsmNotesPoint) object;
- builder.setTitle(osmNotesPoint.getText());
- builder.setIcon(uiUtilities.getIcon(R.drawable.ic_action_osm_note_add, activeColorRes));
+ item.setTitle(osmNotesPoint.getText());
+ item.setIcon(uiUtilities.getIcon(R.drawable.ic_action_osm_note_add, getItemIconColor(object)));
} else if (object instanceof OpenstreetmapPoint) {
OpenstreetmapPoint openstreetmapPoint = (OpenstreetmapPoint) object;
- builder.setTitle(OsmEditingPlugin.getTitle(openstreetmapPoint, app));
- builder.setIcon(uiUtilities.getIcon(R.drawable.ic_action_info_dark, activeColorRes));
+ item.setTitle(OsmEditingPlugin.getTitle(openstreetmapPoint, app));
+ item.setIcon(uiUtilities.getIcon(R.drawable.ic_action_info_dark, getItemIconColor(object)));
} else if (object instanceof FavoriteGroup) {
FavoriteGroup group = (FavoriteGroup) object;
- builder.setTitle(group.getDisplayName(app));
- int color = group.getColor() == 0 ? ContextCompat.getColor(app, R.color.color_favorite) : group.getColor();
- builder.setIcon(uiUtilities.getPaintedIcon(R.drawable.ic_action_folder, color));
+ item.setTitle(group.getDisplayName(app));
+ int color;
+ if (selectedItems.contains(object)) {
+ color = group.getColor() == 0 ? ContextCompat.getColor(app, R.color.color_favorite) : group.getColor();
+ } else {
+ color = ContextCompat.getColor(app, secondaryColorRes);
+ }
+ item.setIcon(uiUtilities.getPaintedIcon(R.drawable.ic_action_folder, color));
int points = group.getPoints().size();
String itemsDescr = getString(R.string.shared_string_gpx_points);
- builder.setDescription(getString(R.string.ltr_or_rtl_combine_via_colon, itemsDescr, points));
+ item.setDescription(getString(R.string.ltr_or_rtl_combine_via_colon, itemsDescr, points));
} else if (object instanceof GlobalSettingsItem) {
GlobalSettingsItem globalSettingsItem = (GlobalSettingsItem) object;
- builder.setTitle(globalSettingsItem.getPublicName(app));
- builder.setIcon(uiUtilities.getIcon(R.drawable.ic_action_settings, activeColorRes));
+ item.setTitle(globalSettingsItem.getPublicName(app));
+ item.setIcon(uiUtilities.getIcon(R.drawable.ic_action_settings, getItemIconColor(object)));
} else if (object instanceof ItineraryGroup) {
ItineraryGroup markersGroup = (ItineraryGroup) object;
if (ExportSettingsType.ACTIVE_MARKERS.name().equals(markersGroup.getId())) {
- builder.setTitle(getString(R.string.map_markers));
- builder.setIcon(uiUtilities.getIcon(R.drawable.ic_action_flag, activeColorRes));
+ item.setTitle(getString(R.string.map_markers));
+ item.setIcon(uiUtilities.getIcon(R.drawable.ic_action_flag, getItemIconColor(object)));
} else if (ExportSettingsType.HISTORY_MARKERS.name().equals(markersGroup.getId())) {
- builder.setTitle(getString(R.string.markers_history));
- builder.setIcon(uiUtilities.getIcon(R.drawable.ic_action_history, activeColorRes));
+ item.setTitle(getString(R.string.markers_history));
+ item.setIcon(uiUtilities.getIcon(R.drawable.ic_action_history, getItemIconColor(object)));
}
int selectedMarkers = markersGroup.getMarkers().size();
String itemsDescr = getString(R.string.shared_string_items);
- builder.setDescription(getString(R.string.ltr_or_rtl_combine_via_colon, itemsDescr, selectedMarkers));
+ item.setDescription(getString(R.string.ltr_or_rtl_combine_via_colon, itemsDescr, selectedMarkers));
} else if (object instanceof HistoryEntry) {
HistoryEntry historyEntry = (HistoryEntry) object;
- builder.setTitle(historyEntry.getName().getName());
- builder.setIcon(uiUtilities.getIcon(R.drawable.ic_action_history, activeColorRes));
+ item.setTitle(historyEntry.getName().getName());
+ item.setIcon(uiUtilities.getIcon(R.drawable.ic_action_history, getItemIconColor(object)));
} else if (object instanceof OnlineRoutingEngine) {
OnlineRoutingEngine onlineRoutingEngine = (OnlineRoutingEngine) object;
- builder.setTitle(onlineRoutingEngine.getName(app));
- builder.setIcon(uiUtilities.getIcon(R.drawable.ic_world_globe_dark, activeColorRes));
+ item.setTitle(onlineRoutingEngine.getName(app));
+ item.setIcon(uiUtilities.getIcon(R.drawable.ic_world_globe_dark, getItemIconColor(object)));
}
}
- private void setupBottomSheetItemForFile(Builder builder, File file) {
+ private void setupBottomSheetItemForFile(BottomSheetItemWithCompoundButton item, File file) {
FileSubtype fileSubtype = FileSubtype.getSubtypeByPath(app, file.getPath());
- builder.setTitle(file.getName());
+ item.setTitle(file.getName());
if (file.getAbsolutePath().contains(IndexConstants.RENDERERS_DIR)) {
- builder.setIcon(uiUtilities.getIcon(R.drawable.ic_action_map_style, activeColorRes));
+ item.setIcon(uiUtilities.getIcon(R.drawable.ic_action_map_style, getItemIconColor(item.getTag())));
} else if (file.getAbsolutePath().contains(IndexConstants.ROUTING_PROFILES_DIR)) {
- builder.setIcon(uiUtilities.getIcon(R.drawable.ic_action_route_distance, activeColorRes));
+ item.setIcon(uiUtilities.getIcon(R.drawable.ic_action_route_distance, getItemIconColor(item.getTag())));
} else if (file.getAbsolutePath().contains(IndexConstants.GPX_INDEX_DIR)) {
- setupBottomSheetItemForGpx(builder, file, null);
+ setupBottomSheetItemForGpx(item, file, null);
} else if (file.getAbsolutePath().contains(IndexConstants.AV_INDEX_DIR)) {
int iconId = AudioVideoNotesPlugin.getIconIdForRecordingFile(file);
if (iconId == -1) {
iconId = R.drawable.ic_action_photo_dark;
}
- builder.setIcon(uiUtilities.getIcon(iconId, activeColorRes));
- builder.setDescription(AndroidUtils.formatSize(app, file.length()));
+ item.setIcon(uiUtilities.getIcon(iconId, getItemIconColor(item.getTag())));
+ item.setDescription(AndroidUtils.formatSize(app, file.length()));
} else if (fileSubtype.isMap()
|| fileSubtype == FileSettingsItem.FileSubtype.TTS_VOICE
|| fileSubtype == FileSettingsItem.FileSubtype.VOICE) {
- builder.setTitle(FileNameTranslationHelper.getFileNameWithRegion(app, file.getName()));
- builder.setIcon(uiUtilities.getIcon(fileSubtype.getIconId(), activeColorRes));
+ item.setTitle(FileNameTranslationHelper.getFileNameWithRegion(app, file.getName()));
+ item.setIcon(uiUtilities.getIcon(fileSubtype.getIconId(), getItemIconColor(item.getTag())));
if (fileSubtype.isMap()) {
String mapDescription = getMapDescription(file);
String formattedSize = AndroidUtils.formatSize(app, file.length());
if (mapDescription != null) {
- builder.setDescription(getString(R.string.ltr_or_rtl_combine_via_bold_point, mapDescription, formattedSize));
+ item.setDescription(getString(R.string.ltr_or_rtl_combine_via_bold_point, mapDescription, formattedSize));
} else {
- builder.setDescription(formattedSize);
+ item.setDescription(formattedSize);
}
}
}
}
- private void setupBottomSheetItemForGpx(Builder builder, File file, @Nullable GpxAppearanceInfo appearanceInfo) {
- builder.setTitle(GpxUiHelper.getGpxTitle(file.getName()));
- builder.setDescription(getTrackDescr(file, file.lastModified(), file.length(), appearanceInfo));
- builder.setIcon(uiUtilities.getIcon(R.drawable.ic_action_route_distance, activeColorRes));
+ private void setupBottomSheetItemForGpx(BottomSheetItemWithCompoundButton item, File file, @Nullable GpxAppearanceInfo appearanceInfo) {
+ item.setTitle(GpxUiHelper.getGpxTitle(file.getName()));
+ item.setDescription(getTrackDescr(file, file.lastModified(), file.length(), appearanceInfo));
+ item.setIcon(uiUtilities.getIcon(R.drawable.ic_action_route_distance, getItemIconColor(item.getTag())));
+ }
+
+ private int getItemIconColor(Object object) {
+ return selectedItems.contains(object) ? activeColorRes : secondaryColorRes;
}
private final GpxDataItemCallback gpxDataItemCallback = new GpxDataItemCallback() {
From 913e125968cb1cd9195eb7f3a9b38849ed670eb5 Mon Sep 17 00:00:00 2001
From: Skalii
Date: Mon, 22 Mar 2021 04:40:26 +0200
Subject: [PATCH 056/103] add static graphs
---
OsmAnd/res/layout/gpx_item_altitude.xml | 1 +
OsmAnd/res/layout/gpx_item_general.xml | 1 +
OsmAnd/res/layout/gpx_item_speed.xml | 1 +
.../res/layout/gpx_list_item_tab_content.xml | 4 +-
OsmAnd/res/layout/trip_recording_fragment.xml | 8 +-
.../TripRecordingBottomFragment.java | 142 ++++++++-
.../plus/myplaces/GPXItemPagerAdapter.java | 289 +++++++++++-------
.../plus/track/GpxBlockStatisticsBuilder.java | 252 +++++++++++----
.../net/osmand/plus/track/OverviewCard.java | 4 +-
.../views/controls/PagerSlidingTabStrip.java | 16 +-
10 files changed, 522 insertions(+), 196 deletions(-)
diff --git a/OsmAnd/res/layout/gpx_item_altitude.xml b/OsmAnd/res/layout/gpx_item_altitude.xml
index 9dd2037878..699e6812ea 100644
--- a/OsmAnd/res/layout/gpx_item_altitude.xml
+++ b/OsmAnd/res/layout/gpx_item_altitude.xml
@@ -273,6 +273,7 @@
diff --git a/OsmAnd/res/layout/gpx_item_general.xml b/OsmAnd/res/layout/gpx_item_general.xml
index 962bbbe9f5..fe90a5c031 100644
--- a/OsmAnd/res/layout/gpx_item_general.xml
+++ b/OsmAnd/res/layout/gpx_item_general.xml
@@ -291,6 +291,7 @@
diff --git a/OsmAnd/res/layout/gpx_item_speed.xml b/OsmAnd/res/layout/gpx_item_speed.xml
index d5bc1d3edb..785c8109ef 100644
--- a/OsmAnd/res/layout/gpx_item_speed.xml
+++ b/OsmAnd/res/layout/gpx_item_speed.xml
@@ -275,6 +275,7 @@
diff --git a/OsmAnd/res/layout/gpx_list_item_tab_content.xml b/OsmAnd/res/layout/gpx_list_item_tab_content.xml
index ac7918d06a..5fa3d3ab29 100644
--- a/OsmAnd/res/layout/gpx_list_item_tab_content.xml
+++ b/OsmAnd/res/layout/gpx_list_item_tab_content.xml
@@ -4,7 +4,9 @@
android:layout_height="wrap_content"
android:orientation="vertical">
-
+
+ android:layout_marginBottom="@dimen/context_menu_padding_margin_small" />
+
+
0) {
- DateFormat tf = SimpleDateFormat.getTimeInstance(DateFormat.SHORT);
- DateFormat df = SimpleDateFormat.getDateInstance(DateFormat.MEDIUM);
+ });
+ if (analysis.timeSpan > 0) {
+ DateFormat tf = SimpleDateFormat.getTimeInstance(DateFormat.SHORT);
+ DateFormat df = SimpleDateFormat.getDateInstance(DateFormat.MEDIUM);
- Date start = new Date(analysis.startTime);
- ((TextView) view.findViewById(R.id.start_time_text)).setText(tf.format(start));
- ((TextView) view.findViewById(R.id.start_date_text)).setText(df.format(start));
- Date end = new Date(analysis.endTime);
- ((TextView) view.findViewById(R.id.end_time_text)).setText(tf.format(end));
- ((TextView) view.findViewById(R.id.end_date_text)).setText(df.format(end));
- } else {
- view.findViewById(R.id.list_divider).setVisibility(View.GONE);
- view.findViewById(R.id.start_end_time).setVisibility(View.GONE);
+ Date start = new Date(analysis.startTime);
+ ((TextView) view.findViewById(R.id.start_time_text)).setText(tf.format(start));
+ ((TextView) view.findViewById(R.id.start_date_text)).setText(df.format(start));
+ Date end = new Date(analysis.endTime);
+ ((TextView) view.findViewById(R.id.end_time_text)).setText(tf.format(end));
+ ((TextView) view.findViewById(R.id.end_date_text)).setText(df.format(end));
+ } else {
+ view.findViewById(R.id.list_divider).setVisibility(View.GONE);
+ view.findViewById(R.id.start_end_time).setVisibility(View.GONE);
+ }
}
} else {
chart.setVisibility(View.GONE);
@@ -412,17 +463,19 @@ public class GPXItemPagerAdapter extends PagerAdapter implements CustomTabProvid
view.findViewById(R.id.start_end_time).setVisibility(View.GONE);
}
updateJoinGapsInfo(view, position);
- view.findViewById(R.id.analyze_on_map).setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- openAnalyzeOnMap(GPXTabItemType.GPX_TAB_ITEM_GENERAL);
+ if (!onlyGraphs) {
+ view.findViewById(R.id.analyze_on_map).setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ openAnalyzeOnMap(GPXTabItemType.GPX_TAB_ITEM_GENERAL);
+ }
+ });
+ TextView overflowMenu = view.findViewById(R.id.overflow_menu);
+ if (!gpxItem.group.getTrack().generalTrack) {
+ setupOptionsPopupMenu(overflowMenu, true);
+ } else {
+ overflowMenu.setVisibility(View.GONE);
}
- });
- TextView overflowMenu = view.findViewById(R.id.overflow_menu);
- if (!gpxItem.group.getTrack().generalTrack) {
- setupOptionsPopupMenu(overflowMenu, true);
- } else {
- overflowMenu.setVisibility(View.GONE);
}
}
@@ -598,7 +651,7 @@ public class GPXItemPagerAdapter extends PagerAdapter implements CustomTabProvid
@Override
public void tabStylesUpdated(View tabsContainer, int currentPosition) {
ViewGroup.MarginLayoutParams params = (MarginLayoutParams) tabsContainer.getLayoutParams();
- params.height = app.getResources().getDimensionPixelSize(R.dimen.dialog_button_height);
+ params.height = app.getResources().getDimensionPixelSize(!onlyGraphs ? R.dimen.dialog_button_height : R.dimen.context_menu_buttons_bottom_height);
tabsContainer.setLayoutParams(params);
UiUtilities.updateCustomRadioButtons(app, tabsContainer, nightMode, getCustomRadioButtonType(currentPosition));
}
diff --git a/OsmAnd/src/net/osmand/plus/track/GpxBlockStatisticsBuilder.java b/OsmAnd/src/net/osmand/plus/track/GpxBlockStatisticsBuilder.java
index 09adb88117..1670562eee 100644
--- a/OsmAnd/src/net/osmand/plus/track/GpxBlockStatisticsBuilder.java
+++ b/OsmAnd/src/net/osmand/plus/track/GpxBlockStatisticsBuilder.java
@@ -14,6 +14,7 @@ import androidx.annotation.DrawableRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.widget.AppCompatImageView;
+import androidx.core.content.ContextCompat;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
@@ -35,30 +36,44 @@ import net.osmand.util.Algorithms;
import org.apache.commons.logging.Log;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Date;
import java.util.List;
+import static net.osmand.plus.liveupdates.LiveUpdatesFragmentNew.getDefaultIconColorId;
+
public class GpxBlockStatisticsBuilder {
- private static final Log log = PlatformUtil.getLog(GpxBlockStatisticsBuilder.class);
- private static final int GENERAL_UPDATE_INTERVAL = 1000;
+ private static final Log LOG = PlatformUtil.getLog(GpxBlockStatisticsBuilder.class);
+ private static final int BLOCKS_UPDATE_INTERVAL = 1000;
+ public static final String INIT_BLOCKS_BASE = "init_blocks_base";
+ public static final String INIT_BLOCKS_GENERAL = "init_blocks_general";
+ public static final String INIT_BLOCKS_ALTITUDE = "init_blocks_altitude";
+ public static final String INIT_BLOCKS_SPEED = "init_blocks_speed";
private final OsmandApplication app;
+ private final boolean nightMode;
+
private RecyclerView blocksView;
private final SelectedGpxFile selectedGpxFile;
+ private GPXTrackAnalysis analysis;
private BlockStatisticsAdapter adapter;
private final List items = new ArrayList<>();
private boolean blocksClickable = true;
+ private String initBlocksKey = INIT_BLOCKS_BASE;
private final Handler handler = new Handler();
private Runnable updatingItems;
private boolean updateRunning = false;
- public GpxBlockStatisticsBuilder(OsmandApplication app, SelectedGpxFile selectedGpxFile) {
+ public GpxBlockStatisticsBuilder(OsmandApplication app, SelectedGpxFile selectedGpxFile, boolean nightMode) {
this.app = app;
this.selectedGpxFile = selectedGpxFile;
+ this.nightMode = nightMode;
}
public boolean isUpdateRunning() {
@@ -73,6 +88,10 @@ public class GpxBlockStatisticsBuilder {
this.blocksView = blocksView;
}
+ public void setInitBlocksKey(String initBlocksKey) {
+ this.initBlocksKey = initBlocksKey;
+ }
+
@Nullable
public GpxDisplayItem getDisplayItem(GPXFile gpxFile) {
return gpxFile.tracks.size() > 0 ? GpxUiHelper.makeGpxDisplayItem(app, gpxFile) : null;
@@ -82,9 +101,9 @@ public class GpxBlockStatisticsBuilder {
return selectedGpxFile.getGpxFile();
}
- public void initStatBlocks(@Nullable SegmentActionsListener actionsListener, @ColorInt int activeColor, boolean nightMode) {
+ public void initStatBlocks(@Nullable SegmentActionsListener actionsListener, @ColorInt int activeColor) {
initItems();
- adapter = new BlockStatisticsAdapter(getDisplayItem(getGPXFile()), actionsListener, activeColor, nightMode);
+ adapter = new BlockStatisticsAdapter(getDisplayItem(getGPXFile()), actionsListener, activeColor);
adapter.setItems(items);
blocksView.setLayoutManager(new LinearLayoutManager(app, LinearLayoutManager.HORIZONTAL, false));
blocksView.setAdapter(adapter);
@@ -107,7 +126,7 @@ public class GpxBlockStatisticsBuilder {
}
AndroidUiHelper.updateVisibility(blocksView, !Algorithms.isEmpty(items));
int interval = app.getSettings().SAVE_GLOBAL_TRACK_INTERVAL.get();
- updateRunning = handler.postDelayed(this, Math.max(GENERAL_UPDATE_INTERVAL, interval));
+ updateRunning = handler.postDelayed(this, Math.max(BLOCKS_UPDATE_INTERVAL, interval));
}
};
updateRunning = handler.post(updatingItems);
@@ -117,65 +136,187 @@ public class GpxBlockStatisticsBuilder {
public void initItems() {
GPXFile gpxFile = getGPXFile();
GpxDisplayItem gpxDisplayItem = getDisplayItem(gpxFile);
- GPXTrackAnalysis analysis = null;
boolean withoutGaps = true;
if (gpxDisplayItem != null) {
analysis = gpxDisplayItem.analysis;
withoutGaps = !selectedGpxFile.isJoinSegments() && gpxDisplayItem.isGeneralTrack();
}
if (analysis != null) {
- float totalDistance = withoutGaps ? analysis.totalDistanceWithoutGaps : analysis.totalDistance;
- float timeSpan = withoutGaps ? analysis.timeSpanWithoutGaps : analysis.timeSpan;
- String asc = OsmAndFormatter.getFormattedAlt(analysis.diffElevationUp, app);
- String desc = OsmAndFormatter.getFormattedAlt(analysis.diffElevationDown, app);
- String avg = OsmAndFormatter.getFormattedSpeed(analysis.avgSpeed, app);
- String max = OsmAndFormatter.getFormattedSpeed(analysis.maxSpeed, app);
-
items.clear();
- prepareData(analysis, app.getString(R.string.distance), OsmAndFormatter.getFormattedDistance(totalDistance, app),
- R.drawable.ic_action_track_16, R.color.icon_color_default_light, GPXDataSetType.ALTITUDE, GPXDataSetType.SPEED, ItemType.ITEM_DISTANCE);
- prepareData(analysis, app.getString(R.string.altitude_ascent), asc,
- R.drawable.ic_action_arrow_up_16, R.color.gpx_chart_red, GPXDataSetType.SLOPE, null, ItemType.ITEM_ALTITUDE);
- prepareData(analysis, app.getString(R.string.altitude_descent), desc,
- R.drawable.ic_action_arrow_down_16, R.color.gpx_pale_green, GPXDataSetType.ALTITUDE, GPXDataSetType.SLOPE, ItemType.ITEM_ALTITUDE);
- prepareData(analysis, app.getString(R.string.average_speed), avg,
- R.drawable.ic_action_speed_16, R.color.icon_color_default_light, GPXDataSetType.SPEED, null, ItemType.ITEM_SPEED);
- prepareData(analysis, app.getString(R.string.max_speed), max,
- R.drawable.ic_action_max_speed_16, R.color.icon_color_default_light, GPXDataSetType.SPEED, null, ItemType.ITEM_SPEED);
- prepareData(analysis, app.getString(R.string.shared_string_time_span),
- Algorithms.formatDuration((int) (timeSpan / 1000), app.accessibilityEnabled()),
- R.drawable.ic_action_time_span_16, R.color.icon_color_default_light, GPXDataSetType.SPEED, null, ItemType.ITEM_TIME);
+ switch (initBlocksKey) {
+ case INIT_BLOCKS_GENERAL: {
+ float totalDistance = withoutGaps ? analysis.totalDistanceWithoutGaps : analysis.totalDistance;
+ float timeSpan = withoutGaps ? analysis.timeSpanWithoutGaps : analysis.timeSpan;
+ Date start = new Date(analysis.startTime);
+ Date end = new Date(analysis.endTime);
+ prepareDataDistance(totalDistance);
+ prepareDataTimeSpan(timeSpan);
+ prepareDataStartTime(start);
+ prepareDataEndTime(end);
+ break;
+ }
+ case INIT_BLOCKS_ALTITUDE: {
+ String min = OsmAndFormatter.getFormattedAlt(analysis.minElevation, app);
+ String max = OsmAndFormatter.getFormattedAlt(analysis.maxElevation, app);
+ String asc = OsmAndFormatter.getFormattedAlt(analysis.diffElevationUp, app);
+ String desc = OsmAndFormatter.getFormattedAlt(analysis.diffElevationDown, app);
+ prepareDataAverageAltitude();
+ prepareDataAltitudeRange(min, max);
+ prepareDataAscent(asc);
+ prepareDataDescent(desc);
+ break;
+ }
+ case INIT_BLOCKS_SPEED: {
+ String avg = OsmAndFormatter.getFormattedSpeed(analysis.avgSpeed, app);
+ String max = OsmAndFormatter.getFormattedSpeed(analysis.maxSpeed, app);
+ long timeMoving = withoutGaps ? analysis.timeMovingWithoutGaps : analysis.timeMoving;
+ float totalDistanceMoving = withoutGaps ? analysis.totalDistanceMovingWithoutGaps : analysis.totalDistanceMoving;
+ prepareDataAverageSpeed(avg);
+ prepareDataMaximumSpeed(max);
+ prepareDataTimeMoving(timeMoving);
+ prepareDataDistanceCorrected(totalDistanceMoving);
+ break;
+ }
+ default:
+ case INIT_BLOCKS_BASE: {
+ float totalDistance = withoutGaps ? analysis.totalDistanceWithoutGaps : analysis.totalDistance;
+ String asc = OsmAndFormatter.getFormattedAlt(analysis.diffElevationUp, app);
+ String desc = OsmAndFormatter.getFormattedAlt(analysis.diffElevationDown, app);
+ String avg = OsmAndFormatter.getFormattedSpeed(analysis.avgSpeed, app);
+ String max = OsmAndFormatter.getFormattedSpeed(analysis.maxSpeed, app);
+ float timeSpan = withoutGaps ? analysis.timeSpanWithoutGaps : analysis.timeSpan;
+ prepareDataDistance(totalDistance);
+ prepareDataAscent(asc);
+ prepareDataDescent(desc);
+ prepareDataAverageSpeed(avg);
+ prepareDataMaximumSpeed(max);
+ prepareDataTimeSpan(timeSpan);
+ break;
+ }
+ }
}
}
- public void prepareData(GPXTrackAnalysis analysis, String title, String value,
- @DrawableRes int imageResId, @ColorRes int imageColorId,
+ public void prepareDataDistance(float totalDistance) {
+ prepareData(app.getString(R.string.distance), OsmAndFormatter.getFormattedDistance(totalDistance, app),
+ R.drawable.ic_action_track_16, GPXDataSetType.ALTITUDE, GPXDataSetType.SPEED, ItemType.ITEM_DISTANCE);
+ }
+
+ public void prepareDataAverageAltitude() {
+ prepareData(app.getString(R.string.average_altitude), OsmAndFormatter.getFormattedAlt(analysis.avgElevation, app),
+ R.drawable.ic_action_altitude_average_16, GPXDataSetType.ALTITUDE, null, ItemType.ITEM_ALTITUDE);
+ }
+
+ public void prepareDataAltitudeRange(String min, String max) {
+ String pattern = app.getString(R.string.ltr_or_rtl_combine_via_dash);
+ prepareData(app.getString(R.string.altitude_range), String.format(pattern, min, max),
+ R.drawable.ic_action_altitude_range_16, GPXDataSetType.ALTITUDE, null, ItemType.ITEM_ALTITUDE);
+ }
+
+ public void prepareDataAscent(String asc) {
+ prepareData(app.getString(R.string.altitude_ascent), asc,
+ R.drawable.ic_action_arrow_up_16, R.color.gpx_chart_red,
+ GPXDataSetType.SLOPE, null, ItemType.ITEM_ALTITUDE);
+ }
+
+ public void prepareDataDescent(String desc) {
+ prepareData(app.getString(R.string.altitude_descent), desc,
+ R.drawable.ic_action_arrow_down_16, R.color.gpx_pale_green,
+ GPXDataSetType.ALTITUDE, GPXDataSetType.SLOPE, ItemType.ITEM_ALTITUDE);
+ }
+
+ public void prepareDataAverageSpeed(String avg) {
+ prepareData(app.getString(R.string.average_speed), avg,
+ R.drawable.ic_action_speed_16, GPXDataSetType.SPEED, null, ItemType.ITEM_SPEED);
+ }
+
+ public void prepareDataMaximumSpeed(String max) {
+ prepareData(app.getString(R.string.max_speed), max,
+ R.drawable.ic_action_max_speed_16, GPXDataSetType.SPEED, null, ItemType.ITEM_SPEED);
+ }
+
+ public void prepareDataTimeMoving(long timeMoving) {
+ prepareData(app.getString(R.string.shared_string_time_moving),
+ Algorithms.formatDuration((int) (timeMoving / 1000), app.accessibilityEnabled()),
+ R.drawable.ic_action_time_span_16, GPXDataSetType.SPEED, null, ItemType.ITEM_TIME_MOVING);
+ }
+
+ public void prepareDataDistanceCorrected(float totalDistanceMoving) {
+ prepareData(app.getString(R.string.distance_moving),
+ OsmAndFormatter.getFormattedDistance(totalDistanceMoving, app),
+ R.drawable.ic_action_polygom_dark, GPXDataSetType.SPEED, null, ItemType.ITEM_DISTANCE_MOVING);
+ }
+
+ public void prepareDataTimeSpan(float timeSpan) {
+ prepareData(app.getString(R.string.shared_string_time_span),
+ Algorithms.formatDuration((int) (timeSpan / 1000), app.accessibilityEnabled()),
+ R.drawable.ic_action_time_span_16, GPXDataSetType.SPEED, null, ItemType.ITEM_TIME_SPAN);
+ }
+
+ public void prepareDataStartTime(Date start) {
+ DateFormat dtf = SimpleDateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT);
+ prepareData(app.getString(R.string.shared_string_start_time), dtf.format(start),
+ R.drawable.ic_action_time_start_16, GPXDataSetType.SPEED, null, ItemType.ITEM_TIME);
+ }
+
+ public void prepareDataEndTime(Date end) {
+ DateFormat dtf = SimpleDateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT);
+ prepareData(app.getString(R.string.shared_string_end_time), dtf.format(end),
+ R.drawable.ic_action_time_end_16, GPXDataSetType.SPEED, null, ItemType.ITEM_TIME);
+ }
+
+ public void prepareData(String title, String value, @DrawableRes int imageResId,
GPXDataSetType firstType, GPXDataSetType secondType, ItemType itemType) {
- StatBlock statBlock = new StatBlock(title, value, imageResId, imageColorId, firstType, secondType, itemType);
- switch (statBlock.itemType) {
- case ITEM_DISTANCE: {
- if (analysis.totalDistance != 0f) {
- items.add(statBlock);
+ prepareData(title, value, imageResId, getDefaultIconColorId(nightMode), firstType, secondType, itemType);
+ }
+
+ public void prepareData(String title, String value, @DrawableRes int imageResId, @ColorRes int imageColorId,
+ GPXDataSetType firstType, GPXDataSetType secondType, ItemType itemType) {
+ if (analysis != null) {
+ StatBlock statBlock = new StatBlock(title, value, imageResId, imageColorId, firstType, secondType, itemType);
+ switch (statBlock.itemType) {
+ case ITEM_DISTANCE: {
+ if (analysis.totalDistance != 0f) {
+ items.add(statBlock);
+ }
+ break;
}
- break;
- }
- case ITEM_ALTITUDE: {
- if (analysis.hasElevationData) {
- items.add(statBlock);
+ case ITEM_DISTANCE_MOVING: {
+ if (analysis.totalDistanceMoving != 0f) {
+ items.add(statBlock);
+ }
+ break;
}
- break;
- }
- case ITEM_SPEED: {
- if (analysis.isSpeedSpecified()) {
- items.add(statBlock);
+ case ITEM_ALTITUDE: {
+ if (analysis.hasElevationData) {
+ items.add(statBlock);
+ }
+ break;
}
- break;
- }
- case ITEM_TIME: {
- if (analysis.hasSpeedData) {
- items.add(statBlock);
+ case ITEM_SPEED: {
+ if (analysis.isSpeedSpecified()) {
+ items.add(statBlock);
+ }
+ break;
+ }
+ case ITEM_TIME: {
+ if (analysis.timeSpan > 0) {
+ items.add(statBlock);
+ }
+ break;
+ }
+ case ITEM_TIME_SPAN: {
+ if (analysis.hasSpeedData) {
+ items.add(statBlock);
+ }
+ break;
+ }
+ case ITEM_TIME_MOVING: {
+ if (analysis.isTimeMoving()) {
+ items.add(statBlock);
+ }
+ break;
}
- break;
}
}
}
@@ -203,9 +344,12 @@ public class GpxBlockStatisticsBuilder {
public enum ItemType {
ITEM_DISTANCE,
+ ITEM_DISTANCE_MOVING,
ITEM_ALTITUDE,
ITEM_SPEED,
- ITEM_TIME;
+ ITEM_TIME,
+ ITEM_TIME_SPAN,
+ ITEM_TIME_MOVING;
}
private class BlockStatisticsAdapter extends RecyclerView.Adapter {
@@ -215,17 +359,15 @@ public class GpxBlockStatisticsBuilder {
private final SegmentActionsListener actionsListener;
@ColorInt
private final int activeColor;
- private final boolean nightMode;
private final int minWidthPx;
private final int maxWidthPx;
private final int textSize;
public BlockStatisticsAdapter(GpxDisplayItem displayItem, SegmentActionsListener actionsListener,
- @ColorInt int activeColor, boolean nightMode) {
+ @ColorInt int activeColor) {
this.displayItem = displayItem;
this.actionsListener = actionsListener;
this.activeColor = activeColor;
- this.nightMode = nightMode;
minWidthPx = AndroidUtils.dpToPx(app, 60f);
maxWidthPx = AndroidUtils.dpToPx(app, 120f);
textSize = app.getResources().getDimensionPixelSize(R.dimen.default_desc_text_size);
@@ -250,7 +392,7 @@ public class GpxBlockStatisticsBuilder {
holder.valueText.setText(item.value);
holder.valueText.setTextColor(activeColor);
holder.titleText.setText(item.title);
- holder.titleText.setTextColor(app.getResources().getColor(R.color.text_color_secondary_light));
+ holder.titleText.setTextColor(ContextCompat.getColor(app, R.color.text_color_secondary_light));
float letterSpacing = 0.00f;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
letterSpacing = Math.max(holder.valueText.getLetterSpacing(), holder.titleText.getLetterSpacing());
diff --git a/OsmAnd/src/net/osmand/plus/track/OverviewCard.java b/OsmAnd/src/net/osmand/plus/track/OverviewCard.java
index 25fa38e04e..2822297f2e 100644
--- a/OsmAnd/src/net/osmand/plus/track/OverviewCard.java
+++ b/OsmAnd/src/net/osmand/plus/track/OverviewCard.java
@@ -51,7 +51,7 @@ public class OverviewCard extends BaseCard {
super(mapActivity);
this.actionsListener = actionsListener;
this.selectedGpxFile = selectedGpxFile;
- blockStatisticsBuilder = new GpxBlockStatisticsBuilder(app, selectedGpxFile);
+ blockStatisticsBuilder = new GpxBlockStatisticsBuilder(app, selectedGpxFile, nightMode);
}
@Override
@@ -80,7 +80,7 @@ public class OverviewCard extends BaseCard {
initEditButton(iconColorDef, iconColorPres);
initDirectionsButton(iconColorDef, iconColorPres);
}
- blockStatisticsBuilder.initStatBlocks(actionsListener, getActiveColor(), nightMode);
+ blockStatisticsBuilder.initStatBlocks(actionsListener, getActiveColor());
}
private GPXFile getGPXFile() {
diff --git a/OsmAnd/src/net/osmand/plus/views/controls/PagerSlidingTabStrip.java b/OsmAnd/src/net/osmand/plus/views/controls/PagerSlidingTabStrip.java
index f6d5bdd4fd..f79ac0c6b5 100644
--- a/OsmAnd/src/net/osmand/plus/views/controls/PagerSlidingTabStrip.java
+++ b/OsmAnd/src/net/osmand/plus/views/controls/PagerSlidingTabStrip.java
@@ -66,12 +66,17 @@ public class PagerSlidingTabStrip extends HorizontalScrollView {
public interface CustomTabProvider {
public View getCustomTabView(@NonNull ViewGroup parent, int position);
+
public void select(View tab);
+
public void deselect(View tab);
+
public void tabStylesUpdated(View tabsContainer, int currentPosition);
}
public interface OnTabReselectedListener {
+ public void onTabSelected(int position);
+
public void onTabReselected(int position);
}
@@ -121,7 +126,7 @@ public class PagerSlidingTabStrip extends HorizontalScrollView {
private int underlineHeight = 0;
@ColorInt
private int underlineColor;
-
+
private int dividerWidth = 0;
private int dividerPadding = 0;
@@ -197,7 +202,7 @@ public class PagerSlidingTabStrip extends HorizontalScrollView {
//In case we have the padding they must be equal so we take the biggest
padding = Math.max(paddingLeft, paddingRight);
-
+
// get custom attrs
a = context.obtainStyledAttributes(attrs, R.styleable.PagerSlidingTabStrip);
@@ -221,7 +226,7 @@ public class PagerSlidingTabStrip extends HorizontalScrollView {
tabTypefaceSelectedStyle = a.getInt(R.styleable.PagerSlidingTabStrip_pstsTextSelectedStyle, Typeface.NORMAL);
tabTextAlpha = a.getFloat(R.styleable.PagerSlidingTabStrip_pstsTextAlpha, HALF_TRANSP);
tabTextSelectedAlpha = a.getFloat(R.styleable.PagerSlidingTabStrip_pstsTextSelectedAlpha, OPAQUE);
- tabTypeface = FontCache.getRobotoMedium(context);
+ tabTypeface = FontCache.getRobotoMedium(context);
a.recycle();
setMarginBottomTabContainer();
@@ -326,6 +331,9 @@ public class PagerSlidingTabStrip extends HorizontalScrollView {
View tab = tabsContainer.getChildAt(pager.getCurrentItem());
notSelected(tab);
pager.setCurrentItem(position);
+ if (tabReselectedListener != null) {
+ tabReselectedListener.onTabSelected(position);
+ }
} else if (tabReselectedListener != null) {
tabReselectedListener.onTabReselected(position);
}
@@ -470,7 +478,7 @@ public class PagerSlidingTabStrip extends HorizontalScrollView {
// draw underline
rectPaint.setColor(underlineColor); //underlineColor
canvas.drawRect(padding, height - underlineHeight, tabsContainer.getWidth() + padding, height, rectPaint);
-
+
// draw divider
if (dividerWidth != 0) {
dividerPaint.setStrokeWidth(dividerWidth);
From a8c732df4ec4212dd823daa31b4bef713df9a479 Mon Sep 17 00:00:00 2001
From: Vitaliy
Date: Mon, 22 Mar 2021 10:52:49 +0200
Subject: [PATCH 057/103] Fix multimedia files export UI
---
.../audionotes/AudioVideoNotesPlugin.java | 2 +-
.../backend/backup/SettingsHelper.java | 4 ++--
.../fragments/DuplicatesSettingsAdapter.java | 10 +++++----
.../fragments/ExportItemsBottomSheet.java | 22 +++++++++++++++++++
4 files changed, 31 insertions(+), 7 deletions(-)
diff --git a/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java b/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java
index f6d5f5c287..0bf4bb55fb 100644
--- a/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java
+++ b/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java
@@ -317,7 +317,7 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
}
}
- private String formatDateTime(Context ctx, long dateTime) {
+ public static String formatDateTime(Context ctx, long dateTime) {
DateFormat dateFormat = android.text.format.DateFormat.getMediumDateFormat(ctx);
DateFormat timeFormat = android.text.format.DateFormat.getTimeFormat(ctx);
return dateFormat.format(dateTime) + " " + timeFormat.format(dateTime);
diff --git a/OsmAnd/src/net/osmand/plus/settings/backend/backup/SettingsHelper.java b/OsmAnd/src/net/osmand/plus/settings/backend/backup/SettingsHelper.java
index 0e3b9612cc..61a429f05f 100644
--- a/OsmAnd/src/net/osmand/plus/settings/backend/backup/SettingsHelper.java
+++ b/OsmAnd/src/net/osmand/plus/settings/backend/backup/SettingsHelper.java
@@ -900,11 +900,11 @@ public class SettingsHelper {
List tileSourceTemplates = new ArrayList<>();
List routingFilesList = new ArrayList<>();
List renderFilesList = new ArrayList<>();
- List multimediaFilesList = new ArrayList<>();
List ttsVoiceFilesList = new ArrayList<>();
List voiceFilesList = new ArrayList<>();
List mapFilesList = new ArrayList<>();
List tracksFilesList = new ArrayList<>();
+ List multimediaFilesList = new ArrayList<>();
List avoidRoads = new ArrayList<>();
List globalSettingsItems = new ArrayList<>();
List notesPointList = new ArrayList<>();
@@ -927,7 +927,7 @@ public class SettingsHelper {
} else if (fileItem.getSubtype() == FileSubtype.ROUTING_CONFIG) {
routingFilesList.add(fileItem.getFile());
} else if (fileItem.getSubtype() == FileSubtype.MULTIMEDIA_NOTES) {
- multimediaFilesList.add(fileItem.getFile());
+ multimediaFilesList.add(fileItem);
} else if (fileItem.getSubtype() == FileSubtype.GPX) {
tracksFilesList.add(fileItem);
} else if (fileItem.getSubtype().isMap()) {
diff --git a/OsmAnd/src/net/osmand/plus/settings/fragments/DuplicatesSettingsAdapter.java b/OsmAnd/src/net/osmand/plus/settings/fragments/DuplicatesSettingsAdapter.java
index 4b8e40f1a0..12a046339a 100644
--- a/OsmAnd/src/net/osmand/plus/settings/fragments/DuplicatesSettingsAdapter.java
+++ b/OsmAnd/src/net/osmand/plus/settings/fragments/DuplicatesSettingsAdapter.java
@@ -6,6 +6,10 @@ import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
+import androidx.annotation.NonNull;
+import androidx.core.content.ContextCompat;
+import androidx.recyclerview.widget.RecyclerView;
+
import net.osmand.AndroidUtils;
import net.osmand.IndexConstants;
import net.osmand.PlatformUtil;
@@ -15,6 +19,7 @@ import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R;
import net.osmand.plus.UiUtilities;
import net.osmand.plus.audionotes.AudioVideoNotesPlugin;
+import net.osmand.plus.audionotes.AudioVideoNotesPlugin.Recording;
import net.osmand.plus.helpers.AvoidSpecificRoads.AvoidRoadInfo;
import net.osmand.plus.helpers.FileNameTranslationHelper;
import net.osmand.plus.helpers.GpxUiHelper;
@@ -36,10 +41,6 @@ import org.apache.commons.logging.Log;
import java.io.File;
import java.util.List;
-import androidx.annotation.NonNull;
-import androidx.core.content.ContextCompat;
-import androidx.recyclerview.widget.RecyclerView;
-
import static net.osmand.plus.settings.backend.backup.FileSettingsItem.FileSubtype;
public class DuplicatesSettingsAdapter extends RecyclerView.Adapter {
@@ -154,6 +155,7 @@ public class DuplicatesSettingsAdapter extends RecyclerView.Adapter
Date: Mon, 22 Mar 2021 10:54:44 +0200
Subject: [PATCH 058/103] Fix possible npe
---
.../net/osmand/plus/settings/backend/EnumStringPreference.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/OsmAnd/src/net/osmand/plus/settings/backend/EnumStringPreference.java b/OsmAnd/src/net/osmand/plus/settings/backend/EnumStringPreference.java
index a88a17fed3..662c773172 100644
--- a/OsmAnd/src/net/osmand/plus/settings/backend/EnumStringPreference.java
+++ b/OsmAnd/src/net/osmand/plus/settings/backend/EnumStringPreference.java
@@ -30,7 +30,7 @@ public class EnumStringPreference> extends CommonPreference
@Override
protected String toString(E o) {
- return o.name();
+ return o == null ? null : o.name();
}
@Override
From 4543e16b1448eedc0dc5967628df9dd609148919 Mon Sep 17 00:00:00 2001
From: Dmitry
Date: Mon, 22 Mar 2021 12:03:10 +0200
Subject: [PATCH 059/103] Added icon ic_action_dialog for track recording show
dialog option
---
OsmAnd/res/drawable/ic_action_dialog.xml | 63 ++++++++++++++++++++++++
1 file changed, 63 insertions(+)
create mode 100644 OsmAnd/res/drawable/ic_action_dialog.xml
diff --git a/OsmAnd/res/drawable/ic_action_dialog.xml b/OsmAnd/res/drawable/ic_action_dialog.xml
new file mode 100644
index 0000000000..0346a117dd
--- /dev/null
+++ b/OsmAnd/res/drawable/ic_action_dialog.xml
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
From 5f67fbcac69b1ad024e9fae2c2bbd10017e6fca3 Mon Sep 17 00:00:00 2001
From: Skalii
Date: Mon, 22 Mar 2021 13:13:04 +0200
Subject: [PATCH 060/103] add new setting - show start dialog
---
OsmAnd/res/values/strings.xml | 6 +++--
OsmAnd/res/xml/monitoring_settings.xml | 9 +++++++-
.../plus/activities/MapActivityActions.java | 2 +-
.../MonitoringSettingsFragment.java | 7 ++++++
.../monitoring/OsmandMonitoringPlugin.java | 5 +++--
.../TripRecordingStartingBottomFragment.java | 22 ++++++++++++++++++-
.../plus/settings/backend/OsmandSettings.java | 1 +
7 files changed, 45 insertions(+), 7 deletions(-)
diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml
index 21bb56470e..2e8b12d4fa 100644
--- a/OsmAnd/res/values/strings.xml
+++ b/OsmAnd/res/values/strings.xml
@@ -11,7 +11,9 @@
Thx - Hardy
-->
- All unsaved data will be lost.
+ If disabled, recording will start right after tap on the widget or menu item, skipping the confirmation dialog.
+ Show start dialog
+ All unsaved data will be lost.
Save and continue
Logging interval set time period in which OsmAnd will ask for the current location position data.
Please select another type of colorization.
@@ -1177,7 +1179,7 @@
No search results?\nProvide feedback
- If disabled, recording will start right after tap on the widget or menu item, skipping the confirmation dialog.
- Show start dialog
- All unsaved data will be lost.
+ If disabled, recording will start right after tap on the widget or menu item, skipping the confirmation dialog.
+ Show start dialog
+ All unsaved data will be lost.
Save and continue
Logging interval set time period in which OsmAnd will ask for the current location position data.
Please select another type of colorization.
diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java
index 7f96fbf3ec..487f4d902f 100644
--- a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java
+++ b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java
@@ -104,7 +104,7 @@ import net.osmand.plus.measurementtool.LoginBottomSheetFragment;
import net.osmand.plus.measurementtool.MeasurementEditingContext;
import net.osmand.plus.measurementtool.MeasurementToolFragment;
import net.osmand.plus.measurementtool.SnapTrackWarningFragment;
-import net.osmand.plus.monitoring.TripRecordingStartingBottomSheetFragment;
+import net.osmand.plus.monitoring.TripRecordingStartingBottomSheet;
import net.osmand.plus.render.RendererRegistry;
import net.osmand.plus.resources.ResourceManager;
import net.osmand.plus.routepreparationmenu.ChooseRouteFragment;
@@ -2241,8 +2241,8 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven
return getFragment(MeasurementToolFragment.TAG);
}
- public TripRecordingStartingBottomSheetFragment getTripRecordingBottomSheet() {
- return getFragment(TripRecordingStartingBottomSheetFragment.TAG);
+ public TripRecordingStartingBottomSheet getTripRecordingBottomSheet() {
+ return getFragment(TripRecordingStartingBottomSheet.TAG);
}
public ChooseRouteFragment getChooseRouteFragment() {
diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java
index c3f36f89f3..4ef54303ea 100644
--- a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java
+++ b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java
@@ -62,8 +62,8 @@ import net.osmand.plus.mapmarkers.MarkersPlanRouteContext;
import net.osmand.plus.measurementtool.MeasurementToolFragment;
import net.osmand.plus.measurementtool.StartPlanRouteBottomSheet;
import net.osmand.plus.monitoring.OsmandMonitoringPlugin;
-import net.osmand.plus.monitoring.TripRecordingBottomSheetFragment;
-import net.osmand.plus.monitoring.TripRecordingStartingBottomSheetFragment;
+import net.osmand.plus.monitoring.TripRecordingBottomSheet;
+import net.osmand.plus.monitoring.TripRecordingStartingBottomSheet;
import net.osmand.plus.osmedit.dialogs.DismissRouteBottomSheetFragment;
import net.osmand.plus.profiles.ProfileDataObject;
import net.osmand.plus.profiles.ProfileDataUtils;
@@ -854,9 +854,9 @@ public class MapActivityActions implements DialogProvider {
app.logEvent("trip_recording_open");
MapActivity.clearPrevActivityIntent();
if (monitoringPlugin.hasDataToSave() || monitoringPlugin.wasTrackMonitored()) {
- TripRecordingBottomSheetFragment.showInstance(mapActivity.getSupportFragmentManager(), monitoringPlugin.getCurrentTrack());
+ TripRecordingBottomSheet.showInstance(mapActivity.getSupportFragmentManager());
} else {
- TripRecordingStartingBottomSheetFragment.showInstance(mapActivity.getSupportFragmentManager(), app, monitoringPlugin.getCurrentTrack());
+ TripRecordingStartingBottomSheet.showTripRecordingDialog(mapActivity.getSupportFragmentManager(), app);
}
return true;
}
diff --git a/OsmAnd/src/net/osmand/plus/liveupdates/LiveUpdatesFragmentNew.java b/OsmAnd/src/net/osmand/plus/liveupdates/LiveUpdatesFragmentNew.java
index b9219a3d75..243362ea98 100644
--- a/OsmAnd/src/net/osmand/plus/liveupdates/LiveUpdatesFragmentNew.java
+++ b/OsmAnd/src/net/osmand/plus/liveupdates/LiveUpdatesFragmentNew.java
@@ -85,9 +85,9 @@ import static net.osmand.plus.liveupdates.LiveUpdatesHelper.preferenceUpdateFreq
import static net.osmand.plus.liveupdates.LiveUpdatesHelper.runLiveUpdate;
import static net.osmand.plus.liveupdates.LiveUpdatesHelper.setAlarmForPendingIntent;
import static net.osmand.plus.liveupdates.LiveUpdatesSettingsDialogFragmentNew.getTertiaryTextColorId;
-import static net.osmand.plus.monitoring.TripRecordingBottomSheetFragment.getActiveTextColorId;
-import static net.osmand.plus.monitoring.TripRecordingBottomSheetFragment.getOsmandIconColorId;
-import static net.osmand.plus.monitoring.TripRecordingBottomSheetFragment.getSecondaryIconColorId;
+import static net.osmand.plus.monitoring.TripRecordingBottomSheet.getActiveTextColorId;
+import static net.osmand.plus.monitoring.TripRecordingBottomSheet.getOsmandIconColorId;
+import static net.osmand.plus.monitoring.TripRecordingBottomSheet.getSecondaryIconColorId;
public class LiveUpdatesFragmentNew extends BaseOsmAndDialogFragment implements OnLiveUpdatesForLocalChange {
diff --git a/OsmAnd/src/net/osmand/plus/monitoring/MonitoringSettingsFragment.java b/OsmAnd/src/net/osmand/plus/monitoring/MonitoringSettingsFragment.java
index 2d67428141..f4ef01b7f1 100644
--- a/OsmAnd/src/net/osmand/plus/monitoring/MonitoringSettingsFragment.java
+++ b/OsmAnd/src/net/osmand/plus/monitoring/MonitoringSettingsFragment.java
@@ -300,8 +300,8 @@ public class MonitoringSettingsFragment extends BaseSettingsFragment
FragmentActivity activity = getActivity();
if (activity != null && !activity.isChangingConfigurations()) {
Fragment target = getTargetFragment();
- if (target instanceof TripRecordingStartingBottomSheetFragment) {
- ((TripRecordingStartingBottomSheetFragment) target).show();
+ if (target instanceof TripRecordingStartingBottomSheet) {
+ ((TripRecordingStartingBottomSheet) target).show();
}
}
super.onDestroy();
diff --git a/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java b/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java
index 35dbea97a8..a96fc06d94 100644
--- a/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java
+++ b/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java
@@ -337,9 +337,9 @@ public class OsmandMonitoringPlugin extends OsmandPlugin {
public void controlDialog(final Activity activity, final boolean showTrackSelection) {
FragmentManager fragmentManager = ((FragmentActivity) activity).getSupportFragmentManager();
if (hasDataToSave() || wasTrackMonitored()) {
- TripRecordingBottomSheetFragment.showInstance(fragmentManager, getCurrentTrack());
+ TripRecordingBottomSheet.showInstance(fragmentManager);
} else {
- TripRecordingStartingBottomSheetFragment.showInstance(fragmentManager, app, getCurrentTrack());
+ TripRecordingStartingBottomSheet.showTripRecordingDialog(fragmentManager, app);
}
/*final boolean wasTrackMonitored = settings.SAVE_GLOBAL_TRACK_TO_GPX.get();
@@ -507,7 +507,7 @@ public class OsmandMonitoringPlugin extends OsmandPlugin {
final Activity a = activityRef.get();
if (a instanceof FragmentActivity && !a.isFinishing()) {
List singleName = Collections.singletonList(Algorithms.getFileNameWithoutExtension(file));
- SaveGPXBottomSheetFragment.showInstance(((FragmentActivity) a)
+ SaveGPXBottomSheet.showInstance(((FragmentActivity) a)
.getSupportFragmentManager(), singleName);
}
}
@@ -558,7 +558,7 @@ public class OsmandMonitoringPlugin extends OsmandPlugin {
runnable.run();
} else if (map instanceof FragmentActivity) {
FragmentActivity activity = (FragmentActivity) map;
- TripRecordingStartingBottomSheetFragment.showInstance(activity.getSupportFragmentManager(), app, getCurrentTrack());
+ TripRecordingStartingBottomSheet.showTripRecordingDialog(activity.getSupportFragmentManager(), app);
}
}
diff --git a/OsmAnd/src/net/osmand/plus/monitoring/SaveGPXBottomSheetFragment.java b/OsmAnd/src/net/osmand/plus/monitoring/SaveGPXBottomSheet.java
similarity index 97%
rename from OsmAnd/src/net/osmand/plus/monitoring/SaveGPXBottomSheetFragment.java
rename to OsmAnd/src/net/osmand/plus/monitoring/SaveGPXBottomSheet.java
index d37d113e6c..14fd6e1352 100644
--- a/OsmAnd/src/net/osmand/plus/monitoring/SaveGPXBottomSheetFragment.java
+++ b/OsmAnd/src/net/osmand/plus/monitoring/SaveGPXBottomSheet.java
@@ -42,10 +42,10 @@ import java.util.List;
import static net.osmand.FileUtils.ILLEGAL_FILE_NAME_CHARACTERS;
-public class SaveGPXBottomSheetFragment extends MenuBottomSheetDialogFragment {
+public class SaveGPXBottomSheet extends MenuBottomSheetDialogFragment {
public static final String TAG = "SaveGPXBottomSheetFragment";
public static final String SAVED_TRACKS_KEY = "saved_track_filename";
- private static final Log LOG = PlatformUtil.getLog(SaveGPXBottomSheetFragment.class);
+ private static final Log LOG = PlatformUtil.getLog(SaveGPXBottomSheet.class);
private boolean openTrack = false;
private File file;
@@ -227,7 +227,7 @@ public class SaveGPXBottomSheetFragment extends MenuBottomSheetDialogFragment {
if (fragmentManager.isStateSaved()) {
return;
}
- SaveGPXBottomSheetFragment f = new SaveGPXBottomSheetFragment();
+ SaveGPXBottomSheet f = new SaveGPXBottomSheet();
Bundle b = new Bundle();
b.putStringArrayList(SAVED_TRACKS_KEY, new ArrayList<>(filenames));
f.setArguments(b);
diff --git a/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingBottomSheetFragment.java b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingBottomSheet.java
similarity index 97%
rename from OsmAnd/src/net/osmand/plus/monitoring/TripRecordingBottomSheetFragment.java
rename to OsmAnd/src/net/osmand/plus/monitoring/TripRecordingBottomSheet.java
index 4772e53197..8db1508454 100644
--- a/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingBottomSheetFragment.java
+++ b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingBottomSheet.java
@@ -73,10 +73,10 @@ import static net.osmand.plus.track.GpxBlockStatisticsBuilder.INIT_BLOCKS_ALTITU
import static net.osmand.plus.track.GpxBlockStatisticsBuilder.INIT_BLOCKS_GENERAL;
import static net.osmand.plus.track.GpxBlockStatisticsBuilder.INIT_BLOCKS_SPEED;
-public class TripRecordingBottomSheetFragment extends MenuBottomSheetDialogFragment implements SegmentActionsListener {
+public class TripRecordingBottomSheet extends MenuBottomSheetDialogFragment implements SegmentActionsListener {
- public static final String TAG = TripRecordingBottomSheetFragment.class.getSimpleName();
- private static final Log LOG = PlatformUtil.getLog(TripRecordingBottomSheetFragment.class);
+ public static final String TAG = TripRecordingBottomSheet.class.getSimpleName();
+ private static final Log LOG = PlatformUtil.getLog(TripRecordingBottomSheet.class);
public static final String UPDATE_TRACK_ICON = "update_track_icon";
private static final int GPS_UPDATE_INTERVAL = 1000;
private static final String[] INIT_BLOCKS_KEYS =
@@ -104,10 +104,6 @@ public class TripRecordingBottomSheetFragment extends MenuBottomSheetDialogFragm
return selectedGpxFile.getGpxFile();
}
- public void setSelectedGpxFile(SelectedGpxFile selectedGpxFile) {
- this.selectedGpxFile = selectedGpxFile;
- }
-
private boolean hasDataToSave() {
return helper.hasDataToSave();
}
@@ -120,10 +116,9 @@ public class TripRecordingBottomSheetFragment extends MenuBottomSheetDialogFragm
return settings.SAVE_GLOBAL_TRACK_TO_GPX.get();
}
- public static void showInstance(@NonNull FragmentManager fragmentManager, SelectedGpxFile selectedGpxFile) {
+ public static void showInstance(@NonNull FragmentManager fragmentManager) {
if (!fragmentManager.isStateSaved()) {
- TripRecordingBottomSheetFragment fragment = new TripRecordingBottomSheetFragment();
- fragment.setSelectedGpxFile(selectedGpxFile);
+ TripRecordingBottomSheet fragment = new TripRecordingBottomSheet();
fragment.show(fragmentManager, TAG);
}
}
@@ -149,7 +144,7 @@ public class TripRecordingBottomSheetFragment extends MenuBottomSheetDialogFragm
LinearLayout showTrackContainer = itemView.findViewById(R.id.show_track_on_map);
trackAppearanceIcon = showTrackContainer.findViewById(R.id.additional_button_icon);
createShowTrackItem(showTrackContainer, trackAppearanceIcon, ItemType.SHOW_TRACK.getTitleId(),
- TripRecordingBottomSheetFragment.this, nightMode, new Runnable() {
+ TripRecordingBottomSheet.this, nightMode, new Runnable() {
@Override
public void run() {
hide();
@@ -213,7 +208,7 @@ public class TripRecordingBottomSheetFragment extends MenuBottomSheetDialogFragm
@Override
public void onClick(View v) {
if (fragmentManager != null) {
- TripRecordingOptionsBottomSheetFragment.showInstance(fragmentManager, TripRecordingBottomSheetFragment.this);
+ TripRecordingOptionsBottomSheet.showInstance(fragmentManager, TripRecordingBottomSheet.this);
}
}
});
diff --git a/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingClearDataBottomSheetFragment.java b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingClearDataBottomSheet.java
similarity index 78%
rename from OsmAnd/src/net/osmand/plus/monitoring/TripRecordingClearDataBottomSheetFragment.java
rename to OsmAnd/src/net/osmand/plus/monitoring/TripRecordingClearDataBottomSheet.java
index 2e1f171bce..88814e4819 100644
--- a/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingClearDataBottomSheetFragment.java
+++ b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingClearDataBottomSheet.java
@@ -11,7 +11,7 @@ import net.osmand.plus.base.MenuBottomSheetDialogFragment;
import net.osmand.plus.base.bottomsheetmenu.BaseBottomSheetItem;
import net.osmand.plus.base.bottomsheetmenu.BottomSheetItemWithDescription;
import net.osmand.plus.base.bottomsheetmenu.simpleitems.DividerSpaceItem;
-import net.osmand.plus.monitoring.TripRecordingBottomSheetFragment.ItemType;
+import net.osmand.plus.monitoring.TripRecordingBottomSheet.ItemType;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
@@ -19,15 +19,15 @@ import androidx.fragment.app.FragmentManager;
import static net.osmand.AndroidUtils.getPrimaryTextColorId;
-public class TripRecordingClearDataBottomSheetFragment extends MenuBottomSheetDialogFragment implements TripRecordingBottomSheetFragment.DismissTargetFragment {
+public class TripRecordingClearDataBottomSheet extends MenuBottomSheetDialogFragment implements TripRecordingBottomSheet.DismissTargetFragment {
- public static final String TAG = TripRecordingClearDataBottomSheetFragment.class.getSimpleName();
+ public static final String TAG = TripRecordingClearDataBottomSheet.class.getSimpleName();
private OsmandApplication app;
public static void showInstance(@NonNull FragmentManager fragmentManager, @NonNull Fragment target) {
if (!fragmentManager.isStateSaved()) {
- TripRecordingClearDataBottomSheetFragment fragment = new TripRecordingClearDataBottomSheetFragment();
+ TripRecordingClearDataBottomSheet fragment = new TripRecordingClearDataBottomSheet();
fragment.setTargetFragment(target, 0);
fragment.show(fragmentManager, TAG);
}
@@ -81,15 +81,15 @@ public class TripRecordingClearDataBottomSheetFragment extends MenuBottomSheetDi
}
private View createItem(LayoutInflater inflater, ItemType type) {
- return TripRecordingBottomSheetFragment.createItem(app, nightMode, inflater, type);
+ return TripRecordingBottomSheet.createItem(app, nightMode, inflater, type);
}
@Override
public void onResume() {
super.onResume();
Fragment target = getTargetFragment();
- if (target instanceof TripRecordingOptionsBottomSheetFragment) {
- ((TripRecordingOptionsBottomSheetFragment) target).hide();
+ if (target instanceof TripRecordingOptionsBottomSheet) {
+ ((TripRecordingOptionsBottomSheet) target).hide();
}
}
@@ -97,8 +97,8 @@ public class TripRecordingClearDataBottomSheetFragment extends MenuBottomSheetDi
public void onPause() {
super.onPause();
Fragment target = getTargetFragment();
- if (target instanceof TripRecordingOptionsBottomSheetFragment) {
- ((TripRecordingOptionsBottomSheetFragment) target).show();
+ if (target instanceof TripRecordingOptionsBottomSheet) {
+ ((TripRecordingOptionsBottomSheet) target).show();
}
}
@@ -110,8 +110,8 @@ public class TripRecordingClearDataBottomSheetFragment extends MenuBottomSheetDi
@Override
public void dismissTarget() {
Fragment target = getTargetFragment();
- if (target instanceof TripRecordingOptionsBottomSheetFragment) {
- ((TripRecordingOptionsBottomSheetFragment) target).dismiss();
+ if (target instanceof TripRecordingOptionsBottomSheet) {
+ ((TripRecordingOptionsBottomSheet) target).dismiss();
}
}
}
diff --git a/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingDiscardBottomSheetFragment.java b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingDiscardBottomSheet.java
similarity index 80%
rename from OsmAnd/src/net/osmand/plus/monitoring/TripRecordingDiscardBottomSheetFragment.java
rename to OsmAnd/src/net/osmand/plus/monitoring/TripRecordingDiscardBottomSheet.java
index 949257bc73..70414eab5e 100644
--- a/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingDiscardBottomSheetFragment.java
+++ b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingDiscardBottomSheet.java
@@ -12,24 +12,24 @@ import net.osmand.plus.base.MenuBottomSheetDialogFragment;
import net.osmand.plus.base.bottomsheetmenu.BaseBottomSheetItem;
import net.osmand.plus.base.bottomsheetmenu.BottomSheetItemWithDescription;
import net.osmand.plus.base.bottomsheetmenu.simpleitems.DividerSpaceItem;
-import net.osmand.plus.monitoring.TripRecordingBottomSheetFragment.ItemType;
+import net.osmand.plus.monitoring.TripRecordingBottomSheet.ItemType;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import static net.osmand.AndroidUtils.getPrimaryTextColorId;
-import static net.osmand.plus.monitoring.TripRecordingOptionsBottomSheetFragment.ACTION_STOP_AND_DISMISS;
+import static net.osmand.plus.monitoring.TripRecordingOptionsBottomSheet.ACTION_STOP_AND_DISMISS;
-public class TripRecordingDiscardBottomSheetFragment extends MenuBottomSheetDialogFragment implements TripRecordingBottomSheetFragment.DismissTargetFragment {
+public class TripRecordingDiscardBottomSheet extends MenuBottomSheetDialogFragment implements TripRecordingBottomSheet.DismissTargetFragment {
- public static final String TAG = TripRecordingDiscardBottomSheetFragment.class.getSimpleName();
+ public static final String TAG = TripRecordingDiscardBottomSheet.class.getSimpleName();
private OsmandApplication app;
public static void showInstance(@NonNull FragmentManager fragmentManager, @NonNull Fragment target) {
if (!fragmentManager.isStateSaved()) {
- TripRecordingDiscardBottomSheetFragment fragment = new TripRecordingDiscardBottomSheetFragment();
+ TripRecordingDiscardBottomSheet fragment = new TripRecordingDiscardBottomSheet();
fragment.setTargetFragment(target, 0);
fragment.show(fragmentManager, TAG);
}
@@ -93,15 +93,15 @@ public class TripRecordingDiscardBottomSheetFragment extends MenuBottomSheetDial
}
private View createItem(LayoutInflater inflater, ItemType type) {
- return TripRecordingBottomSheetFragment.createItem(app, nightMode, inflater, type);
+ return TripRecordingBottomSheet.createItem(app, nightMode, inflater, type);
}
@Override
public void onResume() {
super.onResume();
Fragment target = getTargetFragment();
- if (target instanceof TripRecordingOptionsBottomSheetFragment) {
- ((TripRecordingOptionsBottomSheetFragment) target).hide();
+ if (target instanceof TripRecordingOptionsBottomSheet) {
+ ((TripRecordingOptionsBottomSheet) target).hide();
}
}
@@ -109,16 +109,16 @@ public class TripRecordingDiscardBottomSheetFragment extends MenuBottomSheetDial
public void onPause() {
super.onPause();
Fragment target = getTargetFragment();
- if (target instanceof TripRecordingOptionsBottomSheetFragment) {
- ((TripRecordingOptionsBottomSheetFragment) target).show();
+ if (target instanceof TripRecordingOptionsBottomSheet) {
+ ((TripRecordingOptionsBottomSheet) target).show();
}
}
@Override
public void dismissTarget() {
Fragment target = getTargetFragment();
- if (target instanceof TripRecordingOptionsBottomSheetFragment) {
- ((TripRecordingOptionsBottomSheetFragment) target).dismiss();
+ if (target instanceof TripRecordingOptionsBottomSheet) {
+ ((TripRecordingOptionsBottomSheet) target).dismiss();
}
}
diff --git a/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingOptionsBottomSheetFragment.java b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingOptionsBottomSheet.java
similarity index 86%
rename from OsmAnd/src/net/osmand/plus/monitoring/TripRecordingOptionsBottomSheetFragment.java
rename to OsmAnd/src/net/osmand/plus/monitoring/TripRecordingOptionsBottomSheet.java
index c110343ba8..ac42775bd2 100644
--- a/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingOptionsBottomSheetFragment.java
+++ b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingOptionsBottomSheet.java
@@ -27,7 +27,7 @@ import net.osmand.plus.base.bottomsheetmenu.BaseBottomSheetItem;
import net.osmand.plus.base.bottomsheetmenu.SimpleBottomSheetItem;
import net.osmand.plus.base.bottomsheetmenu.simpleitems.DividerSpaceItem;
import net.osmand.plus.helpers.AndroidUiHelper;
-import net.osmand.plus.monitoring.TripRecordingBottomSheetFragment.ItemType;
+import net.osmand.plus.monitoring.TripRecordingBottomSheet.ItemType;
import net.osmand.plus.myplaces.SaveCurrentTrackTask;
import net.osmand.plus.settings.backend.OsmandSettings;
import net.osmand.plus.track.SaveGpxAsyncTask.SaveGpxListener;
@@ -35,9 +35,9 @@ import net.osmand.util.Algorithms;
import static net.osmand.AndroidUtils.getPrimaryTextColorId;
-public class TripRecordingOptionsBottomSheetFragment extends MenuBottomSheetDialogFragment implements TripRecordingBottomSheetFragment.DismissTargetFragment {
+public class TripRecordingOptionsBottomSheet extends MenuBottomSheetDialogFragment implements TripRecordingBottomSheet.DismissTargetFragment {
- public static final String TAG = TripRecordingOptionsBottomSheetFragment.class.getSimpleName();
+ public static final String TAG = TripRecordingOptionsBottomSheet.class.getSimpleName();
public static final String ACTION_STOP_AND_DISMISS = "action_stop_and_discard";
private static final int SAVE_UPDATE_INTERVAL = 1000;
@@ -72,7 +72,7 @@ public class TripRecordingOptionsBottomSheetFragment extends MenuBottomSheetDial
public static void showInstance(@NonNull FragmentManager fragmentManager, @NonNull Fragment target) {
if (!fragmentManager.isStateSaved()) {
- TripRecordingOptionsBottomSheetFragment fragment = new TripRecordingOptionsBottomSheetFragment();
+ TripRecordingOptionsBottomSheet fragment = new TripRecordingOptionsBottomSheet();
fragment.setTargetFragment(target, 0);
fragment.show(fragmentManager, TAG);
}
@@ -109,7 +109,7 @@ public class TripRecordingOptionsBottomSheetFragment extends MenuBottomSheetDial
@Override
public void onClick(View v) {
if (fragmentManager != null && hasDataToSave()) {
- TripRecordingClearDataBottomSheetFragment.showInstance(fragmentManager, TripRecordingOptionsBottomSheetFragment.this);
+ TripRecordingClearDataBottomSheet.showInstance(fragmentManager, TripRecordingOptionsBottomSheet.this);
}
}
})
@@ -123,7 +123,7 @@ public class TripRecordingOptionsBottomSheetFragment extends MenuBottomSheetDial
@Override
public void onClick(View v) {
if (fragmentManager != null) {
- TripRecordingDiscardBottomSheetFragment.showInstance(fragmentManager, TripRecordingOptionsBottomSheetFragment.this);
+ TripRecordingDiscardBottomSheet.showInstance(fragmentManager, TripRecordingOptionsBottomSheet.this);
}
}
})
@@ -189,8 +189,8 @@ public class TripRecordingOptionsBottomSheetFragment extends MenuBottomSheetDial
super.onResume();
runUpdatingTimeTrackSaved();
Fragment target = getTargetFragment();
- if (target instanceof TripRecordingBottomSheetFragment) {
- ((TripRecordingBottomSheetFragment) target).hide();
+ if (target instanceof TripRecordingBottomSheet) {
+ ((TripRecordingBottomSheet) target).hide();
}
}
@@ -224,8 +224,8 @@ public class TripRecordingOptionsBottomSheetFragment extends MenuBottomSheetDial
@Override
public void run() {
String time = getTimeTrackSaved();
- TripRecordingBottomSheetFragment.createItem(app, nightMode, buttonSave, ItemType.SAVE, hasDataToSave(), !Algorithms.isEmpty(time) ? time : null);
- TripRecordingBottomSheetFragment.createItem(app, nightMode, buttonClear, ItemType.CLEAR_DATA, hasDataToSave(), null);
+ TripRecordingBottomSheet.createItem(app, nightMode, buttonSave, ItemType.SAVE, hasDataToSave(), !Algorithms.isEmpty(time) ? time : null);
+ TripRecordingBottomSheet.createItem(app, nightMode, buttonClear, ItemType.CLEAR_DATA, hasDataToSave(), null);
handler.postDelayed(this, SAVE_UPDATE_INTERVAL);
}
};
@@ -244,11 +244,11 @@ public class TripRecordingOptionsBottomSheetFragment extends MenuBottomSheetDial
}
private View createItem(LayoutInflater inflater, ItemType type, boolean enabled) {
- return TripRecordingBottomSheetFragment.createItem(app, nightMode, inflater, type, enabled, null);
+ return TripRecordingBottomSheet.createItem(app, nightMode, inflater, type, enabled, null);
}
private View createItem(LayoutInflater inflater, ItemType type) {
- return TripRecordingBottomSheetFragment.createItem(app, nightMode, inflater, type);
+ return TripRecordingBottomSheet.createItem(app, nightMode, inflater, type);
}
private SaveGpxListener createSaveListener() {
@@ -286,11 +286,11 @@ public class TripRecordingOptionsBottomSheetFragment extends MenuBottomSheetDial
@Override
public void dismissTarget() {
Fragment target = getTargetFragment();
- if (target instanceof TripRecordingBottomSheetFragment) {
+ if (target instanceof TripRecordingBottomSheet) {
if (isDiscard()) {
- ((TripRecordingBottomSheetFragment) target).dismiss();
+ ((TripRecordingBottomSheet) target).dismiss();
} else {
- ((TripRecordingBottomSheetFragment) target).show();
+ ((TripRecordingBottomSheet) target).show();
}
}
}
diff --git a/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingStartingBottomSheetFragment.java b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingStartingBottomSheet.java
similarity index 87%
rename from OsmAnd/src/net/osmand/plus/monitoring/TripRecordingStartingBottomSheetFragment.java
rename to OsmAnd/src/net/osmand/plus/monitoring/TripRecordingStartingBottomSheet.java
index 8b41dab876..e45f792514 100644
--- a/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingStartingBottomSheetFragment.java
+++ b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingStartingBottomSheet.java
@@ -19,31 +19,29 @@ import androidx.fragment.app.FragmentManager;
import com.google.android.material.slider.RangeSlider;
-import net.osmand.plus.GpxSelectionHelper.SelectedGpxFile;
import net.osmand.plus.NavigationService;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R;
import net.osmand.plus.UiUtilities;
import net.osmand.plus.activities.MapActivity;
-import net.osmand.plus.activities.SavingTrackHelper;
import net.osmand.plus.base.MenuBottomSheetDialogFragment;
import net.osmand.plus.base.bottomsheetmenu.BaseBottomSheetItem;
import net.osmand.plus.helpers.AndroidUiHelper;
import net.osmand.plus.helpers.FontCache;
-import net.osmand.plus.monitoring.TripRecordingBottomSheetFragment.ItemType;
+import net.osmand.plus.monitoring.TripRecordingBottomSheet.ItemType;
import net.osmand.plus.settings.backend.OsmandSettings;
import net.osmand.plus.settings.fragments.BaseSettingsFragment;
import net.osmand.plus.settings.fragments.BaseSettingsFragment.SettingsScreenType;
import static net.osmand.plus.monitoring.OsmandMonitoringPlugin.MINUTES;
import static net.osmand.plus.monitoring.OsmandMonitoringPlugin.SECONDS;
-import static net.osmand.plus.monitoring.TripRecordingBottomSheetFragment.createItem;
-import static net.osmand.plus.monitoring.TripRecordingBottomSheetFragment.createShowTrackItem;
-import static net.osmand.plus.monitoring.TripRecordingBottomSheetFragment.updateTrackIcon;
+import static net.osmand.plus.monitoring.TripRecordingBottomSheet.createItem;
+import static net.osmand.plus.monitoring.TripRecordingBottomSheet.createShowTrackItem;
+import static net.osmand.plus.monitoring.TripRecordingBottomSheet.updateTrackIcon;
-public class TripRecordingStartingBottomSheetFragment extends MenuBottomSheetDialogFragment {
+public class TripRecordingStartingBottomSheet extends MenuBottomSheetDialogFragment {
- public static final String TAG = TripRecordingStartingBottomSheetFragment.class.getSimpleName();
+ public static final String TAG = TripRecordingStartingBottomSheet.class.getSimpleName();
public static final String UPDATE_LOGGING_INTERVAL = "update_logging_interval";
private OsmandApplication app;
@@ -59,12 +57,12 @@ public class TripRecordingStartingBottomSheetFragment extends MenuBottomSheetDia
public static void showInstance(@NonNull FragmentManager fragmentManager) {
if (!fragmentManager.isStateSaved()) {
- TripRecordingStartingBottomSheetFragment fragment = new TripRecordingStartingBottomSheetFragment();
+ TripRecordingStartingBottomSheet fragment = new TripRecordingStartingBottomSheet();
fragment.show(fragmentManager, TAG);
}
}
- public static void showInstance(@NonNull FragmentManager fragmentManager, OsmandApplication app, SelectedGpxFile selectedGpxFile) {
+ public static void showTripRecordingDialog(@NonNull FragmentManager fragmentManager, OsmandApplication app) {
if (!fragmentManager.isStateSaved()) {
OsmandSettings settings = app.getSettings();
boolean showStartDialog = settings.SHOW_TRIP_REC_START_DIALOG.get();
@@ -72,7 +70,7 @@ public class TripRecordingStartingBottomSheetFragment extends MenuBottomSheetDia
showInstance(fragmentManager);
} else {
startRecording(app);
- TripRecordingBottomSheetFragment.showInstance(fragmentManager, selectedGpxFile);
+ TripRecordingBottomSheet.showInstance(fragmentManager);
}
}
}
@@ -106,7 +104,7 @@ public class TripRecordingStartingBottomSheetFragment extends MenuBottomSheetDia
LinearLayout showTrackContainer = itemView.findViewById(R.id.show_track_on_map);
trackAppearanceIcon = showTrackContainer.findViewById(R.id.additional_button_icon);
createShowTrackItem(showTrackContainer, trackAppearanceIcon, R.string.shared_string_show_on_map,
- TripRecordingStartingBottomSheetFragment.this, nightMode, new Runnable() {
+ TripRecordingStartingBottomSheet.this, nightMode, new Runnable() {
@Override
public void run() {
hide();
@@ -142,7 +140,7 @@ public class TripRecordingStartingBottomSheetFragment extends MenuBottomSheetDia
if (mapActivity != null) {
hide();
BaseSettingsFragment.showInstance(mapActivity, SettingsScreenType.MONITORING_SETTINGS,
- null, new Bundle(), TripRecordingStartingBottomSheetFragment.this);
+ null, new Bundle(), TripRecordingStartingBottomSheet.this);
}
}
});
@@ -221,10 +219,8 @@ public class TripRecordingStartingBottomSheetFragment extends MenuBottomSheetDia
}
private static void startRecording(OsmandApplication app) {
- OsmandSettings settings = app.getSettings();
- SavingTrackHelper helper = app.getSavingTrackHelper();
- helper.startNewSegment();
- settings.SAVE_GLOBAL_TRACK_TO_GPX.set(true);
+ app.getSavingTrackHelper().startNewSegment();
+ app.getSettings().SAVE_GLOBAL_TRACK_TO_GPX.set(true);
app.startNavigationService(NavigationService.USED_BY_GPX);
}
@@ -232,8 +228,7 @@ public class TripRecordingStartingBottomSheetFragment extends MenuBottomSheetDia
startRecording(app);
MapActivity mapActivity = getMapActivity();
if (mapActivity != null) {
- SavingTrackHelper helper = app.getSavingTrackHelper();
- TripRecordingBottomSheetFragment.showInstance(mapActivity.getSupportFragmentManager(), helper.getCurrentTrack());
+ TripRecordingBottomSheet.showInstance(mapActivity.getSupportFragmentManager());
}
dismiss();
}
diff --git a/OsmAnd/src/net/osmand/plus/settings/bottomsheets/BooleanPreferenceBottomSheet.java b/OsmAnd/src/net/osmand/plus/settings/bottomsheets/BooleanPreferenceBottomSheet.java
index 8a37c9c239..2f4ca39f84 100644
--- a/OsmAnd/src/net/osmand/plus/settings/bottomsheets/BooleanPreferenceBottomSheet.java
+++ b/OsmAnd/src/net/osmand/plus/settings/bottomsheets/BooleanPreferenceBottomSheet.java
@@ -34,7 +34,7 @@ import net.osmand.plus.settings.preferences.SwitchPreferenceEx;
import org.apache.commons.logging.Log;
import static net.osmand.plus.liveupdates.LiveUpdatesSettingsDialogFragmentNew.getActivePrimaryColorId;
-import static net.osmand.plus.monitoring.TripRecordingBottomSheetFragment.getSecondaryIconColorId;
+import static net.osmand.plus.monitoring.TripRecordingBottomSheet.getSecondaryIconColorId;
public class BooleanPreferenceBottomSheet extends BasePreferenceBottomSheet {
diff --git a/OsmAnd/src/net/osmand/plus/track/TrackAppearanceFragment.java b/OsmAnd/src/net/osmand/plus/track/TrackAppearanceFragment.java
index 8b1f5fb09b..7329c58105 100644
--- a/OsmAnd/src/net/osmand/plus/track/TrackAppearanceFragment.java
+++ b/OsmAnd/src/net/osmand/plus/track/TrackAppearanceFragment.java
@@ -36,8 +36,8 @@ import net.osmand.plus.dialogs.GpxAppearanceAdapter;
import net.osmand.plus.dialogs.GpxAppearanceAdapter.AppearanceListItem;
import net.osmand.plus.dialogs.GpxAppearanceAdapter.GpxAppearanceAdapterType;
import net.osmand.plus.helpers.AndroidUiHelper;
-import net.osmand.plus.monitoring.TripRecordingBottomSheetFragment;
-import net.osmand.plus.monitoring.TripRecordingStartingBottomSheetFragment;
+import net.osmand.plus.monitoring.TripRecordingBottomSheet;
+import net.osmand.plus.monitoring.TripRecordingStartingBottomSheet;
import net.osmand.plus.routepreparationmenu.cards.BaseCard;
import net.osmand.plus.routepreparationmenu.cards.BaseCard.CardListener;
import net.osmand.plus.settings.backend.CommonPreference;
@@ -64,7 +64,7 @@ import static net.osmand.plus.dialogs.ConfigureMapMenu.CURRENT_TRACK_COLOR_ATTR;
import static net.osmand.plus.dialogs.GpxAppearanceAdapter.TRACK_WIDTH_BOLD;
import static net.osmand.plus.dialogs.GpxAppearanceAdapter.TRACK_WIDTH_MEDIUM;
import static net.osmand.plus.dialogs.GpxAppearanceAdapter.getAppearanceItems;
-import static net.osmand.plus.monitoring.TripRecordingBottomSheetFragment.UPDATE_TRACK_ICON;
+import static net.osmand.plus.monitoring.TripRecordingBottomSheet.UPDATE_TRACK_ICON;
public class TrackAppearanceFragment extends ContextMenuScrollFragment implements CardListener, ColorPickerListener {
@@ -398,10 +398,10 @@ public class TrackAppearanceFragment extends ContextMenuScrollFragment implement
@Override
public void onContextMenuDismiss(@NonNull ContextMenuFragment fragment) {
Fragment target = getTargetFragment();
- if (target instanceof TripRecordingStartingBottomSheetFragment) {
- ((TripRecordingStartingBottomSheetFragment) target).show();
- } else if (target instanceof TripRecordingBottomSheetFragment) {
- ((TripRecordingBottomSheetFragment) target).show(UPDATE_TRACK_ICON);
+ if (target instanceof TripRecordingStartingBottomSheet) {
+ ((TripRecordingStartingBottomSheet) target).show();
+ } else if (target instanceof TripRecordingBottomSheet) {
+ ((TripRecordingBottomSheet) target).show(UPDATE_TRACK_ICON);
}
}
From 7c9bdb70f124064fefed7f8945b906cd70be1953 Mon Sep 17 00:00:00 2001
From: cepprice
Date: Tue, 23 Mar 2021 12:13:00 +0500
Subject: [PATCH 087/103] Fix 'Open track' button of newly created Waypoint
---
.../plus/mapcontextmenu/editors/WptPtEditorFragmentNew.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/WptPtEditorFragmentNew.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/WptPtEditorFragmentNew.java
index 0e583392ba..88052adf4e 100644
--- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/WptPtEditorFragmentNew.java
+++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/WptPtEditorFragmentNew.java
@@ -213,6 +213,7 @@ public class WptPtEditorFragmentNew extends PointEditorFragmentNew {
String description = Algorithms.isEmpty(getDescriptionTextValue()) ? null : getDescriptionTextValue();
if (editor.isNew()) {
doAddWpt(name, category, description);
+ wpt = getWpt();
} else {
doUpdateWpt(name, category, description);
}
@@ -222,7 +223,7 @@ public class WptPtEditorFragmentNew extends PointEditorFragmentNew {
}
MapContextMenu menu = mapActivity.getContextMenu();
- if (menu.getLatLon() != null && menu.isActive()) {
+ if (menu.getLatLon() != null && menu.isActive() && wpt != null) {
LatLon latLon = new LatLon(wpt.getLatitude(), wpt.getLongitude());
if (menu.getLatLon().equals(latLon)) {
menu.update(latLon, new WptLocationPoint(wpt).getPointDescription(mapActivity), wpt);
From 63b588d0b1490d52e5b801df0add77e4cf12ad23 Mon Sep 17 00:00:00 2001
From: cepprice
Date: Tue, 23 Mar 2021 12:36:50 +0500
Subject: [PATCH 088/103] Notify that track waypoint group is hidden
---
.../editors/WptPtEditorFragmentNew.java | 19 ++++++++++++++++++-
.../osmand/plus/track/TrackMenuFragment.java | 3 +++
.../osmand/plus/track/TrackPointsCard.java | 10 +++++++---
3 files changed, 28 insertions(+), 4 deletions(-)
diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/WptPtEditorFragmentNew.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/WptPtEditorFragmentNew.java
index 88052adf4e..11eaa90bbd 100644
--- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/WptPtEditorFragmentNew.java
+++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/WptPtEditorFragmentNew.java
@@ -20,6 +20,7 @@ import net.osmand.data.FavouritePoint.BackgroundType;
import net.osmand.data.LatLon;
import net.osmand.data.WptLocationPoint;
import net.osmand.plus.GpxSelectionHelper;
+import net.osmand.plus.GpxSelectionHelper.SelectedGpxFile;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R;
import net.osmand.plus.UiUtilities;
@@ -403,7 +404,9 @@ public class WptPtEditorFragmentNew extends PointEditorFragmentNew {
}
@Override
- public String getAddressInitValue() { return ""; }
+ public String getAddressInitValue() {
+ return "";
+ }
@Override
public Drawable getNameIcon() {
@@ -481,6 +484,20 @@ public class WptPtEditorFragmentNew extends PointEditorFragmentNew {
return 0;
}
+ @Override
+ protected boolean isCategoryVisible(String name) {
+ WptPtEditor editor = getWptPtEditor();
+ if (selectedGpxHelper == null || editor == null || editor.getGpxFile() == null) {
+ return true;
+ }
+ SelectedGpxFile selectedGpxFile = selectedGpxHelper.getSelectedFileByPath(editor.getGpxFile().path);
+ if (selectedGpxFile != null) {
+ Set hiddenGroups = selectedGpxFile.getHiddenGroups();
+ return !hiddenGroups.contains(name);
+ }
+ return true;
+ }
+
private void saveGpx(final OsmandApplication app, final GPXFile gpxFile, final boolean gpxSelected) {
new SaveGpxAsyncTask(new File(gpxFile.path), gpxFile, new SaveGpxListener() {
@Override
diff --git a/OsmAnd/src/net/osmand/plus/track/TrackMenuFragment.java b/OsmAnd/src/net/osmand/plus/track/TrackMenuFragment.java
index bb738a8e00..45a30465f0 100644
--- a/OsmAnd/src/net/osmand/plus/track/TrackMenuFragment.java
+++ b/OsmAnd/src/net/osmand/plus/track/TrackMenuFragment.java
@@ -1250,6 +1250,9 @@ public class TrackMenuFragment extends ContextMenuScrollFragment implements Card
if (mapActivity != null) {
FragmentManager fragmentManager = mapActivity.getSupportFragmentManager();
fragmentManager.beginTransaction().show(this).commit();
+ if (pointsCard != null && menuType == TrackMenuType.POINTS) {
+ pointsCard.updateGroups();
+ }
}
} catch (Exception e) {
log.error(e);
diff --git a/OsmAnd/src/net/osmand/plus/track/TrackPointsCard.java b/OsmAnd/src/net/osmand/plus/track/TrackPointsCard.java
index 7af804ef84..95cd54364c 100644
--- a/OsmAnd/src/net/osmand/plus/track/TrackPointsCard.java
+++ b/OsmAnd/src/net/osmand/plus/track/TrackPointsCard.java
@@ -114,6 +114,12 @@ public class TrackPointsCard extends BaseCard implements OnChildClickListener, O
this.selectedGroup = selectedGroup;
}
+ public void updateGroups() {
+ selectedItems.clear();
+ selectedGroups.clear();
+ adapter.synchronizeGroups(getDisplayGroups());
+ }
+
public List getGroups() {
return adapter.groups;
}
@@ -263,9 +269,7 @@ public class TrackPointsCard extends BaseCard implements OnChildClickListener, O
@Override
public void onPointsDeleted() {
- selectedItems.clear();
- selectedGroups.clear();
- adapter.synchronizeGroups(getDisplayGroups());
+ updateGroups();
}
public void filter(String text) {
From 1b0b76d5b2868f7544f237b525408c512ce57686 Mon Sep 17 00:00:00 2001
From: Vitaliy
Date: Tue, 23 Mar 2021 11:13:22 +0200
Subject: [PATCH 089/103] Small fix
---
OsmAnd/src/net/osmand/plus/track/TrackMenuFragment.java | 3 ---
.../net/osmand/plus/views/AddGpxPointBottomSheetHelper.java | 1 +
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/OsmAnd/src/net/osmand/plus/track/TrackMenuFragment.java b/OsmAnd/src/net/osmand/plus/track/TrackMenuFragment.java
index 45a30465f0..bb738a8e00 100644
--- a/OsmAnd/src/net/osmand/plus/track/TrackMenuFragment.java
+++ b/OsmAnd/src/net/osmand/plus/track/TrackMenuFragment.java
@@ -1250,9 +1250,6 @@ public class TrackMenuFragment extends ContextMenuScrollFragment implements Card
if (mapActivity != null) {
FragmentManager fragmentManager = mapActivity.getSupportFragmentManager();
fragmentManager.beginTransaction().show(this).commit();
- if (pointsCard != null && menuType == TrackMenuType.POINTS) {
- pointsCard.updateGroups();
- }
}
} catch (Exception e) {
log.error(e);
diff --git a/OsmAnd/src/net/osmand/plus/views/AddGpxPointBottomSheetHelper.java b/OsmAnd/src/net/osmand/plus/views/AddGpxPointBottomSheetHelper.java
index f525c60fbd..d5da3f9c6d 100644
--- a/OsmAnd/src/net/osmand/plus/views/AddGpxPointBottomSheetHelper.java
+++ b/OsmAnd/src/net/osmand/plus/views/AddGpxPointBottomSheetHelper.java
@@ -147,6 +147,7 @@ public class AddGpxPointBottomSheetHelper implements OnDismissListener {
private void onClose() {
TrackMenuFragment fragment = mapActivity.getTrackMenuFragment();
if (fragment != null) {
+ fragment.updateContent();
fragment.show();
} else {
TrackMenuFragment.openTrack(mapActivity, new File(newGpxPoint.getGpx().path), null);
From fef3af8e5f9ddcc304fccd5b3212de52ddaadce0 Mon Sep 17 00:00:00 2001
From: Vitaliy
Date: Tue, 23 Mar 2021 11:28:47 +0200
Subject: [PATCH 090/103] Fix current track
---
.../mapcontextmenu/editors/WptPtEditorFragmentNew.java | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/WptPtEditorFragmentNew.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/WptPtEditorFragmentNew.java
index 11eaa90bbd..827151a691 100644
--- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/WptPtEditorFragmentNew.java
+++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/WptPtEditorFragmentNew.java
@@ -27,9 +27,9 @@ import net.osmand.plus.UiUtilities;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.activities.SavingTrackHelper;
import net.osmand.plus.base.PointImageDrawable;
+import net.osmand.plus.itinerary.ItineraryGroup;
import net.osmand.plus.mapcontextmenu.MapContextMenu;
import net.osmand.plus.mapcontextmenu.editors.WptPtEditor.OnDismissListener;
-import net.osmand.plus.itinerary.ItineraryGroup;
import net.osmand.plus.track.SaveGpxAsyncTask;
import net.osmand.plus.track.SaveGpxAsyncTask.SaveGpxListener;
import net.osmand.util.Algorithms;
@@ -490,7 +490,12 @@ public class WptPtEditorFragmentNew extends PointEditorFragmentNew {
if (selectedGpxHelper == null || editor == null || editor.getGpxFile() == null) {
return true;
}
- SelectedGpxFile selectedGpxFile = selectedGpxHelper.getSelectedFileByPath(editor.getGpxFile().path);
+ SelectedGpxFile selectedGpxFile;
+ if (editor.getGpxFile().showCurrentTrack) {
+ selectedGpxFile = app.getSavingTrackHelper().getCurrentTrack();
+ } else {
+ selectedGpxFile = selectedGpxHelper.getSelectedFileByPath(editor.getGpxFile().path);
+ }
if (selectedGpxFile != null) {
Set hiddenGroups = selectedGpxFile.getHiddenGroups();
return !hiddenGroups.contains(name);
From 509bf2b8b21d69d00c3158b4ebf4ee8e9f805338 Mon Sep 17 00:00:00 2001
From: Shjosan
Date: Tue, 23 Mar 2021 14:21:56 +0000
Subject: [PATCH 091/103] Translated using Weblate (Swedish)
Currently translated at 68.9% (2542 of 3688 strings)
---
OsmAnd/res/values-sv/strings.xml | 210 +++++++++++++++++++++----------
1 file changed, 142 insertions(+), 68 deletions(-)
diff --git a/OsmAnd/res/values-sv/strings.xml b/OsmAnd/res/values-sv/strings.xml
index 0dd3173583..c84d961139 100644
--- a/OsmAnd/res/values-sv/strings.xml
+++ b/OsmAnd/res/values-sv/strings.xml
@@ -84,7 +84,8 @@
Välj animerad ruttacceleration
Allokerat minne %1$s MB (Android-gräns %2$s MB, Dalvik %3$s MB).
Allokerat minne
- Totalt inbyggt minne allokerat av appen %1$s MB (Dalvik %2$s MB, övrigt %3$s MB). Proportionellt minne %4$s MB (Android-gräns %5$s MB, Dalvik %6$s MB).
+ Totalt inbyggt minne allokerat av appen %1$s MB (Dalvik %2$s MB, övrigt %3$s MB).
+\nProportionellt minne %4$s MB (Android-gräns %5$s MB, Dalvik %6$s MB).
Totalt inbyggt minne
Startpunkten ligger för långt från närmaste väg.
Delad plats
@@ -165,9 +166,8 @@
em
fm
Parkeringsplats
- Modulen Parkeringsplats hjälper dig att hålla reda på var din bil är parkerad och vid behov hur mycket parkeringstid det är kvar.
-
-Du hittar din parkeringsplats och -tid på instrumentbrädan och i widgeten på kartskärmen. Du kan lägga till ett larm i kalendern som en påminnelse.
+ Låter dig spara var din bil är parkerad, inklusive hur mycket parkeringstid som finns kvar.
+\nBåde plats och tid är synliga både på instrumentpanelen och i en kartwidget. En larmpåminnelse kan läggas till i Android-kalendern.
Parkeringsplats
Markera som parkeringsplats
Ta bort P-markering
@@ -192,11 +192,11 @@ Du hittar din parkeringsplats och -tid på instrumentbrädan och i widgeten på
Online-kartor och kartrutor
Använd online-kartor (hämta och cacha kartbitar på SD-kortet).
Konfigurera online- eller cachade källor för kartbitar.
- "Med denna modul får man tillgång till många typer av online-kartor, från fördefinierade Openstreetmap-rutor (som Mapnik) till satellitbilder och speciella lager såsom väderkartor, klimatkartor, geologiska kartor, reliefkartor o.s.v.
+ Med denna modul får man tillgång till många typer av online-kartor, från fördefinierade Openstreetmap-rutor (som Mapnik) till satellitbilder och speciella lager såsom väderkartor, klimatkartor, geologiska kartor, reliefkartor o.s.v.
\n
-\nDessa kartor kan användas antingen som huvudkarta (baskarta) och visas på kartskärmen i OsmAnd eller som ett över- eller underlägg till en annan baskarta (som OsmAnds vanliga offline-kartor). För att göra en underliggande karta tydligare kan vissa element i OsmAnds vektorkartor lätt döljas via menyn \'Konfigurera karta\'.
+\nDessa kartor kan användas antingen som huvudkarta (baskarta) och visas på kartskärmen i OsmAnd eller som ett över- eller underlägg till en annan baskarta (som OsmAnds vanliga offline-kartor). För att göra en underliggande karta tydligare kan vissa element i OsmAnds vektorkartor lätt döljas via menyn \'Konfigurera karta\'.
\n
-\nKartbitar (tile maps) kan hämtas direkt på nätet eller förberedas för användning frånkopplad (och kopieras manuellt till OsmAnds datamapp) som en SQLite-databas som kan skapas med olika tredjepartsverktyg. "
+\nKartbitar (tile maps) kan hämtas direkt på nätet eller förberedas för användning frånkopplad (och kopieras manuellt till OsmAnds datamapp) som en SQLite-databas som kan skapas med olika tredjepartsverktyg.
Visa inställningarna för att aktivera spårning och navigering i bakgrundsläge (skärm av) genom att periodvis väcka GPS-enheten.
Denna modul visar inställningarna för utvecklings- och felsökningsfunktioner som rutt-testning och -simulering eller visning av renderingsprestanda eller röststyrning. Dessa inställningar är avsedda för utvecklare och behövs inte för den vanliga användaren.
Hantera insticksmoduler
@@ -208,19 +208,33 @@ Du hittar din parkeringsplats och -tid på instrumentbrädan och i widgeten på
Din parkerade bils plats. %1$s
Insticksmoduler aktiverar avancerade inställningar samt ger ytterligare funktionalitet.
Insticksmoduler
- "Med denna modul kan OsmAnd användas för att göra bidrag till OSM såsom skapa eller modifiera OSM POI-objekt, öppna eller kommentera OSM-anteckningar, och bidra med inspelade GPX-filer. OSM är ett globalt kartprojekt inom public domain, För mer info, se https://openstreetmap.org. Aktivt deltagande uppskattas och bidrag kan göras direkt från OsmAnd om du anger dina autentiseringsuppgifter till OSM i appen."
+ Ge OSM-bidrag som att skapa eller modifiera OSM POI-objekt, öppna eller kommentera OSM-anteckningar och bidra med inspelade GPX-filer i OsmAnd genom att ange ditt användarnamn och lösenord. OpenStreetMap.org är ett community-driven, globalt kartläggningsprojekt för allmän domän.
Vektorkartor ritas sannolikt upp snabbare. Fungerar kanske inte så bra på vissa enheter.
Spela upp kommandon med vald röst
Test av röstmeddelanden
Det finns ingen offline vektorkarta för den här platsen. Du kan hämta en i Inställningar (Hantera kartfiler) eller byta till online-kartor (aktivera modulen för online-kartor för detta).
- "OsmAnd (Open Street Maps Automated Navigation Directions)
-\n
-\nOsmAnd är ett öppen källkodsprogram med tillgång till ett brett utbud av global OpenStreetMap-data. Alla kartdata (vektor- eller rasterkartor) kan lagras i telefonens minneskort för offlineanvändning. OsmAnd erbjuder även navigering offline och online, inklusive röstguidning. Några av de viktigaste funktionerna: - Komplett offline-funktionalitet (lagra nedladdade vektorkartor eller kartbitar på enheten) - Kompakta offline-vektorkartor för hela världen finns tillgängliga - Nedladdning av land- eller regionkartor direkt från appen - Överlägg av flera kartlager möjligt, som GPX- eller navigationsspår, sevärdheter, favoriter, höjddata, offentliga hållplatser, extra kartor med anpassningsbara transparens - Sökning offline efter adresser och platser (POIs) - Offline-dirigering för medellånga sträckor (experimentell) - Bil-, cykel- och fotgängarlägen med: - Tillval automatisk växling mellan dag- och nattvisning - Tillval hastighetsberoende zoomning - Valfri inställningen enligt kompass eller färdriktningen - Frivillig körfältsvägledning, visning av hastighetsgräns, inspelade röster samt TTS-röster
-\n
-\nBegränsningar i denna gratisversion av OsmAnd: - Antalet hämtningar av kartor är begränsat - Ingen tillgång till Wikipedia offline POIs
-\n
-\nOsmAnd utvecklas aktivt och vårt projekt och dess fortsatta framsteg bygger på ekonomiska bidrag för att finansiera utveckling och testning av ny funktionalitet. Vänligen överväg att köpa OsmAnd+, finansiera specifika nya funktioner eller göra en allmän donation på osmand.net.
-\n "
+ OsmAnd (OSM Automated Navigation Directions)
+\n
+\nOsmAnd är en programvara för öppen källkodsnavigering med tillgång till ett stort antal globala OSM-data. Alla kartdata (vektor- eller brickor) kan lagras på telefonens minneskort för offline-användning. Offline- och online-dirigeringsfunktioner erbjuds också, inklusive röstvägledning för sväng.
+\n
+\nNågra av kärnfunktionerna:
+\n- Komplett offline-funktionalitet (lagra nedladdad vektor eller kakelkartor i enhetens lagring)
+\n- Kompakta offlinevektorkartor för hela världen
+\n- Ladda ner land- eller regionkartor direkt från appen
+\n- Överlagring av flera kartlager möjliga, som GPX eller navigationsspår, intressanta platser, favoriter, konturlinjer, kollektivtrafikstopp, ytterligare kartor med anpassningsbar transparens
+\n- Offline sökning efter adresser och platser (POI)
+\n- Offline-dirigering för medelstora avstånd
+\n- Lägen för bil, cykel och fotgängare med tillval:
+\n- Automatisk växling mellan dag och natt
+\n- Hastighetsberoende kartzoomning
+\n- Kartinriktning enligt kompass eller rörelseriktning
+\n- Fältvägledning, hastighetsgränsvisning, inspelade och text-till-tal-röster
+\n
+\nBegränsningar av denna gratisversion av OsmAnd:
+\n- Antalet nedladdningar av kartor begränsat
+\n- Ingen offlineåtkomst till Wikipedia-intressepunkter
+\n
+\nOsmAnd utvecklas aktivt och vårt projekt och dess fortsatta framsteg är beroende av ekonomiska bidrag för utveckling och testning av ny funktionalitet. Överväg att köpa OsmAnd +, eller finansiera specifika nya funktioner eller göra en allmän donation på https://osmand.net.
Inbyggd rendering
Support
Ge stöd till nya funktioner
@@ -297,9 +311,8 @@ Du hittar din parkeringsplats och -tid på instrumentbrädan och i widgeten på
Bakgrundsläge
OsmAnd körs i bakgrunden medan skärmen är avstängd.
Det finns inte tillräckligt med ledigt utrymme för att hämta %1$s MB (ledigt: %2$s).
- Hämta {0} fil(er)?
-Nyttjat utrymme är {1} MB.
-(Tillgängligt utrymme är {2} MB.)
+ Hämta {0} fil(er)\?
+\n{1} MB (av {2} MB) kommer att användas.
Genomskinligt tema
Inbyggt bibliotek stöds inte på den här enheten.
Initierar inbyggt bibliotek …
@@ -382,7 +395,7 @@ Nyttjat utrymme är {1} MB.
Packar upp nya data …
En online-navigeringstjänst är vald men ingen internetanslutning är tillgänglig.
Språket stöds inte
- Det valda språket stöds inte av den installerade Android TTS (text-till-tal)-motorn. Vill du söka efter en annan TTS-motor på Market? Annars kommer det förinställda TTS-språket att användas.
+ Det valda språket stöds inte av Android TTS (text-till-tal) -motorn installerad, dess förinställda TTS-språk används istället. Leta efter en annan TTS-motor i butiken\?
Data saknas
Inga data för det valda språket är installerade. Vill du besöka Google Play för att installera?
Omvänd GPX-riktning
@@ -701,7 +714,7 @@ Nyttjat utrymme är {1} MB.
Sök efter fler byar/postnummer
Välj när du vill visa kartor som endast har vägar:
Kartor med enbart vägar
- "Vägar "
+ Bara vägar
Standardkartor
Karta med enbart vägar
Kör appen i felsäkert läge (för långsammare Android istället för intern kod).
@@ -783,9 +796,9 @@ Nyttjat utrymme är {1} MB.
Inställningar för ljud och video
Ett fel uppstod under inspelningen
Ingen kamera tillgänglig
- "Denna modul erbjuder överlägg med höjdkurvor som kan visas i kombination med OsmAnds standardkartor. Denna funktion kommer att uppskattas av idrottsmän, vandrare och alla som är intresserade av höjdskillnader i landskapet.
-\n
-\nDessa globala data (mellan 70 grader norr och 70 grader syd) baseras på mätningar av SRTM (Shuttle Radar Topography Mission) och ASTER (Advanced Spaceborne Thermal Emission and Reflection Radiometer), ett bildinstrument ombord Terra, flaggskeppet i NASA:s Earth Observing System. ASTER är ett samprojekt mellan NASA, Japans Ministry of Economy, Trade and Industry (METI), and Japan Space Systems (J-spacesystems). "
+ Denna modul erbjuder överlägg med höjdkurvor som kan visas i kombination med OsmAnds standardkartor. Denna funktion kommer att uppskattas av idrottsmän, vandrare och alla som är intresserade av höjdskillnader i landskapet.
+\n
+\nDessa globala data (mellan 70 grader norr och 70 grader syd) baseras på mätningar av SRTM (Shuttle Radar Topography Mission) och ASTER (Advanced Spaceborne Thermal Emission and Reflection Radiometer), ett bildinstrument ombord Terra, flaggskeppet i NASA:s Earth Observing System. ASTER är ett samprojekt mellan NASA, Japans Ministry of Economy, Trade and Industry (METI), and Japan Space Systems (J-spacesystems).
Ta bort destination
Mellanliggande destination %1$s
Online Nominatim
@@ -874,11 +887,11 @@ Nyttjat utrymme är {1} MB.
Föredra motorvägar.
markerad
ej markerad
- Välj vid användning
+ På förfrågan\?
Aktivera Trippinspelningspluginen för att använda positionsloggningstjänster (GPX-loggning, online-spårning)
- "Denna modul erbjuder både ett överlägg med konturlinjer och ett höjdkurvslager som kan visas ovanpå OsmAnds offline-kartor. Denna funktion kommer att uppskattas av idrottsmän, vandrare och alla som är intresserade av höjdskillnader i landskapet.
+ Denna modul erbjuder både ett överlägg med konturlinjer och ett höjdkurvslager som kan visas ovanpå OsmAnds offline-kartor. Denna funktion kommer att uppskattas av idrottsmän, vandrare och alla som är intresserade av höjdskillnader i landskapet.
\n
-\nDessa globala data (mellan 70 grader norr och 70 grader syd) är baserade på SRTM (Shuttle Radar Topography Mission) och ASTER (Advanced Spaceborne Thermal Emission and Reflection Radiometer), ett bildinstrument på Terra, NASA:s Earth Observing Systems satellit. ASTER är ett samarbete mellan NASA, Japans finansdepartement, Trade and Industry (METI) och Japan Space Systems (J-spacesystems). "
+\nDessa globala data (mellan 70 grader norr och 70 grader syd) är baserade på SRTM (Shuttle Radar Topography Mission) och ASTER (Advanced Spaceborne Thermal Emission and Reflection Radiometer), ett bildinstrument på Terra, NASA:s Earth Observing Systems satellit. ASTER är ett samarbete mellan NASA, Japans finansdepartement, Trade and Industry (METI) och Japan Space Systems (J-spacesystems).
Ankomsttid
OpenMaps EU
Skuggad relief-lager
@@ -892,7 +905,7 @@ Nyttjat utrymme är {1} MB.
%1$d filer kvar
Du har %1$d filer kvar att hämta
Fullversion
- Avbryt rutten
+ Avbryt rutten\?
Avbryt navigeringen
Ta bort destinationen
Wi-Fi är för tillfället inte anslutet. Vill du hämta med din nuvarande anslutning till Internet?
@@ -1218,9 +1231,9 @@ Nyttjat utrymme är {1} MB.
Närbelägna intresssepunkter
Rundturer
Alla
- "Denna modul aktiverar funktionen att antingen spela in och spara dina spår genom att du trycker på widgeten GPX-loggning på kartskärmen eller att alla dina rutter sparas automatiskt i en GPX-fil.
+ Denna modul aktiverar funktionen att antingen spela in och spara dina spår genom att du trycker på widgeten GPX-loggning på kartskärmen eller att alla dina rutter sparas automatiskt i en GPX-fil.
\n
-\nInspelade spår kan delas ut till vänner eller användas som bidrag till OSM. Idrottsmän kan använda inspelade spår för att följa sin träning. Viss grundläggande spåranalys kan göras direkt i OsmAnd, såsom varvtider, genomsnittshastighet o.s.v. och spår kan givetvis också analyseras i efterhand i speciella analysverktyg från tredje part. "
+\nInspelade spår kan delas ut till vänner eller användas som bidrag till OSM. Idrottsmän kan använda inspelade spår för att följa sin träning. Viss grundläggande spåranalys kan göras direkt i OsmAnd, såsom varvtider, genomsnittshastighet o.s.v. och spår kan givetvis också analyseras i efterhand i speciella analysverktyg från tredje part.
Inspelning av resa
h
Längd
@@ -1279,7 +1292,7 @@ Nyttjat utrymme är {1} MB.
Alla filer är uppdaterade
Använd OpenGL-rendering
Använd hårdvaruaccelererad OpenGL-rendering (fungerar kanske inte på vissa enheter).
- Kan inte hämta; kontrollera din internetsanslutning.
+ Kan inte hämta, kontrollera din internetsanslutning.
Vägtyp
Standard
Brandgul
@@ -1349,13 +1362,20 @@ Nyttjat utrymme är {1} MB.
\nEn kartfil som innehåller alla nautiska symboler globalt finns tillgänglig som en enda nedladdning med namnet \'World seamarks\'.
\n
\nDenna vy kan ändras genom att antingen inaktivera den här igen eller genom att ändra kartstilen under Konfigurera kartor.
- "Om du aktiverar denna vy ändras kartstilen till Vinter och skidor, och visar landskapet i vinterskrud.
-\n\nEn global karta med alla pister och längdskidspår i denna vy finns tillgänglig under Alla kartor som \'World ski map\'.
-\n\nDenna vy kan ändras genom att antingen inaktivera den här igen eller genom att ändra kartstilen under Konfigurera kartor. "
- "Om du aktiverar denna vy ändras kartan till \'Vägkartsvy\', som är en speciell vy med mycket detaljer för resenärer och yrkesförare.
-\n\nDenna vy ger, vid varje zoomnivå, maximalt antal detaljer som är tillgängliga i kartdatat (speciellt vägar, stigar och orienteringsmärken).\n\nDen visar också alla vägtyper på ett mycket tydligt sätt via färgkoder något som är användbart t.ex vid framförande av stora fordon.
-\n\nOch den erbjuder också speciella alternativ såsom visning av cykelrutter eller rutter i Alperna.\n\nIngen speciell hämtning av någon karta krävs; denna vy skapas med våra standardkartor.
-\n\nDenna vy kan ändras genom att antingen inaktivera den här igen eller genom att ändra kartstilen under Konfigurera kartor. "
+ Detta plugin för OsmAnd ger dig detaljer om globala utförsåkning, längdskidspår, alpina skidvägar, linbanor och skidliftar. Rutter och pister visas färgkodade av svårigheter och avbildas i en speciell \"vinter\" -stil som liknar ett snöfärgat vinterlandskap.
+\n
+\nOm du aktiverar den här vyn ändras kartstilen till \"Vinter och skidor\" och visar alla landskapsfunktioner under vinterförhållanden. Denna vy kan återställas genom att antingen avaktivera den igen här, eller genom att ändra \'Kartstil\' under \'Konfigurera karta\' efter önskemål.
+ Om du aktiverar denna vy ändras kartan till \'Vägkartsvy\', som är en speciell vy med mycket detaljer för resenärer och yrkesförare.
+\n
+\nDenna vy ger, vid varje zoomnivå, maximalt antal detaljer som är tillgängliga i kartdatat (speciellt vägar, stigar och orienteringsmärken).
+\n
+\nDen visar också alla vägtyper på ett mycket tydligt sätt via färgkoder något som är användbart t.ex vid framförande av stora fordon.
+\n
+\nOch den erbjuder också speciella alternativ såsom visning av cykelrutter eller rutter i Alperna.
+\n
+\nIngen speciell hämtning av någon karta krävs; denna vy skapas med våra standardkartor.
+\n
+\nDenna vy kan ändras genom att antingen inaktivera den här igen eller genom att ändra kartstilen under Konfigurera kartor.
Plats:\n Lat %1$s\n Lon %2$s
Vägkartsvy
dagar efter
@@ -1423,7 +1443,7 @@ Nyttjat utrymme är {1} MB.
Simulera din plats
Platt lista
Lat %1$s
-Long %2$s
+\nLong %2$s
Frågor och svar, nyliga förändringar och annat.
Navigeringsinställningar
Allmänna inställningar
@@ -1495,7 +1515,7 @@ Long %2$s
Du håller på att ta bort %1$d anteckningar. Är du säker?
Wikipedia
Importera till OsmAnd
- Platstjänsten är inte aktiverad. Vill du slå på den?
+ Platstjänsten är av. Vill du slå på den\?
Du har gamla och inkompatibla data från Wikipedia. Vill du arkivera dem?
Hämta ytterligare data från Wikipedia (%1$s MB)?
Volapük
@@ -1611,7 +1631,7 @@ Long %2$s
Meter per sekund
Minuter per kilometer
Minuter per mile
- Sjömil i timmen (knop)
+ Sjömil per timme (knop)
Inspelning av resa
Navigering
Körs i bakgrunden
@@ -1619,7 +1639,7 @@ Long %2$s
Välj kategori
Antal rader
di
- nmi/h
+ M
min/mi
min/km
m/s
@@ -1746,7 +1766,7 @@ Long %2$s
Avstånd:
Tid:
Appen har inte tillåtelse att använda SD-kortet
- Appen har inte tillräckliga behörigheter för att komma åt platsdata.
+ Appen saknar behörigheter för att komma åt platsdata.
Appen har inte tillräckliga behörigheter för att komma åt kameran.
Appen har inte tillräckliga behörigheter för att komma åt mikrofonen.
Välj röstvägledning
@@ -1807,9 +1827,10 @@ Long %2$s
Verktygsfält
Widgetar
Inte tillräckligt med utrymme!
-Detta skulle kräva {3} MB temporärt och {1} MB permanent.
-Tillgängligt utrymme är blott {2} MB.
- Hämta {0} fil(er)? Nyttjat utrymme är {3} MB temporärt och {1} MB permanent. (Tillgängligt utrymme är {2} MB.)
+\n{3} MB temporärt och {1} MB permanent.
+\n(Bara {2} MB tillgängligt.)
+ Hämta {0} fil(er)\?
+\n{3} MB används temporärt och {1} MB permanent. (Av{2} MB.)
Ladda upp OSM-anteckning
Ladda upp anonymt
Välj kartmarkör
@@ -1879,8 +1900,8 @@ Tillgängligt utrymme är blott {2} MB.
Nu har appen tillåtelse att skriva till extern lagringsplats. En manuell omstart av appen krävs.
Stödregion
Denna prenumeration aktiverar uppdateringar varje timme av kartor runt omkring i världen.
-En del av inkomsterna går tillbaka till OSM-gemenskapen och betalas ut för varje OSM-bidrag.
-Om du tycker om OsmAnd och OSM och vill stödja dem så är detta ett utmärkt sätt att göra det på.
+\nEn del av inkomsterna går tillbaka till OSM-gemenskapen och betalas ut för varje OSM-bidrag.
+\nOm du tycker om OsmAnd och OSM och vill stödja och stödjas av dem så är detta ett utmärkt sätt att göra det på.
Destinationen är inte fastställd
Magnetisk bäring
Klipplängd
@@ -1936,7 +1957,7 @@ Om du tycker om OsmAnd och OSM och vill stödja dem så är detta ett utmärkt s
Ta bort filter
Nytt filter
Ange ett namn på det nya filtret. Det kommer att läggas till på fliken ’Kategorier’.
- "Transkribera om %1$s namn saknas"
+ Transkribera om %1$s namn saknas
Hoppa över nerladdning av kartor
Välj en annan region
Obegränsade nedladdningar av kartor, uppdateringar och Wikipedia-plugin.
@@ -1960,7 +1981,7 @@ Om du tycker om OsmAnd och OSM och vill stödja dem så är detta ett utmärkt s
Donation till OpenStreetMap-gemenskapen
Skaffa det
Skaffa för %1$s
- "Du har inte några offline-kartor installerade. Du kan välja en karta från listan eller hämta kartor senare via \'Meny - %1$s\'."
+ Du har inte några offline-kartor installerade. Du kan välja en karta från listan eller hämta kartor senare via \'Meny - %1$s\'.
Söker efter kartor …
Erhåll vägbeskrivningar och upptäck nya platser utan Internetuppkoppling
Sök efter min plats
@@ -2047,7 +2068,7 @@ Om du tycker om OsmAnd och OSM och vill stödja dem så är detta ett utmärkt s
Ogiltig OLC
\n
Kort OLC
-Vänligen tillhandahåll fullständig kod
+\nVänligen tillhandahåll fullständig kod
Filen kan inte flyttas.
Flytta
Spår
@@ -2090,7 +2111,7 @@ Vänligen tillhandahåll fullständig kod
Åtgärdsnamn
Kartöverlägg
Lägg till överlägg
- "Kartöverlägget har ändrats till \"%s\"."
+ Kartöverlägget har ändrats till \"%s\".
Tryck länge och dra knappen för att ändra dess position på skärmen.
Använd höjddata
Visa djupkonturer och punkter.
@@ -2420,7 +2441,9 @@ Vänligen tillhandahåll fullständig kod
Max/Min
Min/Max
Denna väg kan vara för lång tid att beräkna. Lägg till mellanliggande destinationer om inget resultat finns inom 10 minuter.
- "OsmAnd (OSM Automated Navigation Directions) är en kartnavigationsapp med tillgång till gratis, världsomfattande OpenStreetMap (OSM)-data av hög kvalitet. Njut av röstnavigation eller visuell navigation, visning av POI (points of interest - nyttoplatser), att skapa och hantera GPX-spår, visa höjdkurvor och höjdinfo (via plugin), val mellan bil-, cykel-, fotgängar-lägen, OSM-redigering och mycket mer."
+ OsmAnd (OSM Automated Navigation Directions) är en kartnavigationsapp med tillgång till gratis, världsomfattande OpenStreetMap (OSM)-data av hög kvalitet.
+\n
+\nNjut av röstnavigation eller visuell navigation, visning av POI (points of interest - nyttoplatser), att skapa och hantera GPX-spår, visa höjdkurvor och höjdinfo (via plugin), val mellan bil-, cykel-, fotgängar-lägen, OSM-redigering och mycket mer.
GPS-navigering
\n• Välj mellan offline- (inga roaming-avgifter när du är utomlands) eller online-läge a(snabbare)
\n• Steg-för-steg röstguidning leder dig längs vägen (inspelade och genererade röster)
@@ -2442,8 +2465,14 @@ Vänligen tillhandahåll fullständig kod
\n • Låter dig välja hur du vill visa namn på kartan: på svenska, lokala, eller fonetisk stavning
\n • Visar specialiserade online-rutor, satellitvy (från Bing), olika överlägg som tour/navigering GPX-spår och ytterligare lager med anpassningsbar transparens
\n
- Skidåkning OsmAnd skidkartor plugin gör att du kan se skidspår svårighetsgrad och en del kompletterande information, som plats för liftar och andra faciliteter.
- Cykling • Du kan hitta cykelstigar på kartan • GPS-navigering i cykelläge skapar din rutt med hjälp av cykelvägar • Du kan se din hastighet och höjd • Med GPX-inspelningsalternativet kan du spela in din resa och dela den • Via ytterligare plugin kan du aktivera visning av höjdkurvor och höjdrelief
+ Skidåkning
+\nOsmAnd skidkartor plugin gör att du kan se skidspår svårighetsgrad och en del kompletterande information, som plats för liftar och andra faciliteter.
+ Cykling
+\n• Hitta cykelvägar på kartan
+\n• GPS-navigering i cykelläge bygger din rutt med cykelvägar
+\n• Se din hastighet och höjd
+\n• Med GPX-inspelningsalternativ kan du spela in din resa och dela den
+\n• Via ett extra plugin kan du aktivera konturlinjer och backskuggning
Promenader, vandring, stadsrundtur
\n • Kartan visar promenad- och vandringsleder
\n • Wikipedia på ditt föredragna språk kan berätta en hel del under en stadsrundtur
@@ -2458,23 +2487,58 @@ Vänligen tillhandahåll fullständig kod
\n
Rensa alla mellanliggande punkter
Strömsporter
- OsmAnd är open-source och är utvecklas aktivt. Alla kan bidra till appen genom att rapportera buggar, förbättra översättningar eller programmera nya funktioner. Projektet är i ett dynamiskt tillstånd av kontinuerlig förbättring av alla dessa former genom utvecklare och interaktion med användare. Projektet är också beroende av ekonomiska bidrag för att finansiera kodning och testning av nya funktioner. Ungefärlig karttäckning och kvalitet: • Västeuropa: **** • Östeuropa: *** • Ryssland: *** • Nordamerika: *** • Sydamerika: ** • Asien: ** • Japan & Korea: *** • Mellanöstern: ** • Afrika: ** • Antarktis: * De flesta länder runt om i världen finns tillgängliga för hämtning! Få en tillförlitlig navigator i ditt land - det kan vara Tyskland, Frankrike, Mexiko, Storbritannien, Spanien, Nederländerna, USA, Ryssland, Brasilien eller något annat.
- OsmAnd+ (OSM Automated Navigation Directions)
+ OsmAnd är aktivt utvecklad programvara med öppen källkod. Alla kan bidra till appen genom att rapportera fel, förbättra översättningar eller koda nya funktioner. Dessutom bygger projektet på ekonomiska bidrag för att finansiera kodning och testning av nya funktioner.
+\nUngefärlig karttäckning och kvalitet:
+\n• Västeuropa: ****
+\n• Östeuropa: ***
+\n• Ryssland: ***
+\n• Nordamerika: ***
+\n• Sydamerika: **
+\n• Asien: **
+\n• Japan och Korea: ***
+\n• Mellanöstern: **
+\n• Afrika: **
+\n• Antarktis: *
+\nDe flesta länder runt om i världen är tillgängliga för nedladdning!
+\nFå en pålitlig navigatör i ditt land - vare sig det är Frankrike, Tyskland, Mexiko, Storbritannien, Spanien, Nederländerna, USA, Ryssland, Brasilien eller något annat.
+ OsmAnd + (OSM Automated Navigation Directions)
\n
-\nOsmAnd+ är ett open source-navigationsapp med tillgång till ett brett utbud av global OpenStreetMap(OSM)-data. Alla kartdata (vektor- eller rasterkartor) kan sparas på telefonens minneskort för användning offline. OsmAnd erbjuder även offline och online-ruttunktioner, inklusive turn-by-turn röstguidning.
+\nOsmAnd + är en programvara för programvara med öppen källkod för navigering med tillgång till ett stort antal globala OSM-data. Alla kartdata (vektor- eller brickor) kan lagras på telefonens minneskort för offline-användning. Offline- och online-dirigeringsfunktioner erbjuds också, inklusive röstvägledning för sväng.
\n
-\nOsmAnd+ är den betalversionenen av appeb, genom att köpa det stödjer du projektet, finansierar utveckling av nya funktioner, och får de senaste uppdateringarna.
+\nOsmAnd + är den betalda appversionen, genom att köpa den stöder du projektet, finansierar utvecklingen av nya funktioner och får de senaste uppdateringarna.
\n
-\nNågra av de centrala funktionerna: - Komplett offline-funktionalitet (spara vektor- eller rasterkartor i enhetens lagring) - Kompakta offline vektorkartor för hela världen finns tillgängliga - Obegränsad hämtning av land- eller regionkartor direkt från appen - Offline Wikipedia-artiklar (hämta Wikipedia-POI), utmärkt för sightseeing
+\nNågra av kärnfunktionerna:
+\n- Komplett offline-funktionalitet (lagra nedladdad vektor eller kakelkartor i enhetens lagring)
+\n- Kompakta offlinevektorkartor för hela världen
+\n- Obegränsad nedladdning av land- eller regionkartor direkt från appen
+\n- Offline Wikipedia-funktion (ladda ner Wikipedia POI), perfekt för sightseeing
+\n- Överlagring av flera kartlager möjliga, som GPX eller navigationsspår, intressanta platser, favoriter, konturlinjer, kollektivtrafikstopp, ytterligare kartor med anpassningsbar transparens
\n
-\n - Överlagring av flera kartskikt är möjligt, som GPX eller navigeringsspår, Punkter av Intresse, favoriter, höjdkurvor, hållplatser för kollektivtrafiken, fler kartor med anpassningsbar genomskinlighet- Offlinesökning efter adresser och intressepunkter (POI) - Offline routing för mediumdistansavstånd - Bil-, cykel- och fotgängarelägen med: - tillval automatiskt byte av dag/nattläge -
-\n
-\n - Valfri hastighetsbunden kartzoom - valfri kartjustering enligt kompass eller riktning - som tillval körfältsguide, hastighetsgräns visas, inspelade- och TTS-röster
+\n- Offline sökning efter adresser och platser (POI)
+\n- Offline-dirigering för medelstora avstånd
+\n- Lägen för bil, cykel och fotgängare med tillval:
+\n- Automatisk växling mellan dag och natt
+\n- Hastighetsberoende kartzoomning
+\n- Kartinriktning enligt kompass eller rörelseriktning
+\n- Fältvägledning, hastighetsgränsvisning, inspelade och text-till-tal-röster
+\n
Kunde inte hitta något inom:
Lägg till alla spårens vägpunkter, eller välj separata kategorier.
Totalt
- OsmAnd+ (OSM Automated Navigation Directions) är en kartnavigationsapp med tillgång till gratis världsomfattande och högkvalitativa OpenStreetMap (OSM)-data. Njut av röst- och visuell navigation, visning av POI (points of interest - intressepunkter), att skapa och hantera GPX-spår, se höjdkurvor och höjdinfo, välja mellan bil-cykel- och fotgängarlägen, OSM-redigering och mycket mer. OsmAnd+ är en betalversion av appen. Genom att köpa den, stödjer du projektet, finansierar utveckling av nya funktioner, och får de senaste uppdateringarna. Några av de viktigaste funktionerna:
- Navigering • Fungerar på nätet (snabb) eller offline (inga roaming-avgifter när du är utomlands) • Sväng-för-sväng-röstguidning (inspelade och syntetiska röster) • Valfri körfältsguide, gatunamn visas, och beräknad ankomsttid • Stödjer mellanliggande punkter på din resplan • Automatisk omdirigering när du avviker från rutten • Sök platser efter adress eller typ (t ex: restaurang, hotell, bensinstation, museum), eller med geografiska koordinater
+ OsmAnd+ (OSM Automated Navigation Directions) är en kartnavigationsapp med tillgång till gratis världsomfattande och högkvalitativa OSM-data.
+\nNjut av röst- och visuell navigation, visning av POI (points of interest - intressepunkter), att skapa och hantera GPX-spår, se höjdkurvor och höjdinfo, välja mellan bil-cykel- och fotgängarlägen, OSM-redigering och mycket mer.
+\n
+\nOsmAnd+ är en betalversion av appen. Genom att köpa den, stödjer du projektet, finansierar utveckling av nya funktioner, och får de senaste uppdateringarna.
+\n
+\nNågra av de viktigaste funktionerna:
+ Navigering
+\n• Fungerar online (snabbt) eller offline (inga roamingavgifter när du är utomlands)
+\n• Röstvägledning för sväng (inspelade och syntetiserade röster)
+\n• Valfri körvägledning, visning av gatunamn och beräknad ankomsttid
+\n• Stöder mellanliggande poäng på din resplan
+\n• Automatisk omdirigering när du avviker från rutten
+\n• Sök efter platser efter adress, efter typ (t.ex. restaurang, hotell, bensinstation, museum) eller efter geografiska koordinater
+\n
Kartvisning
\n • Visa din position och orientering
\n • Eventuellt justera bilden i förhållande till kompass eller din riktning
@@ -2490,8 +2554,7 @@ Vänligen tillhandahåll fullständig kod
Namnet innehåller för många versaler. Vill du fortsätta?
Knackning på åtgärdsknappen kommer att lägga till en GPX-punkt vid skärmens mitt.
Knackning på åtgärdsknappen kommer att lägga en ljudanteckning vid skärmens mitt.
- Att trycka på denna åtgärdsknapp lägger
-\ntill en videoanteckning mitt på skärmen.
+ Att trycka på denna åtgärdsknapp lägger till en videoanteckning mitt på skärmen.
Knackning på åtgärdsknappen kommer att lägga till en fotoanteckning vid skärmens mitt.
Knackning på åtgärdsknappen kommer att lägga till en OSM-anteckning vid skärmens mitt.
Knackning på åtgärdsknappen kommer att lägga till en Intressepunkt vid skärmens mitt.
@@ -2600,7 +2663,13 @@ Vänligen tillhandahåll fullständig kod
\n• Valfri hastighetsbaserad zoomning
\n• Dela din position så att dina vänner kan hitta dig
\n
- Funktioner för cykel och gående • Se vägar för gående och cyklande samt vandringsstigar, utmärkta för utomhusaktiviteter • Speciella ruttval och visningsläge för cykel och gående • Valfria kollektivtrafiksplatser (buss, spårvagn, tåg) inklusive linjenamn • Valfri reseinspelning till lokal GPX-fil eller onlinetjänst • Valfri visning av hastighet och höjd • Visa konturlinjer och höjdreliefer (via separat plugin)
+ Funktioner för cykel och gående
+\n• Se vägar för gående och cyklande samt vandringsstigar, utmärkta för utomhusaktiviteter
+\n• Speciella ruttval och visningsläge för cykel och gående
+\n• Valfria kollektivtrafiksplatser (buss, spårvagn, tåg) inklusive linjenamn
+\n• Valfri reseinspelning till lokal GPX-fil eller onlinetjänst
+\n• Valfri visning av hastighet och höjd
+\n• Visa konturlinjer och höjdreliefer (via separat plugin)
Bidra direkt till OSM
\n• Rapportera databuggar
\n• Ladda upp GPX-spår till OSM direkt från appen
@@ -3267,4 +3336,9 @@ Vänligen tillhandahåll fullständig kod
Spåret innehåller inte höjddata.
Spåret innehåller inte hastighetsdata.
Välj en annan typ av färgning.
+ Spara riktning till varje spårningspunkt under inspelning.
+ Go-cart
+ Loggningsintervall ställde in den tidsperiod under vilken OsmAnd kommer att be om aktuell positionspositionsdata.
+ Spara och fortsätt
+ All osparad data kommer att försvinna.
\ No newline at end of file
From 6bbed2571f016c2ae1b3ebe842fa0c03bb2bf40c Mon Sep 17 00:00:00 2001
From: Hinagiku Zeppeki
Date: Tue, 23 Mar 2021 19:43:29 +0000
Subject: [PATCH 092/103] Translated using Weblate (Japanese)
Currently translated at 95.3% (3518 of 3688 strings)
---
OsmAnd/res/values-ja/strings.xml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/OsmAnd/res/values-ja/strings.xml b/OsmAnd/res/values-ja/strings.xml
index 206586cfd1..cc3465ea61 100644
--- a/OsmAnd/res/values-ja/strings.xml
+++ b/OsmAnd/res/values-ja/strings.xml
@@ -3950,4 +3950,7 @@ POIの更新は利用できません
経路には標高データは含まれていません。
経路には速度データは含まれていません。
別タイプのカラーを選択してください。
+ ログ記録間隔は、OsmAndが現在の位置データを要求する期間を設定します。
+ 保存して続行
+ 保存されていないデータはすべて失われます。
\ No newline at end of file
From 0f037d6264bdeed3cb35c27b2b5a669c8721cc06 Mon Sep 17 00:00:00 2001
From: Ldm Public
Date: Mon, 22 Mar 2021 22:53:19 +0000
Subject: [PATCH 093/103] Translated using Weblate (French)
Currently translated at 100.0% (3688 of 3688 strings)
---
OsmAnd/res/values-fr/strings.xml | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/OsmAnd/res/values-fr/strings.xml b/OsmAnd/res/values-fr/strings.xml
index 18cf09a780..702b8f37e1 100644
--- a/OsmAnd/res/values-fr/strings.xml
+++ b/OsmAnd/res/values-fr/strings.xml
@@ -1192,11 +1192,11 @@
Fichier GPX vide
Traces
Favoris
- Mes lieux favoris
+ Lieux favoris
\n\nAppui long pour afficher sur la carte
Démarrer la navigation pas à pas automatiquement
sélectionné(s)
- Intervalle de division
+ Intervalle de fractionnement
\n\nAppui long pour afficher les options
Sections : %1$s
Points de passage : %1$s
@@ -4035,4 +4035,7 @@
Appuyer pour afficher ou cacher le widget Coordonnées sur la carte.
L’icône de localisation va se déplacer sur le trajet en cours.
Veuillez sélectionner un autre type de colorisation.
+ L\'intervalle d’enregistrement définit la fréquence à laquelle OsmAnd récupérera les données de localisation.
+ Enregistrer et continuer
+ Toutes les données non enregistrées seront perdues.
\ No newline at end of file
From 75affd79172cbdd6d480c8d91ed3753be57e9dcf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Babos=20G=C3=A1bor?=
Date: Tue, 23 Mar 2021 08:22:39 +0000
Subject: [PATCH 094/103] Translated using Weblate (Hungarian)
Currently translated at 100.0% (3688 of 3688 strings)
---
OsmAnd/res/values-hu/strings.xml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/OsmAnd/res/values-hu/strings.xml b/OsmAnd/res/values-hu/strings.xml
index 2f81cd1464..f42791d9aa 100644
--- a/OsmAnd/res/values-hu/strings.xml
+++ b/OsmAnd/res/values-hu/strings.xml
@@ -4039,4 +4039,7 @@
Az alkalmazás hetente ellenőrzi a térképfrissítéseket. Következő ellenőrzés: %1$s (ennyi idő múlva: %2$s).
Az alkalmazás naponta ellenőrzi a térképfrissítéseket. Következő ellenőrzés: %1$s (ennyi idő múlva: %2$s).
Az alkalmazás óránként ellenőrzi a térképfrissítéseket. Következő ellenőrzés: %1$s (ennyi idő múlva: %2$s).
+ A naplózási intervallum az az időköz, amelyben az OsmAnd lekéri az aktuális helyadatokat.
+ Mentés és folytatás
+ Minden nem mentett adat törlődni fog.
\ No newline at end of file
From 97735bb598f808e5a1661c885dc64c6778bb865f Mon Sep 17 00:00:00 2001
From: Ihor Hordiichuk
Date: Mon, 22 Mar 2021 22:14:03 +0000
Subject: [PATCH 095/103] Translated using Weblate (Ukrainian)
Currently translated at 100.0% (3688 of 3688 strings)
---
OsmAnd/res/values-uk/strings.xml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/OsmAnd/res/values-uk/strings.xml b/OsmAnd/res/values-uk/strings.xml
index 054c932cc6..262ec98674 100644
--- a/OsmAnd/res/values-uk/strings.xml
+++ b/OsmAnd/res/values-uk/strings.xml
@@ -4044,4 +4044,7 @@
Виберіть інший тип забарвлення.
Сховати природні заповідники, заповідні території та межі національних парків
Межі природи
+ Інтервал журналювання встановлює проміжок часу, впродовж якого OsmAnd запитуватиме дані про поточне розташування.
+ Зберегти й продовжити
+ Усі незбережені дані буде втрачено.
\ No newline at end of file
From 1310854caaaf7c73895d6327bc4166867fc67067 Mon Sep 17 00:00:00 2001
From: Yaron Shahrabani
Date: Mon, 22 Mar 2021 20:41:02 +0000
Subject: [PATCH 096/103] Translated using Weblate (Hebrew)
Currently translated at 99.9% (3687 of 3688 strings)
---
OsmAnd/res/values-iw/strings.xml | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/OsmAnd/res/values-iw/strings.xml b/OsmAnd/res/values-iw/strings.xml
index c5949f404d..76006696f9 100644
--- a/OsmAnd/res/values-iw/strings.xml
+++ b/OsmAnd/res/values-iw/strings.xml
@@ -9,7 +9,7 @@
הצגת הכיוון ליעד
יש להפעיל את תוסף „מעקב הטיול” כדי להשתמש בשירותי רישום מיקום (מעקב חי, רישום GPX)
יש לחשב מסלול בלתי יעיל למרחקים ארוכים
- נא להפעיל את רכיב האיכון (GPS) בהגדרות
+ נא להפעיל את ה־GPS בהגדרות
שירותי רישום
אין מסלול
הסרת יעד
@@ -1881,7 +1881,7 @@
מטרים לשנייה
דקות לקילומטר
דקות למייל
- מיל ימי לשעה (קשר)
+ מייל ימי לשעה (קשר)
קשר
מ/שנ׳
הקלטת טיול
@@ -4047,4 +4047,8 @@
קיים עדכון ל־OpenStreetMap:
להסתיר גבולות של שמורות טבע, אזורים מוגנים ופארקים ציבוריים
גבולות טבעיים
+ למחוק את כל העדכונים החיים של %s\?
+ הגדרת הפרש קבוע בין הבקשות של OsmAnd לקבלת נתוני המיקום הנוכחיים.
+ לשמור ולהמשיך
+ כל הנתונים שלא נשמרו יאבדו.
\ No newline at end of file
From 487d357c2ffa5559193ea365006f4580f6d0ac03 Mon Sep 17 00:00:00 2001
From: iman
Date: Tue, 23 Mar 2021 15:29:51 +0000
Subject: [PATCH 097/103] Translated using Weblate (Persian)
Currently translated at 99.8% (3682 of 3688 strings)
---
OsmAnd/res/values-fa/strings.xml | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/OsmAnd/res/values-fa/strings.xml b/OsmAnd/res/values-fa/strings.xml
index ff02ab8a68..2d0bce8623 100644
--- a/OsmAnd/res/values-fa/strings.xml
+++ b/OsmAnd/res/values-fa/strings.xml
@@ -492,7 +492,7 @@
اجرای برنامه در حالت ایمن (بهجای کد native از کد Android که کُندتر است استفاده میکند).
برنامه در حالت ایمن اجرا شده است (از طریق تنظیمات آن را غیرفعال کنید).
سرویس پسزمینهٔ OsmAnd هنوز در حال اجراست. آن را هم متوقف میکنید؟
- بستن بستهٔ تغییرات
+ بستن بستهٔ تغییر
برنامهٔ اسکنر بارکد ZXing نصب نشده است. در گوگلپلی جستوجو میکنید؟
یکی از رنگبندیهای راه را انتخاب کنید:
رنگبندی راه
@@ -787,8 +787,8 @@
در حال تبدیل اسامی محلی/انگلیسی…
ناموفق
اجازهٔ دسترسی احراز نشد
- بستن بستهٔ تغییرات…
- بازکردن بستهٔ تغییرات…
+ بستن بستهٔ تغییر…
+ بازکردن بستهٔ تغییر…
دریافت لیست مناطق از https://osmand.net ناموفق بود.
در حال دانلود لیست مناطق موجود…
دادهٔ آفلاینِ {0} از قبل وجود دارد ({1}). آن را روزآمد میکنید ({2})؟
@@ -1478,7 +1478,7 @@
برنامهٔ OsmAnd نقشهگردی و ناوبری آفلاین را برایتان به ارمغان میآورد.
خوش آمدید
مسیر فعلی
- تغییرات OSM به بستهٔ تغییرات محلی اضافه شد
+ تغییرات OSM به بستهٔ تغییر محلی اضافه شد
برای حذفکردن علامت بزنید
از آپلود این %1$d تغییر در OSM مطمئن هستید؟
سوابق را پاک میکنید؟
@@ -2589,7 +2589,7 @@
نشانههایی که بهعنوان گذرانده مشخص شود در این صفحه نشان داده میشود.
بیشتر
در حال جستوجوی ردهای دارای راهنشان
- اشیای OSM را بسازید یا ویرایش کنید
+ مکانهای OSM را ایجاد یا ویرایش کنید
POIها را اضافه یا ویرایش کنید، یادداشتهای OSMای اضافه کنید یا روی آنها نظر بدهید و فایلهای GPX ضبطشده را آپلود کنید.
حذفشده(ها)
ویرایش شد
@@ -3479,7 +3479,7 @@
در حال درونبرد
درونبرد کامل شد
همهٔ داده از %1$s درونبرد شد. با استفاده از دکمههای زیر میتوانید بخش موردنیاز برنامه را برای مدیریت آن باز کنید.
- انواع POI
+ گونههای POI
%1$s که در زیر آمده، هماکنون در OsmAnd وجود دارد.
OsmAnd در حال بررسی %1$s برای چیزهای تکراری موجود در برنامه است.
\n
@@ -4068,5 +4068,5 @@
مکث کرده
دکمهای برای آشکار یا پنهان کردن ابزارک مختصات روی نقشه.
بازه
- فاصله با لمس دوانگشتی
+ مسافت با لمس
\ No newline at end of file
From 51dff2456b09068366cdc4dc0829d462fd5da0bb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Allan=20Nordh=C3=B8y?=
Date: Tue, 23 Mar 2021 11:14:32 +0000
Subject: [PATCH 098/103] =?UTF-8?q?Translated=20using=20Weblate=20(Norwegi?=
=?UTF-8?q?an=20Bokm=C3=A5l)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Currently translated at 60.8% (2245 of 3688 strings)
---
OsmAnd/res/values-nb/strings.xml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/OsmAnd/res/values-nb/strings.xml b/OsmAnd/res/values-nb/strings.xml
index 38107b6cc1..c902064e98 100644
--- a/OsmAnd/res/values-nb/strings.xml
+++ b/OsmAnd/res/values-nb/strings.xml
@@ -3939,4 +3939,6 @@
Optimalisert kortere rute (energisparende)
Aktuelle posisjonsikon vil bli festet til gjeldende navigeringsrute
Ruting kan unngå kraftige oppoverbakker.
+ Lagre og fortsett
+ All ulagret data vil gå tapt.
\ No newline at end of file
From 0aaa004702325b864fb05cac3a0a783ce7ef391c Mon Sep 17 00:00:00 2001
From: Eduardo Addad de Oliveira
Date: Tue, 23 Mar 2021 19:06:13 +0000
Subject: [PATCH 099/103] Translated using Weblate (Portuguese (Brazil))
Currently translated at 99.9% (3687 of 3688 strings)
---
OsmAnd/res/values-pt-rBR/strings.xml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/OsmAnd/res/values-pt-rBR/strings.xml b/OsmAnd/res/values-pt-rBR/strings.xml
index 5cb9de5bb1..1914ba1d48 100644
--- a/OsmAnd/res/values-pt-rBR/strings.xml
+++ b/OsmAnd/res/values-pt-rBR/strings.xml
@@ -4040,4 +4040,6 @@
Selecione outro tipo de colorização.
Limites naturais
Segmento %1$d
+ Salvar e continuar
+ Todos os dados não salvos serão perdidos.
\ No newline at end of file
From c3fb538e062be531e34342d2c71968a41f507f63 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Priit=20J=C3=B5er=C3=BC=C3=BCt?=
Date: Mon, 22 Mar 2021 20:23:33 +0000
Subject: [PATCH 100/103] Translated using Weblate (Estonian)
Currently translated at 99.9% (3687 of 3688 strings)
---
OsmAnd/res/values-et/strings.xml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/OsmAnd/res/values-et/strings.xml b/OsmAnd/res/values-et/strings.xml
index f78e97a163..e4c91a241f 100644
--- a/OsmAnd/res/values-et/strings.xml
+++ b/OsmAnd/res/values-et/strings.xml
@@ -4052,4 +4052,6 @@
Kaugus toksamise järgi
Peida (loodus)kaitsealade ja rahvusparkide piirid
Looduse piirid
+ Salvesta ja jätka
+ Kõik salvestamata andmed lähevad kaotsi.
\ No newline at end of file
From 6d1b6faf20c0cd9c21e550915ae19c0b2b44a618 Mon Sep 17 00:00:00 2001
From: phlostically
Date: Mon, 22 Mar 2021 21:53:23 +0000
Subject: [PATCH 101/103] Translated using Weblate (Esperanto)
Currently translated at 100.0% (3688 of 3688 strings)
---
OsmAnd/res/values-eo/strings.xml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/OsmAnd/res/values-eo/strings.xml b/OsmAnd/res/values-eo/strings.xml
index 9583371a8e..178af35973 100644
--- a/OsmAnd/res/values-eo/strings.xml
+++ b/OsmAnd/res/values-eo/strings.xml
@@ -4045,4 +4045,7 @@
Intertempo
Kaŝi limojn de naturaj rezervejoj, protektataj areoj kaj naciaj parkoj
Limoj de rezervejoj
+ Agordita periodo de intertempo de registrado, dum kiu OsmAnd petos la nunajn poziciajn datumojn.
+ Ĉiuj nekonservitaj datumoj perdiĝos.
+ Konservi kaj daŭrigi
\ No newline at end of file
From 738d28209184b084ebe31f5b32288715b3e915e5 Mon Sep 17 00:00:00 2001
From: Jeff Huang
Date: Tue, 23 Mar 2021 01:53:01 +0000
Subject: [PATCH 102/103] Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (3688 of 3688 strings)
---
OsmAnd/res/values-zh-rTW/strings.xml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/OsmAnd/res/values-zh-rTW/strings.xml b/OsmAnd/res/values-zh-rTW/strings.xml
index 4ffbbadc5c..4bef29c778 100644
--- a/OsmAnd/res/values-zh-rTW/strings.xml
+++ b/OsmAnd/res/values-zh-rTW/strings.xml
@@ -4038,4 +4038,7 @@
請選擇另一種顏色。
隱藏自然保留區、保護區與國家公園界線
自然界線
+ 紀錄間隔設定的時段,OsmAnd 將會要求目前位置的位置資料。
+ 儲存並繼續
+ 所有未儲存的資料都將會遺失。
\ No newline at end of file
From b7de6e8a3824c15147b89693c205cf4bc97174d7 Mon Sep 17 00:00:00 2001
From: Shjosan
Date: Tue, 23 Mar 2021 13:57:11 +0000
Subject: [PATCH 103/103] Translated using Weblate (Swedish)
Currently translated at 100.0% (271 of 271 strings)
Translation: OsmAnd/Telegram
Translate-URL: https://hosted.weblate.org/projects/osmand/telegram/sv/
---
OsmAnd-telegram/res/values-sv/strings.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/OsmAnd-telegram/res/values-sv/strings.xml b/OsmAnd-telegram/res/values-sv/strings.xml
index cbf274305e..7dac55e059 100644
--- a/OsmAnd-telegram/res/values-sv/strings.xml
+++ b/OsmAnd-telegram/res/values-sv/strings.xml
@@ -13,7 +13,7 @@
Kilomter/meter
Miles/yard
Miles/fot
- Distansminuter per timme (knop)
+ Sjömil per timme (knop)
Minuter per mile
Minuter per kilometer
Meter per sekund