From 7a738dd55c74c2641691561da61dc39cefec5e0d Mon Sep 17 00:00:00 2001
From: androiddevkotlin <64539346+androiddevkotlin@users.noreply.github.com>
Date: Tue, 23 Feb 2021 18:16:12 +0200
Subject: [PATCH 01/34] Fix element's alignment: icons and colors
https://github.com/osmandapp/OsmAnd-Issues/issues/472
---
OsmAnd/res/layout/colors_card.xml | 9 +-
.../res/layout/point_editor_fragment_new.xml | 22 ++---
OsmAnd/res/layout/track_coloring_card.xml | 12 +--
.../editors/PointEditorFragmentNew.java | 55 ++++++------
.../cards/PublicTransportCard.java | 18 ++--
.../fragments/ProfileAppearanceFragment.java | 8 +-
.../src/net/osmand/plus/track/ColorsCard.java | 12 ++-
.../net/osmand/plus/widgets/FlowLayout.java | 85 +++++++++++--------
8 files changed, 120 insertions(+), 101 deletions(-)
diff --git a/OsmAnd/res/layout/colors_card.xml b/OsmAnd/res/layout/colors_card.xml
index bef11dc500..5461aa1d9f 100644
--- a/OsmAnd/res/layout/colors_card.xml
+++ b/OsmAnd/res/layout/colors_card.xml
@@ -1,16 +1,17 @@
-
diff --git a/OsmAnd/res/layout/point_editor_fragment_new.xml b/OsmAnd/res/layout/point_editor_fragment_new.xml
index 679ca022fe..3e8657cd22 100644
--- a/OsmAnd/res/layout/point_editor_fragment_new.xml
+++ b/OsmAnd/res/layout/point_editor_fragment_new.xml
@@ -84,6 +84,7 @@
android:drawableEnd="@drawable/btn_circle_transparent_full"
android:drawableRight="@drawable/btn_circle_transparent_full"
android:drawablePadding="@dimen/favorites_list_item_height"
+ android:imeOptions="actionDone"
android:inputType="textMultiLine"
android:maxLines="4"
android:minHeight="@dimen/favorites_list_item_height"
@@ -93,7 +94,6 @@
android:paddingRight="@dimen/content_padding_small"
android:scrollHorizontally="false"
android:textSize="@dimen/default_list_text_size"
- android:imeOptions="actionDone"
tools:text="@string/lorem_ipsum" />
@@ -137,6 +137,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="start"
+ android:imeOptions="actionDone"
android:maxLines="4"
android:minHeight="@dimen/favorites_list_item_height"
android:paddingStart="@dimen/content_padding_small"
@@ -144,7 +145,6 @@
android:paddingEnd="@dimen/content_padding_small"
android:paddingRight="@dimen/content_padding_small"
android:textSize="@dimen/default_list_text_size"
- android:imeOptions="actionDone"
tools:text="@string/lorem_ipsum" />
@@ -248,6 +248,7 @@
android:drawablePadding="8dp"
android:duplicateParentState="true"
android:gravity="center"
+ android:imeOptions="actionDone"
android:paddingStart="@dimen/content_padding_half"
android:paddingLeft="@dimen/content_padding_half"
android:paddingEnd="@dimen/content_padding_half"
@@ -255,7 +256,6 @@
android:text="@string/add_description"
android:textSize="@dimen/default_desc_text_size"
osmand:typeface="@string/font_roboto_medium"
- android:imeOptions="actionDone"
tools:text="@string/add_description" />
-
@@ -500,9 +500,11 @@
android:id="@+id/select_shape"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginStart="@dimen/content_padding_small"
- android:layout_marginLeft="@dimen/content_padding_small"
+ android:layout_marginStart="@dimen/content_padding"
+ android:layout_marginLeft="@dimen/content_padding"
android:layout_marginTop="@dimen/context_menu_padding_margin_tiny"
+ android:layout_marginEnd="@dimen/content_padding"
+ android:layout_marginRight="@dimen/content_padding"
android:layout_marginBottom="@dimen/content_padding_half"
android:gravity="start" />
diff --git a/OsmAnd/res/layout/track_coloring_card.xml b/OsmAnd/res/layout/track_coloring_card.xml
index 2c7721f61d..0a7231f67a 100644
--- a/OsmAnd/res/layout/track_coloring_card.xml
+++ b/OsmAnd/res/layout/track_coloring_card.xml
@@ -21,8 +21,8 @@
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="@dimen/context_menu_padding_margin_tiny"
- android:visibility="gone"
- android:paddingBottom="@dimen/content_padding">
+ android:paddingBottom="@dimen/content_padding"
+ android:visibility="gone">
-
\ No newline at end of file
diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/PointEditorFragmentNew.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/PointEditorFragmentNew.java
index e59ce02373..b57e5adca5 100644
--- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/PointEditorFragmentNew.java
+++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/PointEditorFragmentNew.java
@@ -22,7 +22,6 @@ import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
import android.widget.FrameLayout;
import android.widget.ImageView;
-import android.widget.LinearLayout;
import android.widget.ScrollView;
import android.widget.TextView;
@@ -66,6 +65,7 @@ import org.json.JSONObject;
import java.io.IOException;
import java.io.InputStream;
+import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
@@ -124,7 +124,7 @@ public abstract class PointEditorFragmentNew extends BaseOsmAndFragment implemen
@SuppressLint("ClickableViewAccessibility")
@Override
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
- Bundle savedInstanceState) {
+ Bundle savedInstanceState) {
app = requireMyApplication();
nightMode = app.getDaynightHelper().isNightModeForMapControls();
@@ -144,7 +144,7 @@ public abstract class PointEditorFragmentNew extends BaseOsmAndFragment implemen
selectedShape = getBackgroundType();
selectedIcon = getIconId();
- Toolbar toolbar = (Toolbar) view.findViewById(R.id.toolbar);
+ Toolbar toolbar = view.findViewById(R.id.toolbar);
toolbar.setBackgroundColor(ContextCompat.getColor(requireContext(),
nightMode ? R.color.app_bar_color_dark : R.color.list_background_color_light));
toolbar.setTitle(getToolbarTitle());
@@ -159,7 +159,7 @@ public abstract class PointEditorFragmentNew extends BaseOsmAndFragment implemen
}
});
- final ScrollView scrollView = (ScrollView) view.findViewById(R.id.editor_scroll_view);
+ final ScrollView scrollView = view.findViewById(R.id.editor_scroll_view);
scrollViewY = scrollView.getScrollY();
scrollView.getViewTreeObserver().addOnScrollChangedListener(new ViewTreeObserver.OnScrollChangedListener() {
@Override
@@ -175,14 +175,14 @@ public abstract class PointEditorFragmentNew extends BaseOsmAndFragment implemen
});
final int activeColorResId = getActiveColorRes();
- ImageView toolbarAction = (ImageView) view.findViewById(R.id.toolbar_action);
+ ImageView toolbarAction = view.findViewById(R.id.toolbar_action);
view.findViewById(R.id.background_layout).setBackgroundResource(nightMode
? R.color.app_bar_color_dark : R.color.list_background_color_light);
- ImageView replaceIcon = (ImageView) view.findViewById(R.id.replace_action_icon);
+ ImageView replaceIcon = view.findViewById(R.id.replace_action_icon);
replaceIcon.setImageDrawable(app.getUIUtilities().getIcon(R.drawable.ic_action_replace, activeColorResId));
- ImageView deleteIcon = (ImageView) view.findViewById(R.id.delete_action_icon);
+ ImageView deleteIcon = view.findViewById(R.id.delete_action_icon);
deleteIcon.setImageDrawable(app.getUIUtilities().getIcon(R.drawable.ic_action_delete_dark, activeColorResId));
- ImageView groupListIcon = (ImageView) view.findViewById(R.id.group_list_button_icon);
+ ImageView groupListIcon = view.findViewById(R.id.group_list_button_icon);
groupListIcon.setImageDrawable(app.getUIUtilities().getIcon(R.drawable.ic_action_group_select_all, activeColorResId));
addToHiddenGroupInfo = view.findViewById(R.id.add_hidden_group_info);
addToHiddenGroupInfo.setText(getString(R.string.add_hidden_group_info, getString(R.string.shared_string_my_places)));
@@ -217,10 +217,10 @@ public abstract class PointEditorFragmentNew extends BaseOsmAndFragment implemen
UiUtilities.setupDialogButton(nightMode, cancelButton, UiUtilities.DialogButtonType.SECONDARY, R.string.shared_string_cancel);
UiUtilities.setupDialogButton(nightMode, saveButton, UiUtilities.DialogButtonType.PRIMARY, R.string.shared_string_save);
- final TextInputLayout nameCaption = (TextInputLayout) view.findViewById(R.id.name_caption);
+ final TextInputLayout nameCaption = view.findViewById(R.id.name_caption);
nameCaption.setHint(getString(R.string.shared_string_name));
- nameEdit = (EditText) view.findViewById(R.id.name_edit);
+ nameEdit = view.findViewById(R.id.name_edit);
nameEdit.setText(getNameInitValue());
nameEdit.addTextChangedListener(new TextWatcher() {
@Override
@@ -238,15 +238,15 @@ public abstract class PointEditorFragmentNew extends BaseOsmAndFragment implemen
});
checkEmptyName(nameEdit.getText(), nameCaption, saveButton);
- nameIcon = (ImageView) view.findViewById(R.id.name_icon);
+ nameIcon = view.findViewById(R.id.name_icon);
TextView categoryEdit = view.findViewById(R.id.groupName);
if (categoryEdit != null) {
AndroidUtils.setTextPrimaryColor(view.getContext(), categoryEdit, nightMode);
categoryEdit.setText(getCategoryInitValue());
}
- descriptionEdit = (EditText) view.findViewById(R.id.description_edit);
- addressEdit = (EditText) view.findViewById(R.id.address_edit);
+ descriptionEdit = view.findViewById(R.id.description_edit);
+ addressEdit = view.findViewById(R.id.address_edit);
AndroidUtils.setTextPrimaryColor(view.getContext(), descriptionEdit, nightMode);
AndroidUtils.setTextPrimaryColor(view.getContext(), addressEdit, nightMode);
AndroidUtils.setHintTextSecondaryColor(view.getContext(), descriptionEdit, nightMode);
@@ -257,7 +257,7 @@ public abstract class PointEditorFragmentNew extends BaseOsmAndFragment implemen
descriptionCaption = view.findViewById(R.id.description);
addressCaption = view.findViewById(R.id.address);
- addDelDescription = (TextView) view.findViewById(R.id.description_button);
+ addDelDescription = view.findViewById(R.id.description_button);
addAddressBtn = view.findViewById(R.id.address_button);
deleteAddressIcon = view.findViewById(R.id.delete_address_icon);
deleteAddressIcon.setImageDrawable(app.getUIUtilities().getIcon(R.drawable.ic_action_trash_basket_16, activeColorResId));
@@ -476,8 +476,9 @@ public abstract class PointEditorFragmentNew extends BaseOsmAndFragment implemen
}
colorsCard = new ColorsCard(mapActivity, selectedColor, this, colors);
colorsCard.setListener(this);
- LinearLayout selectColor = view.findViewById(R.id.select_color);
- selectColor.addView(colorsCard.build(view.getContext()));
+ FlowLayout selectColor = view.findViewById(R.id.select_color);
+ selectColor.addView(colorsCard.build(view.getContext()),
+ new FlowLayout.LayoutParams(0, 0, true));
}
}
@@ -520,7 +521,7 @@ public abstract class PointEditorFragmentNew extends BaseOsmAndFragment implemen
for (BackgroundType backgroundType : BackgroundType.values()) {
if (backgroundType.isSelected()) {
selectShape.addView(createShapeItemView(backgroundType, selectShape),
- new FlowLayout.LayoutParams(0, 0));
+ new FlowLayout.LayoutParams(0, 0, true));
}
}
}
@@ -561,7 +562,7 @@ public abstract class PointEditorFragmentNew extends BaseOsmAndFragment implemen
((TextView) rootView.findViewById(R.id.shape_name)).setText(backgroundType.getNameId());
ImageView background = newShape.findViewById(R.id.background);
background.setImageDrawable(UiUtilities.tintDrawable(AppCompatResources.getDrawable(app, backgroundType.getIconId()),
- selectedColor));
+ selectedColor));
selectedShape = backgroundType;
setBackgroundType(backgroundType);
updateNameIcon();
@@ -569,9 +570,9 @@ public abstract class PointEditorFragmentNew extends BaseOsmAndFragment implemen
private void setShapeSelectorBackground(BackgroundType backgroundType, ImageView background) {
background.setImageDrawable(UiUtilities.tintDrawable(AppCompatResources.getDrawable(app, backgroundType.getIconId()),
- ContextCompat.getColor(app,
- nightMode ? R.color.inactive_buttons_and_links_bg_dark
- : R.color.inactive_buttons_and_links_bg_light)));
+ ContextCompat.getColor(app,
+ nightMode ? R.color.inactive_buttons_and_links_bg_dark
+ : R.color.inactive_buttons_and_links_bg_light)));
}
private String getInitCategory() {
@@ -643,7 +644,7 @@ public abstract class PointEditorFragmentNew extends BaseOsmAndFragment implemen
horizontalSelectionAdapter.notifyDataSetChanged();
iconCategoriesRecyclerView.smoothScrollToPosition(horizontalSelectionAdapter.getItemPositionByTitle(selectedIconCategory));
for (String name : iconNameList) {
- selectIcon.addView(createIconItemView(name, selectIcon), new FlowLayout.LayoutParams(0, 0));
+ selectIcon.addView(createIconItemView(name, selectIcon), new FlowLayout.LayoutParams(0, 0, true));
}
}
}
@@ -701,9 +702,9 @@ public abstract class PointEditorFragmentNew extends BaseOsmAndFragment implemen
private void setIconSelectorBackground(ImageView backgroundCircle) {
backgroundCircle.setImageDrawable(UiUtilities.tintDrawable(AppCompatResources.getDrawable(app, R.drawable.bg_point_circle),
- ContextCompat.getColor(app, nightMode
- ? R.color.inactive_buttons_and_links_bg_dark
- : R.color.inactive_buttons_and_links_bg_light)));
+ ContextCompat.getColor(app, nightMode
+ ? R.color.inactive_buttons_and_links_bg_dark
+ : R.color.inactive_buttons_and_links_bg_light)));
}
private void updateNameIcon() {
@@ -720,7 +721,7 @@ public abstract class PointEditorFragmentNew extends BaseOsmAndFragment implemen
byte[] buffer = new byte[size];
is.read(buffer);
is.close();
- json = new String(buffer, "UTF-8");
+ json = new String(buffer, StandardCharsets.UTF_8);
} catch (IOException ex) {
ex.printStackTrace();
return null;
@@ -887,8 +888,6 @@ public abstract class PointEditorFragmentNew extends BaseOsmAndFragment implemen
return true;
}
- ;
-
String getNameTextValue() {
EditText nameEdit = view.findViewById(R.id.name_edit);
return nameEdit.getText().toString().trim();
diff --git a/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/PublicTransportCard.java b/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/PublicTransportCard.java
index a47920b29c..fd96dce461 100644
--- a/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/PublicTransportCard.java
+++ b/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/PublicTransportCard.java
@@ -294,8 +294,8 @@ public class PublicTransportCard extends BaseCard {
if (walkingSegment != null) {
double walkTime = walkingSegment.getRoutingTime();
if (walkTime > MIN_WALK_TIME) {
- routesBadges.addView(createWalkRouteBadge(walkingSegment, badgesRowClickable), new FlowLayout.LayoutParams(itemsSpacing, itemsSpacing));
- routesBadges.addView(createArrow(), new FlowLayout.LayoutParams(itemsSpacing, itemsSpacing));
+ routesBadges.addView(createWalkRouteBadge(walkingSegment, badgesRowClickable), new FlowLayout.LayoutParams(itemsSpacing, itemsSpacing, false));
+ routesBadges.addView(createArrow(), new FlowLayout.LayoutParams(itemsSpacing, itemsSpacing, false));
}
} else if (s.walkDist > 0) {
double walkTime = getWalkTime(s.walkDist, routeResult.getWalkSpeed());
@@ -307,20 +307,20 @@ public class PublicTransportCard extends BaseCard {
} else {
start = this.startLocation;
}
- routesBadges.addView(createWalkRouteBadge(walkTime, start, end, badgesRowClickable), new FlowLayout.LayoutParams(itemsSpacing, itemsSpacing));
- routesBadges.addView(createArrow(), new FlowLayout.LayoutParams(itemsSpacing, itemsSpacing));
+ routesBadges.addView(createWalkRouteBadge(walkTime, start, end, badgesRowClickable), new FlowLayout.LayoutParams(itemsSpacing, itemsSpacing, false));
+ routesBadges.addView(createArrow(), new FlowLayout.LayoutParams(itemsSpacing, itemsSpacing, false));
}
}
- routesBadges.addView(createRouteBadge(s, badgesRowClickable), new FlowLayout.LayoutParams(itemsSpacing, itemsSpacing));
+ routesBadges.addView(createRouteBadge(s, badgesRowClickable), new FlowLayout.LayoutParams(itemsSpacing, itemsSpacing, false));
if (iterator.hasNext()) {
- routesBadges.addView(createArrow(), new FlowLayout.LayoutParams(itemsSpacing, itemsSpacing));
+ routesBadges.addView(createArrow(), new FlowLayout.LayoutParams(itemsSpacing, itemsSpacing, false));
} else {
walkingSegment = transportRoutingHelper.getWalkingRouteSegment(s, null);
if (walkingSegment != null) {
double walkTime = walkingSegment.getRoutingTime();
if (walkTime > MIN_WALK_TIME) {
- routesBadges.addView(createArrow(), new FlowLayout.LayoutParams(itemsSpacing, itemsSpacing));
- routesBadges.addView(createWalkRouteBadge(walkingSegment, badgesRowClickable), new FlowLayout.LayoutParams(itemsSpacing, itemsSpacing));
+ routesBadges.addView(createArrow(), new FlowLayout.LayoutParams(itemsSpacing, itemsSpacing, false));
+ routesBadges.addView(createWalkRouteBadge(walkingSegment, badgesRowClickable), new FlowLayout.LayoutParams(itemsSpacing, itemsSpacing, false));
}
} else {
double finishWalkDist = routeResult.getFinishWalkDist();
@@ -329,7 +329,7 @@ public class PublicTransportCard extends BaseCard {
if (walkTime > MIN_WALK_TIME) {
LatLon start = s.getEnd().getLocation();
LatLon end = this.endLocation;
- routesBadges.addView(createArrow(), new FlowLayout.LayoutParams(itemsSpacing, itemsSpacing));
+ routesBadges.addView(createArrow(), new FlowLayout.LayoutParams(itemsSpacing, itemsSpacing, false));
routesBadges.addView(createWalkRouteBadge(walkTime, start, end, badgesRowClickable));
}
}
diff --git a/OsmAnd/src/net/osmand/plus/settings/fragments/ProfileAppearanceFragment.java b/OsmAnd/src/net/osmand/plus/settings/fragments/ProfileAppearanceFragment.java
index 7e1277ca18..9b5a101e16 100644
--- a/OsmAnd/src/net/osmand/plus/settings/fragments/ProfileAppearanceFragment.java
+++ b/OsmAnd/src/net/osmand/plus/settings/fragments/ProfileAppearanceFragment.java
@@ -413,7 +413,7 @@ public class ProfileAppearanceFragment extends BaseSettingsFragment implements O
colorItems.removeAllViews();
for (ProfileIconColors color : ProfileIconColors.values()) {
View colorItem = createColorItemView(color, colorItems);
- colorItems.addView(colorItem, new FlowLayout.LayoutParams(0, 0));
+ colorItems.addView(colorItem, new FlowLayout.LayoutParams(0, 0, true));
}
updateColorSelector(changedProfile.color);
} else if (ICON_ITEMS.equals(preference.getKey())) {
@@ -422,7 +422,7 @@ public class ProfileAppearanceFragment extends BaseSettingsFragment implements O
ArrayList icons = ProfileIcons.getIcons();
for (int iconRes : icons) {
View iconItem = createIconItemView(iconRes, iconItems);
- iconItems.addView(iconItem, new FlowLayout.LayoutParams(0, 0));
+ iconItems.addView(iconItem, new FlowLayout.LayoutParams(0, 0,true));
}
setIconColor(changedProfile.iconRes);
} else if (LOCATION_ICON_ITEMS.equals(preference.getKey())) {
@@ -430,7 +430,7 @@ public class ProfileAppearanceFragment extends BaseSettingsFragment implements O
locationIconItems.removeAllViews();
for (LocationIcon locationIcon : LocationIcon.values()) {
View iconItemView = createLocationIconView(locationIcon, locationIconItems);
- locationIconItems.addView(iconItemView, new FlowLayout.LayoutParams(0, 0));
+ locationIconItems.addView(iconItemView, new FlowLayout.LayoutParams(0, 0, false));
}
updateLocationIconSelector(changedProfile.locationIcon);
} else if (NAV_ICON_ITEMS.equals(preference.getKey())) {
@@ -438,7 +438,7 @@ public class ProfileAppearanceFragment extends BaseSettingsFragment implements O
navIconItems.removeAllViews();
for (NavigationIcon navigationIcon : NavigationIcon.values()) {
View iconItemView = createNavigationIconView(navigationIcon, navIconItems);
- navIconItems.addView(iconItemView, new FlowLayout.LayoutParams(0, 0));
+ navIconItems.addView(iconItemView, new FlowLayout.LayoutParams(0, 0, false));
}
updateNavigationIconSelector(changedProfile.navigationIcon);
}
diff --git a/OsmAnd/src/net/osmand/plus/track/ColorsCard.java b/OsmAnd/src/net/osmand/plus/track/ColorsCard.java
index 9fee9408c4..bbea36737c 100644
--- a/OsmAnd/src/net/osmand/plus/track/ColorsCard.java
+++ b/OsmAnd/src/net/osmand/plus/track/ColorsCard.java
@@ -13,8 +13,6 @@ import androidx.core.content.ContextCompat;
import androidx.core.graphics.ColorUtils;
import androidx.fragment.app.Fragment;
-import com.google.android.material.internal.FlowLayout;
-
import net.osmand.AndroidUtils;
import net.osmand.PlatformUtil;
import net.osmand.plus.OsmandApplication;
@@ -23,6 +21,7 @@ import net.osmand.plus.UiUtilities;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.routepreparationmenu.cards.BaseCard;
import net.osmand.plus.track.CustomColorBottomSheet.ColorPickerListener;
+import net.osmand.plus.widgets.FlowLayout;
import net.osmand.util.Algorithms;
import org.apache.commons.logging.Log;
@@ -96,15 +95,15 @@ public class ColorsCard extends BaseCard implements ColorPickerListener {
selectColor.removeAllViews();
for (int color : customColors) {
- selectColor.addView(createColorItemView(color, selectColor, true));
+ selectColor.addView(createColorItemView(color, selectColor, true), new FlowLayout.LayoutParams(0, 0, true));
}
if (customColors.size() < 6) {
- selectColor.addView(createAddCustomColorItemView(selectColor));
+ selectColor.addView(createAddCustomColorItemView(selectColor), new FlowLayout.LayoutParams(0, 0, true));
}
- selectColor.addView(createDividerView(selectColor));
+ selectColor.addView(createDividerView(selectColor), new FlowLayout.LayoutParams(0, 0, false));
for (int color : colors) {
- selectColor.addView(createColorItemView(color, selectColor, false));
+ selectColor.addView(createColorItemView(color, selectColor, false), new FlowLayout.LayoutParams(0, 0, true));
}
updateColorSelector(selectedColor, selectColor);
}
@@ -195,7 +194,6 @@ public class ColorsCard extends BaseCard implements ColorPickerListener {
LinearLayout dividerContainer = new LinearLayout(view.getContext());
dividerContainer.addView(divider);
dividerContainer.setPadding(0, AndroidUtils.dpToPx(app, 1), 0, AndroidUtils.dpToPx(app, 5));
-
return dividerContainer;
}
diff --git a/OsmAnd/src/net/osmand/plus/widgets/FlowLayout.java b/OsmAnd/src/net/osmand/plus/widgets/FlowLayout.java
index 63a43e56ad..31c07806f5 100644
--- a/OsmAnd/src/net/osmand/plus/widgets/FlowLayout.java
+++ b/OsmAnd/src/net/osmand/plus/widgets/FlowLayout.java
@@ -1,7 +1,6 @@
package net.osmand.plus.widgets;
import android.content.Context;
-import android.os.Build;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
@@ -16,15 +15,17 @@ public class FlowLayout extends ViewGroup {
final int horizontal_spacing;
final int vertical_spacing;
+ final boolean horizontalAutoSpacing;
/**
* @param horizontal_spacing Pixels between items, horizontally
* @param vertical_spacing Pixels between items, vertically
*/
- public LayoutParams(int horizontal_spacing, int vertical_spacing) {
+ public LayoutParams(int horizontal_spacing, int vertical_spacing, boolean horizontalAutoSpacing) {
super(0, 0);
this.horizontal_spacing = horizontal_spacing;
this.vertical_spacing = vertical_spacing;
+ this.horizontalAutoSpacing = horizontalAutoSpacing;
}
}
@@ -38,43 +39,44 @@ public class FlowLayout extends ViewGroup {
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
- if ((MeasureSpec.getMode(widthMeasureSpec) == MeasureSpec.UNSPECIFIED)) throw new AssertionError();
+ if ((MeasureSpec.getMode(widthMeasureSpec) == MeasureSpec.UNSPECIFIED))
+ throw new AssertionError();
final int width = MeasureSpec.getSize(widthMeasureSpec) - getPaddingLeft() - getPaddingRight();
int height = MeasureSpec.getSize(heightMeasureSpec) - getPaddingTop() - getPaddingBottom();
final int count = getChildCount();
int line_height = 0;
- int xpos = getPaddingLeft();
- int ypos = getPaddingTop();
- int childHeightMeasureSpec;
+ int horizontalPosition = getPaddingLeft();
+ int verticalPosition = getPaddingTop();
+ int childHeighteightMeasureSpec;
if (MeasureSpec.getMode(heightMeasureSpec) == MeasureSpec.AT_MOST) {
- childHeightMeasureSpec = MeasureSpec.makeMeasureSpec(height, MeasureSpec.AT_MOST);
+ childHeighteightMeasureSpec = MeasureSpec.makeMeasureSpec(height, MeasureSpec.AT_MOST);
} else {
- childHeightMeasureSpec = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);
+ childHeighteightMeasureSpec = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);
}
for (int i = 0; i < count; i++) {
final View child = getChildAt(i);
if (child.getVisibility() != GONE) {
final LayoutParams lp = (LayoutParams) child.getLayoutParams();
- child.measure(MeasureSpec.makeMeasureSpec(width, MeasureSpec.AT_MOST), childHeightMeasureSpec);
- final int childw = child.getMeasuredWidth();
+ child.measure(MeasureSpec.makeMeasureSpec(width, MeasureSpec.AT_MOST), childHeighteightMeasureSpec);
+ final int childWidth = child.getMeasuredWidth();
line_height = Math.max(line_height, child.getMeasuredHeight() + lp.vertical_spacing);
- if (xpos + childw > width) {
- xpos = getPaddingLeft();
- ypos += line_height;
+ if (horizontalPosition + childWidth > width) {
+ horizontalPosition = getPaddingLeft();
+ verticalPosition += line_height;
}
- xpos += childw + lp.horizontal_spacing;
+ horizontalPosition += childWidth + lp.horizontal_spacing;
}
}
this.line_height = line_height;
if (MeasureSpec.getMode(heightMeasureSpec) == MeasureSpec.UNSPECIFIED) {
- height = ypos + line_height;
+ height = verticalPosition + line_height;
} else if (MeasureSpec.getMode(heightMeasureSpec) == MeasureSpec.AT_MOST) {
- if (ypos + line_height < height) {
- height = ypos + line_height;
+ if (verticalPosition + line_height < height) {
+ height = verticalPosition + line_height;
}
}
setMeasuredDimension(width, height);
@@ -82,7 +84,7 @@ public class FlowLayout extends ViewGroup {
@Override
protected ViewGroup.LayoutParams generateDefaultLayoutParams() {
- return new LayoutParams(1, 1); // default of 1px spacing
+ return new LayoutParams(1, 1, false); // default of 1px spacing
}
@Override
@@ -94,29 +96,44 @@ public class FlowLayout extends ViewGroup {
protected void onLayout(boolean changed, int l, int t, int r, int b) {
final int count = getChildCount();
final int width = r - l;
+ int freeSizeSpacing;
boolean isLayoutRtl = AndroidUtils.isLayoutRtl(getContext());
- int xpos = isLayoutRtl ? width - getPaddingRight() : getPaddingLeft();
- int ypos = getPaddingTop();
+ int horizontalPosition = isLayoutRtl ? width - getPaddingRight() : getPaddingLeft();
+ int verticalPosition = getPaddingTop();
for (int i = 0; i < count; i++) {
final View child = getChildAt(i);
if (child.getVisibility() != GONE) {
- final int childw = child.getMeasuredWidth();
- final int childh = child.getMeasuredHeight();
+ final int childWidth = child.getMeasuredWidth();
+ final int childHeight = child.getMeasuredHeight();
final LayoutParams lp = (LayoutParams) child.getLayoutParams();
- if (isLayoutRtl) {
- if (xpos - childw < l) {
- xpos = width - getPaddingRight();
- ypos += line_height;
- }
- child.layout(xpos - childw, ypos, xpos, ypos + childh);
- xpos -= childw + lp.horizontal_spacing;
+ int itemsCount = width / childWidth;
+ if (itemsCount > 1) {
+ freeSizeSpacing = width % childWidth / (itemsCount - 1);
} else {
- if (xpos + childw > width) {
- xpos = getPaddingLeft();
- ypos += line_height;
+ freeSizeSpacing = width % childWidth / itemsCount;
+ }
+ if (isLayoutRtl) {
+ if (horizontalPosition - childWidth < l) {
+ horizontalPosition = width - getPaddingRight();
+ verticalPosition += line_height;
+ }
+ child.layout(horizontalPosition - childWidth, verticalPosition, horizontalPosition, verticalPosition + childHeight);
+ if (lp.horizontalAutoSpacing) {
+ horizontalPosition -= childWidth + lp.horizontal_spacing + freeSizeSpacing;
+ } else {
+ horizontalPosition -= childWidth + lp.horizontal_spacing;
+ }
+ } else {
+ if (horizontalPosition + childWidth > width) {
+ horizontalPosition = getPaddingLeft();
+ verticalPosition += line_height;
+ }
+ child.layout(horizontalPosition, verticalPosition, horizontalPosition + childWidth, verticalPosition + childHeight);
+ if (lp.horizontalAutoSpacing) {
+ horizontalPosition += childWidth + lp.horizontal_spacing + freeSizeSpacing;
+ } else {
+ horizontalPosition += childWidth + lp.horizontal_spacing;
}
- child.layout(xpos, ypos, xpos + childw, ypos + childh);
- xpos += childw + lp.horizontal_spacing;
}
}
}
From cbc77377cb421c533b2339b1e53a799c7c5fa7f9 Mon Sep 17 00:00:00 2001
From: androiddevkotlin <64539346+androiddevkotlin@users.noreply.github.com>
Date: Wed, 24 Feb 2021 01:31:26 +0200
Subject: [PATCH 02/34] Fix RTL space to fit screen
---
.../net/osmand/plus/widgets/FlowLayout.java | 40 +++++++++++--------
1 file changed, 23 insertions(+), 17 deletions(-)
diff --git a/OsmAnd/src/net/osmand/plus/widgets/FlowLayout.java b/OsmAnd/src/net/osmand/plus/widgets/FlowLayout.java
index 31c07806f5..979813e170 100644
--- a/OsmAnd/src/net/osmand/plus/widgets/FlowLayout.java
+++ b/OsmAnd/src/net/osmand/plus/widgets/FlowLayout.java
@@ -15,17 +15,17 @@ public class FlowLayout extends ViewGroup {
final int horizontal_spacing;
final int vertical_spacing;
- final boolean horizontalAutoSpacing;
+ final boolean isHorizontalAutoSpacing;
/**
* @param horizontal_spacing Pixels between items, horizontally
* @param vertical_spacing Pixels between items, vertically
*/
- public LayoutParams(int horizontal_spacing, int vertical_spacing, boolean horizontalAutoSpacing) {
+ public LayoutParams(int horizontal_spacing, int vertical_spacing, boolean isHorizontalAutoSpacing) {
super(0, 0);
this.horizontal_spacing = horizontal_spacing;
this.vertical_spacing = vertical_spacing;
- this.horizontalAutoSpacing = horizontalAutoSpacing;
+ this.isHorizontalAutoSpacing = isHorizontalAutoSpacing;
}
}
@@ -48,19 +48,19 @@ public class FlowLayout extends ViewGroup {
int line_height = 0;
int horizontalPosition = getPaddingLeft();
int verticalPosition = getPaddingTop();
- int childHeighteightMeasureSpec;
+ int childHeightMeasureSpec;
if (MeasureSpec.getMode(heightMeasureSpec) == MeasureSpec.AT_MOST) {
- childHeighteightMeasureSpec = MeasureSpec.makeMeasureSpec(height, MeasureSpec.AT_MOST);
+ childHeightMeasureSpec = MeasureSpec.makeMeasureSpec(height, MeasureSpec.AT_MOST);
} else {
- childHeighteightMeasureSpec = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);
+ childHeightMeasureSpec = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);
}
for (int i = 0; i < count; i++) {
final View child = getChildAt(i);
if (child.getVisibility() != GONE) {
final LayoutParams lp = (LayoutParams) child.getLayoutParams();
- child.measure(MeasureSpec.makeMeasureSpec(width, MeasureSpec.AT_MOST), childHeighteightMeasureSpec);
+ child.measure(MeasureSpec.makeMeasureSpec(width, MeasureSpec.AT_MOST), childHeightMeasureSpec);
final int childWidth = child.getMeasuredWidth();
line_height = Math.max(line_height, child.getMeasuredHeight() + lp.vertical_spacing);
if (horizontalPosition + childWidth > width) {
@@ -112,28 +112,34 @@ public class FlowLayout extends ViewGroup {
} else {
freeSizeSpacing = width % childWidth / itemsCount;
}
- if (isLayoutRtl) {
+ if (isLayoutRtl && lp.isHorizontalAutoSpacing) {
+ if (horizontalPosition - childWidth < getPaddingLeft()) {
+ horizontalPosition = width - getPaddingRight();
+ verticalPosition += line_height;
+ }
+ child.layout(horizontalPosition - childWidth, verticalPosition, horizontalPosition, verticalPosition + childHeight);
+ horizontalPosition -= childWidth + lp.horizontal_spacing + freeSizeSpacing;
+ } else if (isLayoutRtl) {
if (horizontalPosition - childWidth < l) {
horizontalPosition = width - getPaddingRight();
verticalPosition += line_height;
}
child.layout(horizontalPosition - childWidth, verticalPosition, horizontalPosition, verticalPosition + childHeight);
- if (lp.horizontalAutoSpacing) {
- horizontalPosition -= childWidth + lp.horizontal_spacing + freeSizeSpacing;
- } else {
- horizontalPosition -= childWidth + lp.horizontal_spacing;
+ horizontalPosition -= childWidth + lp.horizontal_spacing;
+ } else if (!lp.isHorizontalAutoSpacing) {
+ if (horizontalPosition + childWidth > width) {
+ horizontalPosition = getPaddingLeft();
+ verticalPosition += line_height;
}
+ child.layout(horizontalPosition, verticalPosition, horizontalPosition + childWidth, verticalPosition + childHeight);
+ horizontalPosition += childWidth + lp.horizontal_spacing;
} else {
if (horizontalPosition + childWidth > width) {
horizontalPosition = getPaddingLeft();
verticalPosition += line_height;
}
child.layout(horizontalPosition, verticalPosition, horizontalPosition + childWidth, verticalPosition + childHeight);
- if (lp.horizontalAutoSpacing) {
- horizontalPosition += childWidth + lp.horizontal_spacing + freeSizeSpacing;
- } else {
- horizontalPosition += childWidth + lp.horizontal_spacing;
- }
+ horizontalPosition += childWidth + lp.horizontal_spacing + freeSizeSpacing;
}
}
}
From 8027fb1f3453350588b54933e8c4f1de826e2e83 Mon Sep 17 00:00:00 2001
From: androiddevkotlin <64539346+androiddevkotlin@users.noreply.github.com>
Date: Mon, 1 Mar 2021 18:23:31 +0200
Subject: [PATCH 03/34] Refactor
---
.../net/osmand/plus/widgets/FlowLayout.java | 54 ++++++++++---------
1 file changed, 29 insertions(+), 25 deletions(-)
diff --git a/OsmAnd/src/net/osmand/plus/widgets/FlowLayout.java b/OsmAnd/src/net/osmand/plus/widgets/FlowLayout.java
index 979813e170..aba72b6feb 100644
--- a/OsmAnd/src/net/osmand/plus/widgets/FlowLayout.java
+++ b/OsmAnd/src/net/osmand/plus/widgets/FlowLayout.java
@@ -112,34 +112,38 @@ public class FlowLayout extends ViewGroup {
} else {
freeSizeSpacing = width % childWidth / itemsCount;
}
- if (isLayoutRtl && lp.isHorizontalAutoSpacing) {
- if (horizontalPosition - childWidth < getPaddingLeft()) {
- horizontalPosition = width - getPaddingRight();
- verticalPosition += line_height;
+ if (lp.isHorizontalAutoSpacing) {
+ if (isLayoutRtl) {
+ if (horizontalPosition - childWidth < getPaddingLeft()) {
+ horizontalPosition = width - getPaddingRight();
+ verticalPosition += line_height;
+ }
+ child.layout(horizontalPosition - childWidth, verticalPosition, horizontalPosition, verticalPosition + childHeight);
+ horizontalPosition -= childWidth + lp.horizontal_spacing + freeSizeSpacing;
+ } else {
+ if (horizontalPosition + childWidth > width) {
+ horizontalPosition = getPaddingLeft();
+ verticalPosition += line_height;
+ }
+ child.layout(horizontalPosition, verticalPosition, horizontalPosition + childWidth, verticalPosition + childHeight);
+ horizontalPosition += childWidth + lp.horizontal_spacing + freeSizeSpacing;
}
- child.layout(horizontalPosition - childWidth, verticalPosition, horizontalPosition, verticalPosition + childHeight);
- horizontalPosition -= childWidth + lp.horizontal_spacing + freeSizeSpacing;
- } else if (isLayoutRtl) {
- if (horizontalPosition - childWidth < l) {
- horizontalPosition = width - getPaddingRight();
- verticalPosition += line_height;
- }
- child.layout(horizontalPosition - childWidth, verticalPosition, horizontalPosition, verticalPosition + childHeight);
- horizontalPosition -= childWidth + lp.horizontal_spacing;
- } else if (!lp.isHorizontalAutoSpacing) {
- if (horizontalPosition + childWidth > width) {
- horizontalPosition = getPaddingLeft();
- verticalPosition += line_height;
- }
- child.layout(horizontalPosition, verticalPosition, horizontalPosition + childWidth, verticalPosition + childHeight);
- horizontalPosition += childWidth + lp.horizontal_spacing;
} else {
- if (horizontalPosition + childWidth > width) {
- horizontalPosition = getPaddingLeft();
- verticalPosition += line_height;
+ if (isLayoutRtl) {
+ if (horizontalPosition - childWidth < l) {
+ horizontalPosition = width - getPaddingRight();
+ verticalPosition += line_height;
+ }
+ child.layout(horizontalPosition - childWidth, verticalPosition, horizontalPosition, verticalPosition + childHeight);
+ horizontalPosition -= childWidth + lp.horizontal_spacing;
+ } else {
+ if (horizontalPosition + childWidth > width) {
+ horizontalPosition = getPaddingLeft();
+ verticalPosition += line_height;
+ }
+ child.layout(horizontalPosition, verticalPosition, horizontalPosition + childWidth, verticalPosition + childHeight);
+ horizontalPosition += childWidth + lp.horizontal_spacing;
}
- child.layout(horizontalPosition, verticalPosition, horizontalPosition + childWidth, verticalPosition + childHeight);
- horizontalPosition += childWidth + lp.horizontal_spacing + freeSizeSpacing;
}
}
}
From ca4de9fc8a6b515672d15f1b7a07617f0ddd47e9 Mon Sep 17 00:00:00 2001
From: androiddevkotlin <64539346+androiddevkotlin@users.noreply.github.com>
Date: Mon, 1 Mar 2021 22:25:46 +0200
Subject: [PATCH 04/34] description added
---
OsmAnd/src/net/osmand/plus/widgets/FlowLayout.java | 1 +
1 file changed, 1 insertion(+)
diff --git a/OsmAnd/src/net/osmand/plus/widgets/FlowLayout.java b/OsmAnd/src/net/osmand/plus/widgets/FlowLayout.java
index aba72b6feb..f34fcd9306 100644
--- a/OsmAnd/src/net/osmand/plus/widgets/FlowLayout.java
+++ b/OsmAnd/src/net/osmand/plus/widgets/FlowLayout.java
@@ -20,6 +20,7 @@ public class FlowLayout extends ViewGroup {
/**
* @param horizontal_spacing Pixels between items, horizontally
* @param vertical_spacing Pixels between items, vertically
+ * @param isHorizontalAutoSpacing Pixels between items to fit screen width. When is enabled horizontal_spacing does not take into account.
*/
public LayoutParams(int horizontal_spacing, int vertical_spacing, boolean isHorizontalAutoSpacing) {
super(0, 0);
From cfd7dfef6b5da1e2f7692af20c9482bba87e55e8 Mon Sep 17 00:00:00 2001
From: cepprice
Date: Wed, 3 Mar 2021 19:49:51 +0500
Subject: [PATCH 05/34] Implement updated library methods
---
OsmAnd/AndroidManifest.xml | 1 -
OsmAnd/build-common.gradle | 2 +-
.../osmand/plus/inapp/InAppPurchaseHelperImpl.java | 2 +-
OsmAnd/src/net/osmand/plus/inapp/InAppPurchases.java | 8 ++------
.../net/osmand/plus/inapp/util/BillingManager.java | 11 +++++++----
5 files changed, 11 insertions(+), 13 deletions(-)
diff --git a/OsmAnd/AndroidManifest.xml b/OsmAnd/AndroidManifest.xml
index 01f760954b..a1c3af7e30 100644
--- a/OsmAnd/AndroidManifest.xml
+++ b/OsmAnd/AndroidManifest.xml
@@ -16,7 +16,6 @@
-
diff --git a/OsmAnd/build-common.gradle b/OsmAnd/build-common.gradle
index 38dce71283..d0dd3dba86 100644
--- a/OsmAnd/build-common.gradle
+++ b/OsmAnd/build-common.gradle
@@ -348,7 +348,7 @@ dependencies {
implementation 'org.immutables:gson:2.5.0'
implementation 'com.vividsolutions:jts-core:1.14.0'
implementation 'com.google.openlocationcode:openlocationcode:1.0.4'
- implementation 'com.android.billingclient:billing:2.0.3'
+ implementation 'com.android.billingclient:billing:3.0.2'
// turn off for now
//implementation 'com.atilika.kuromoji:kuromoji-ipadic:0.9.0'
implementation 'com.squareup.picasso:picasso:2.71828'
diff --git a/OsmAnd/src-google/net/osmand/plus/inapp/InAppPurchaseHelperImpl.java b/OsmAnd/src-google/net/osmand/plus/inapp/InAppPurchaseHelperImpl.java
index d5ff6fcedf..8432742910 100644
--- a/OsmAnd/src-google/net/osmand/plus/inapp/InAppPurchaseHelperImpl.java
+++ b/OsmAnd/src-google/net/osmand/plus/inapp/InAppPurchaseHelperImpl.java
@@ -511,7 +511,7 @@ public class InAppPurchaseHelperImpl extends InAppPurchaseHelper {
String introductoryPrice = skuDetails.getIntroductoryPrice();
String introductoryPricePeriod = skuDetails.getIntroductoryPricePeriod();
- String introductoryPriceCycles = skuDetails.getIntroductoryPriceCycles();
+ int introductoryPriceCycles = skuDetails.getIntroductoryPriceCycles();
long introductoryPriceAmountMicros = skuDetails.getIntroductoryPriceAmountMicros();
if (!Algorithms.isEmpty(introductoryPrice)) {
try {
diff --git a/OsmAnd/src/net/osmand/plus/inapp/InAppPurchases.java b/OsmAnd/src/net/osmand/plus/inapp/InAppPurchases.java
index 7cc9a8fbee..e6ec431187 100644
--- a/OsmAnd/src/net/osmand/plus/inapp/InAppPurchases.java
+++ b/OsmAnd/src/net/osmand/plus/inapp/InAppPurchases.java
@@ -405,16 +405,12 @@ public abstract class InAppPurchases {
String introductoryPrice,
long introductoryPriceAmountMicros,
String introductoryPeriodString,
- String introductoryCycles) throws ParseException {
+ int introductoryCycles) throws ParseException {
this.subscription = subscription;
this.introductoryPrice = introductoryPrice;
this.introductoryPriceAmountMicros = introductoryPriceAmountMicros;
this.introductoryPeriodString = introductoryPeriodString;
- try {
- this.introductoryCycles = Integer.parseInt(introductoryCycles);
- } catch (NumberFormatException e) {
- throw new ParseException("Cannot parse introductoryCycles = " + introductoryCycles, 0);
- }
+ this.introductoryCycles = introductoryCycles;
introductoryPriceValue = introductoryPriceAmountMicros / 1000000d;
introductoryPeriod = Period.parse(introductoryPeriodString);
}
diff --git a/OsmAnd/src/net/osmand/plus/inapp/util/BillingManager.java b/OsmAnd/src/net/osmand/plus/inapp/util/BillingManager.java
index b5b3c654f9..561229d92c 100644
--- a/OsmAnd/src/net/osmand/plus/inapp/util/BillingManager.java
+++ b/OsmAnd/src/net/osmand/plus/inapp/util/BillingManager.java
@@ -135,18 +135,21 @@ public class BillingManager implements PurchasesUpdatedListener {
* Start a purchase flow
*/
public void initiatePurchaseFlow(final Activity activity, final SkuDetails skuDetails) {
- initiatePurchaseFlow(activity, skuDetails, null);
+ initiatePurchaseFlow(activity, skuDetails, null, null);
}
/**
* Start a purchase or subscription replace flow
*/
- public void initiatePurchaseFlow(final Activity activity, final SkuDetails skuDetails, final String oldSku) {
+ public void initiatePurchaseFlow(final Activity activity, final SkuDetails skuDetails, final String oldSku, final String purchaseToken) {
Runnable purchaseFlowRequest = new Runnable() {
@Override
public void run() {
- LOG.debug("Launching in-app purchase flow. Replace old SKU? " + (oldSku != null));
- BillingFlowParams purchaseParams = BillingFlowParams.newBuilder().setSkuDetails(skuDetails).setOldSku(oldSku).build();
+ BillingFlowParams.Builder paramsBuilder = BillingFlowParams.newBuilder().setSkuDetails(skuDetails);
+ if (oldSku != null) {
+ paramsBuilder.setOldSku(oldSku, purchaseToken);
+ }
+ BillingFlowParams purchaseParams = paramsBuilder.build();
mBillingClient.launchBillingFlow(activity, purchaseParams);
}
};
From cf8346187fba3eac2c4e82cb3db41905206ffa8f Mon Sep 17 00:00:00 2001
From: androiddevkotlin <64539346+androiddevkotlin@users.noreply.github.com>
Date: Thu, 4 Mar 2021 10:49:46 +0200
Subject: [PATCH 06/34] Review
---
OsmAnd/res/layout/colors_card.xml | 18 ++++---
OsmAnd/res/layout/point_editor_button.xml | 54 ++++++++-----------
.../res/layout/point_editor_fragment_new.xml | 7 ++-
.../editors/PointEditorFragmentNew.java | 12 +++--
.../cards/PublicTransportCard.java | 18 +++----
.../fragments/ProfileAppearanceFragment.java | 10 ++--
.../src/net/osmand/plus/track/ColorsCard.java | 47 ++++++++--------
.../net/osmand/plus/widgets/FlowLayout.java | 39 +++++++-------
8 files changed, 103 insertions(+), 102 deletions(-)
diff --git a/OsmAnd/res/layout/colors_card.xml b/OsmAnd/res/layout/colors_card.xml
index 5461aa1d9f..cade718b70 100644
--- a/OsmAnd/res/layout/colors_card.xml
+++ b/OsmAnd/res/layout/colors_card.xml
@@ -5,14 +5,20 @@
android:orientation="vertical">
+
+
+
+
\ No newline at end of file
diff --git a/OsmAnd/res/layout/point_editor_button.xml b/OsmAnd/res/layout/point_editor_button.xml
index a5677280e9..5b1a130ac1 100644
--- a/OsmAnd/res/layout/point_editor_button.xml
+++ b/OsmAnd/res/layout/point_editor_button.xml
@@ -2,40 +2,30 @@
+ android:layout_height="wrap_content">
-
+
-
+
-
+
-
-
diff --git a/OsmAnd/res/layout/point_editor_fragment_new.xml b/OsmAnd/res/layout/point_editor_fragment_new.xml
index 3e8657cd22..7339cbd460 100644
--- a/OsmAnd/res/layout/point_editor_fragment_new.xml
+++ b/OsmAnd/res/layout/point_editor_fragment_new.xml
@@ -449,12 +449,15 @@
osmand:typeface="@string/font_roboto_medium" />
-
+ android:layout_marginBottom="@dimen/content_padding_half"
+ android:orientation="horizontal"
+ android:layout_marginStart="@dimen/content_padding_small" />
MIN_WALK_TIME) {
- routesBadges.addView(createWalkRouteBadge(walkingSegment, badgesRowClickable), new FlowLayout.LayoutParams(itemsSpacing, itemsSpacing, false));
- routesBadges.addView(createArrow(), new FlowLayout.LayoutParams(itemsSpacing, itemsSpacing, false));
+ routesBadges.addView(createWalkRouteBadge(walkingSegment, badgesRowClickable), new FlowLayout.LayoutParams(itemsSpacing, itemsSpacing));
+ routesBadges.addView(createArrow(), new FlowLayout.LayoutParams(itemsSpacing, itemsSpacing));
}
} else if (s.walkDist > 0) {
double walkTime = getWalkTime(s.walkDist, routeResult.getWalkSpeed());
@@ -307,20 +307,20 @@ public class PublicTransportCard extends BaseCard {
} else {
start = this.startLocation;
}
- routesBadges.addView(createWalkRouteBadge(walkTime, start, end, badgesRowClickable), new FlowLayout.LayoutParams(itemsSpacing, itemsSpacing, false));
- routesBadges.addView(createArrow(), new FlowLayout.LayoutParams(itemsSpacing, itemsSpacing, false));
+ routesBadges.addView(createWalkRouteBadge(walkTime, start, end, badgesRowClickable), new FlowLayout.LayoutParams(itemsSpacing, itemsSpacing));
+ routesBadges.addView(createArrow(), new FlowLayout.LayoutParams(itemsSpacing, itemsSpacing));
}
}
- routesBadges.addView(createRouteBadge(s, badgesRowClickable), new FlowLayout.LayoutParams(itemsSpacing, itemsSpacing, false));
+ routesBadges.addView(createRouteBadge(s, badgesRowClickable), new FlowLayout.LayoutParams(itemsSpacing, itemsSpacing));
if (iterator.hasNext()) {
- routesBadges.addView(createArrow(), new FlowLayout.LayoutParams(itemsSpacing, itemsSpacing, false));
+ routesBadges.addView(createArrow(), new FlowLayout.LayoutParams(itemsSpacing, itemsSpacing));
} else {
walkingSegment = transportRoutingHelper.getWalkingRouteSegment(s, null);
if (walkingSegment != null) {
double walkTime = walkingSegment.getRoutingTime();
if (walkTime > MIN_WALK_TIME) {
- routesBadges.addView(createArrow(), new FlowLayout.LayoutParams(itemsSpacing, itemsSpacing, false));
- routesBadges.addView(createWalkRouteBadge(walkingSegment, badgesRowClickable), new FlowLayout.LayoutParams(itemsSpacing, itemsSpacing, false));
+ routesBadges.addView(createArrow(), new FlowLayout.LayoutParams(itemsSpacing, itemsSpacing));
+ routesBadges.addView(createWalkRouteBadge(walkingSegment, badgesRowClickable), new FlowLayout.LayoutParams(itemsSpacing, itemsSpacing));
}
} else {
double finishWalkDist = routeResult.getFinishWalkDist();
@@ -329,7 +329,7 @@ public class PublicTransportCard extends BaseCard {
if (walkTime > MIN_WALK_TIME) {
LatLon start = s.getEnd().getLocation();
LatLon end = this.endLocation;
- routesBadges.addView(createArrow(), new FlowLayout.LayoutParams(itemsSpacing, itemsSpacing, false));
+ routesBadges.addView(createArrow(), new FlowLayout.LayoutParams(itemsSpacing, itemsSpacing));
routesBadges.addView(createWalkRouteBadge(walkTime, start, end, badgesRowClickable));
}
}
diff --git a/OsmAnd/src/net/osmand/plus/settings/fragments/ProfileAppearanceFragment.java b/OsmAnd/src/net/osmand/plus/settings/fragments/ProfileAppearanceFragment.java
index 9b5a101e16..6bf120f61d 100644
--- a/OsmAnd/src/net/osmand/plus/settings/fragments/ProfileAppearanceFragment.java
+++ b/OsmAnd/src/net/osmand/plus/settings/fragments/ProfileAppearanceFragment.java
@@ -413,7 +413,8 @@ public class ProfileAppearanceFragment extends BaseSettingsFragment implements O
colorItems.removeAllViews();
for (ProfileIconColors color : ProfileIconColors.values()) {
View colorItem = createColorItemView(color, colorItems);
- colorItems.addView(colorItem, new FlowLayout.LayoutParams(0, 0, true));
+ colorItems.addView(colorItem, new FlowLayout.LayoutParams(0, 0));
+ colorItems.setHorizontalAutoSpacing(true);
}
updateColorSelector(changedProfile.color);
} else if (ICON_ITEMS.equals(preference.getKey())) {
@@ -422,7 +423,8 @@ public class ProfileAppearanceFragment extends BaseSettingsFragment implements O
ArrayList icons = ProfileIcons.getIcons();
for (int iconRes : icons) {
View iconItem = createIconItemView(iconRes, iconItems);
- iconItems.addView(iconItem, new FlowLayout.LayoutParams(0, 0,true));
+ iconItems.addView(iconItem, new FlowLayout.LayoutParams(0, 0));
+ iconItems.setHorizontalAutoSpacing(true);
}
setIconColor(changedProfile.iconRes);
} else if (LOCATION_ICON_ITEMS.equals(preference.getKey())) {
@@ -430,7 +432,7 @@ public class ProfileAppearanceFragment extends BaseSettingsFragment implements O
locationIconItems.removeAllViews();
for (LocationIcon locationIcon : LocationIcon.values()) {
View iconItemView = createLocationIconView(locationIcon, locationIconItems);
- locationIconItems.addView(iconItemView, new FlowLayout.LayoutParams(0, 0, false));
+ locationIconItems.addView(iconItemView, new FlowLayout.LayoutParams(0, 0));
}
updateLocationIconSelector(changedProfile.locationIcon);
} else if (NAV_ICON_ITEMS.equals(preference.getKey())) {
@@ -438,7 +440,7 @@ public class ProfileAppearanceFragment extends BaseSettingsFragment implements O
navIconItems.removeAllViews();
for (NavigationIcon navigationIcon : NavigationIcon.values()) {
View iconItemView = createNavigationIconView(navigationIcon, navIconItems);
- navIconItems.addView(iconItemView, new FlowLayout.LayoutParams(0, 0, false));
+ navIconItems.addView(iconItemView, new FlowLayout.LayoutParams(0, 0));
}
updateNavigationIconSelector(changedProfile.navigationIcon);
}
diff --git a/OsmAnd/src/net/osmand/plus/track/ColorsCard.java b/OsmAnd/src/net/osmand/plus/track/ColorsCard.java
index bbea36737c..8b74e0319b 100644
--- a/OsmAnd/src/net/osmand/plus/track/ColorsCard.java
+++ b/OsmAnd/src/net/osmand/plus/track/ColorsCard.java
@@ -3,9 +3,7 @@ package net.osmand.plus.track;
import android.graphics.drawable.Drawable;
import android.view.LayoutInflater;
import android.view.View;
-import android.view.ViewGroup;
import android.widget.ImageView;
-import android.widget.LinearLayout;
import androidx.annotation.ColorInt;
import androidx.annotation.NonNull;
@@ -22,6 +20,7 @@ import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.routepreparationmenu.cards.BaseCard;
import net.osmand.plus.track.CustomColorBottomSheet.ColorPickerListener;
import net.osmand.plus.widgets.FlowLayout;
+import net.osmand.plus.widgets.FlowLayout.LayoutParams;
import net.osmand.util.Algorithms;
import org.apache.commons.logging.Log;
@@ -87,35 +86,41 @@ public class ColorsCard extends BaseCard implements ColorPickerListener {
@Override
protected void updateContent() {
createColorSelector();
- updateColorSelector(selectedColor, view);
+ updateColorSelector(selectedColor);
}
private void createColorSelector() {
- FlowLayout selectColor = view.findViewById(R.id.select_color);
- selectColor.removeAllViews();
+ FlowLayout selectCustomColor = view.findViewById(R.id.select_custom_color);
+ selectCustomColor.removeAllViews();
+ selectCustomColor.setHorizontalAutoSpacing(true);
+ int minimalPaddingBetweenIcon = app.getResources().getDimensionPixelSize(R.dimen.favorites_select_icon_button_right_padding);
for (int color : customColors) {
- selectColor.addView(createColorItemView(color, selectColor, true), new FlowLayout.LayoutParams(0, 0, true));
+ selectCustomColor.addView(createColorItemView(color, selectCustomColor, true), new LayoutParams(minimalPaddingBetweenIcon, 0));
}
if (customColors.size() < 6) {
- selectColor.addView(createAddCustomColorItemView(selectColor), new FlowLayout.LayoutParams(0, 0, true));
+ selectCustomColor.addView(createAddCustomColorItemView(selectCustomColor), new LayoutParams(minimalPaddingBetweenIcon, 0));
}
- selectColor.addView(createDividerView(selectColor), new FlowLayout.LayoutParams(0, 0, false));
+
+ FlowLayout selectDefaultColor = view.findViewById(R.id.select_default_color);
+ selectDefaultColor.removeAllViews();
+ selectDefaultColor.setHorizontalAutoSpacing(true);
for (int color : colors) {
- selectColor.addView(createColorItemView(color, selectColor, false), new FlowLayout.LayoutParams(0, 0, true));
+ selectDefaultColor.addView(createColorItemView(color, selectDefaultColor, false), new LayoutParams(minimalPaddingBetweenIcon, 0));
}
- updateColorSelector(selectedColor, selectColor);
+ updateColorSelector(selectedColor);
}
- private void updateColorSelector(int color, View rootView) {
- View oldColor = rootView.findViewWithTag(selectedColor);
+ private void updateColorSelector(int color) {
+ View oldColor = view.findViewWithTag(selectedColor);
if (oldColor != null) {
oldColor.findViewById(R.id.outline).setVisibility(View.INVISIBLE);
ImageView icon = oldColor.findViewById(R.id.icon);
- icon.setImageDrawable(UiUtilities.tintDrawable(icon.getDrawable(), R.color.icon_color_default_light));
+ icon.setImageDrawable(UiUtilities.tintDrawable(icon.getDrawable(),
+ getResolvedColor(nightMode ? R.color.icon_color_default_dark : R.color.icon_color_default_light)));
}
- View newColor = rootView.findViewWithTag(color);
+ View newColor = view.findViewWithTag(color);
if (newColor != null) {
newColor.findViewById(R.id.outline).setVisibility(View.VISIBLE);
}
@@ -137,7 +142,7 @@ public class ColorsCard extends BaseCard implements ColorPickerListener {
backgroundCircle.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
- updateColorSelector(color, rootView);
+ updateColorSelector(color);
selectedColor = color;
CardListener listener = getListener();
@@ -187,17 +192,7 @@ public class ColorsCard extends BaseCard implements ColorPickerListener {
return colorItemView;
}
- private View createDividerView(FlowLayout rootView) {
- LayoutInflater themedInflater = UiUtilities.getInflater(view.getContext(), nightMode);
- View divider = themedInflater.inflate(R.layout.simple_divider_item, rootView, false);
-
- LinearLayout dividerContainer = new LinearLayout(view.getContext());
- dividerContainer.addView(divider);
- dividerContainer.setPadding(0, AndroidUtils.dpToPx(app, 1), 0, AndroidUtils.dpToPx(app, 5));
- return dividerContainer;
- }
-
- private View createCircleView(ViewGroup rootView) {
+ private View createCircleView(FlowLayout rootView) {
LayoutInflater themedInflater = UiUtilities.getInflater(view.getContext(), nightMode);
View circleView = themedInflater.inflate(R.layout.point_editor_button, rootView, false);
ImageView outline = circleView.findViewById(R.id.outline);
diff --git a/OsmAnd/src/net/osmand/plus/widgets/FlowLayout.java b/OsmAnd/src/net/osmand/plus/widgets/FlowLayout.java
index f34fcd9306..4b50139870 100644
--- a/OsmAnd/src/net/osmand/plus/widgets/FlowLayout.java
+++ b/OsmAnd/src/net/osmand/plus/widgets/FlowLayout.java
@@ -10,23 +10,21 @@ import net.osmand.AndroidUtils;
public class FlowLayout extends ViewGroup {
private int line_height;
+ private boolean horizontalAutoSpacing;
public static class LayoutParams extends ViewGroup.LayoutParams {
- final int horizontal_spacing;
- final int vertical_spacing;
- final boolean isHorizontalAutoSpacing;
+ final int horizontalSpacing;
+ final int verticalSpacing;
/**
- * @param horizontal_spacing Pixels between items, horizontally
- * @param vertical_spacing Pixels between items, vertically
- * @param isHorizontalAutoSpacing Pixels between items to fit screen width. When is enabled horizontal_spacing does not take into account.
+ * @param horizontalSpacing Pixels between items, horizontally
+ * @param verticalSpacing Pixels between items, vertically
*/
- public LayoutParams(int horizontal_spacing, int vertical_spacing, boolean isHorizontalAutoSpacing) {
+ public LayoutParams(int horizontalSpacing, int verticalSpacing) {
super(0, 0);
- this.horizontal_spacing = horizontal_spacing;
- this.vertical_spacing = vertical_spacing;
- this.isHorizontalAutoSpacing = isHorizontalAutoSpacing;
+ this.horizontalSpacing = horizontalSpacing;
+ this.verticalSpacing = verticalSpacing;
}
}
@@ -38,6 +36,11 @@ public class FlowLayout extends ViewGroup {
super(context, attrs);
}
+ // If true available horizontal space is added to items horizontalSpacing.
+ public void setHorizontalAutoSpacing(boolean horizontalAutoSpacing) {
+ this.horizontalAutoSpacing = horizontalAutoSpacing;
+ }
+
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
if ((MeasureSpec.getMode(widthMeasureSpec) == MeasureSpec.UNSPECIFIED))
@@ -63,12 +66,12 @@ public class FlowLayout extends ViewGroup {
final LayoutParams lp = (LayoutParams) child.getLayoutParams();
child.measure(MeasureSpec.makeMeasureSpec(width, MeasureSpec.AT_MOST), childHeightMeasureSpec);
final int childWidth = child.getMeasuredWidth();
- line_height = Math.max(line_height, child.getMeasuredHeight() + lp.vertical_spacing);
+ line_height = Math.max(line_height, child.getMeasuredHeight() + lp.verticalSpacing);
if (horizontalPosition + childWidth > width) {
horizontalPosition = getPaddingLeft();
verticalPosition += line_height;
}
- horizontalPosition += childWidth + lp.horizontal_spacing;
+ horizontalPosition += childWidth + lp.horizontalSpacing;
}
}
@@ -85,7 +88,7 @@ public class FlowLayout extends ViewGroup {
@Override
protected ViewGroup.LayoutParams generateDefaultLayoutParams() {
- return new LayoutParams(1, 1, false); // default of 1px spacing
+ return new LayoutParams(1, 1); // default of 1px spacing
}
@Override
@@ -113,21 +116,21 @@ public class FlowLayout extends ViewGroup {
} else {
freeSizeSpacing = width % childWidth / itemsCount;
}
- if (lp.isHorizontalAutoSpacing) {
+ if (horizontalAutoSpacing) {
if (isLayoutRtl) {
if (horizontalPosition - childWidth < getPaddingLeft()) {
horizontalPosition = width - getPaddingRight();
verticalPosition += line_height;
}
child.layout(horizontalPosition - childWidth, verticalPosition, horizontalPosition, verticalPosition + childHeight);
- horizontalPosition -= childWidth + lp.horizontal_spacing + freeSizeSpacing;
+ horizontalPosition -= childWidth + lp.horizontalSpacing + freeSizeSpacing;
} else {
if (horizontalPosition + childWidth > width) {
horizontalPosition = getPaddingLeft();
verticalPosition += line_height;
}
child.layout(horizontalPosition, verticalPosition, horizontalPosition + childWidth, verticalPosition + childHeight);
- horizontalPosition += childWidth + lp.horizontal_spacing + freeSizeSpacing;
+ horizontalPosition += childWidth + lp.horizontalSpacing + freeSizeSpacing;
}
} else {
if (isLayoutRtl) {
@@ -136,14 +139,14 @@ public class FlowLayout extends ViewGroup {
verticalPosition += line_height;
}
child.layout(horizontalPosition - childWidth, verticalPosition, horizontalPosition, verticalPosition + childHeight);
- horizontalPosition -= childWidth + lp.horizontal_spacing;
+ horizontalPosition -= childWidth + lp.horizontalSpacing;
} else {
if (horizontalPosition + childWidth > width) {
horizontalPosition = getPaddingLeft();
verticalPosition += line_height;
}
child.layout(horizontalPosition, verticalPosition, horizontalPosition + childWidth, verticalPosition + childHeight);
- horizontalPosition += childWidth + lp.horizontal_spacing;
+ horizontalPosition += childWidth + lp.horizontalSpacing;
}
}
}
From 6bf313c32ea26bcda425e61fdface3719b9994c3 Mon Sep 17 00:00:00 2001
From: cepprice
Date: Thu, 4 Mar 2021 13:35:38 +0500
Subject: [PATCH 07/34] Change data flow due to deprecated method
---
.../plus/inapp/InAppPurchaseHelperImpl.java | 69 ++++++++++++++-----
.../plus/inapp/InAppPurchaseHelper.java | 11 ++-
.../plus/inapp/util/BillingManager.java | 47 ++++++-------
3 files changed, 77 insertions(+), 50 deletions(-)
diff --git a/OsmAnd/src-google/net/osmand/plus/inapp/InAppPurchaseHelperImpl.java b/OsmAnd/src-google/net/osmand/plus/inapp/InAppPurchaseHelperImpl.java
index 8432742910..9e49aa7fc3 100644
--- a/OsmAnd/src-google/net/osmand/plus/inapp/InAppPurchaseHelperImpl.java
+++ b/OsmAnd/src-google/net/osmand/plus/inapp/InAppPurchaseHelperImpl.java
@@ -6,9 +6,7 @@ import android.content.Intent;
import android.net.Uri;
import android.widget.Toast;
-import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
-
+import com.android.billingclient.api.AccountIdentifiers;
import com.android.billingclient.api.BillingClient;
import com.android.billingclient.api.BillingResult;
import com.android.billingclient.api.Purchase;
@@ -25,7 +23,6 @@ import net.osmand.plus.inapp.InAppPurchases.InAppSubscription.SubscriptionState;
import net.osmand.plus.inapp.InAppPurchasesImpl.InAppPurchaseLiveUpdatesOldSubscription;
import net.osmand.plus.inapp.util.BillingManager;
import net.osmand.plus.settings.backend.CommonPreference;
-import net.osmand.plus.settings.backend.OsmandPreference;
import net.osmand.plus.settings.backend.OsmandSettings;
import net.osmand.plus.srtmplugin.SRTMPlugin;
import net.osmand.util.Algorithms;
@@ -37,6 +34,9 @@ import java.util.Arrays;
import java.util.List;
import java.util.Map.Entry;
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+
public class InAppPurchaseHelperImpl extends InAppPurchaseHelper {
// The helper object
@@ -197,6 +197,7 @@ public class InAppPurchaseHelperImpl extends InAppPurchaseHelper {
if (skuDetails == null) {
throw new IllegalArgumentException("Cannot find sku details");
}
+
BillingManager billingManager = getBillingManager();
if (billingManager != null) {
billingManager.initiatePurchaseFlow(activity, skuDetails);
@@ -442,19 +443,8 @@ public class InAppPurchaseHelperImpl extends InAppPurchaseHelper {
if (liveUpdatesPurchases.size() > 0) {
List tokensSent = Arrays.asList(settings.BILLING_PURCHASE_TOKENS_SENT.get().split(";"));
for (Purchase purchase : liveUpdatesPurchases) {
- if ((Algorithms.isEmpty(settings.BILLING_USER_ID.get()) || Algorithms.isEmpty(settings.BILLING_USER_TOKEN.get()))
- && !Algorithms.isEmpty(purchase.getDeveloperPayload())) {
- String payload = purchase.getDeveloperPayload();
- if (!Algorithms.isEmpty(payload)) {
- String[] arr = payload.split(" ");
- if (arr.length > 0) {
- settings.BILLING_USER_ID.set(arr[0]);
- }
- if (arr.length > 1) {
- token = arr[1];
- settings.BILLING_USER_TOKEN.set(token);
- }
- }
+ if (needRestoreUserInfo(settings)) {
+ restoreUserInfo(settings, purchase);
}
if (!tokensSent.contains(purchase.getSku())) {
tokensToSend.add(purchase);
@@ -469,6 +459,48 @@ public class InAppPurchaseHelperImpl extends InAppPurchaseHelper {
}
};
+ private void restoreUserInfo(OsmandSettings settings, Purchase purchase) {
+ boolean restored = restoreUserInfoUsingPayload(settings, purchase);
+ if (!restored) {
+ restoreUserInfoUsingAccountIdentifiers(settings, purchase);
+ }
+ }
+
+ private boolean restoreUserInfoUsingPayload(OsmandSettings settings, Purchase purchase) {
+ String payload = purchase.getDeveloperPayload();
+ if (Algorithms.isEmpty(payload)) {
+ return false;
+ }
+ String[] arr = payload.split(" ");
+ if (arr.length > 0) {
+ settings.BILLING_USER_ID.set(arr[0]);
+ }
+ if (arr.length > 1) {
+ token = arr[1];
+ settings.BILLING_USER_TOKEN.set(token);
+ }
+ return needRestoreUserInfo(settings);
+ }
+
+ private void restoreUserInfoUsingAccountIdentifiers(OsmandSettings settings, Purchase purchase) {
+ AccountIdentifiers accountInfo = purchase.getAccountIdentifiers();
+ if (accountInfo != null) {
+ String userId = accountInfo.getObfuscatedAccountId();
+ String userToken = accountInfo.getObfuscatedProfileId();
+ if (Algorithms.isEmpty(settings.BILLING_USER_ID.get()) && !Algorithms.isEmpty(userId)) {
+ settings.BILLING_USER_ID.set(userId);
+ }
+ if (Algorithms.isEmpty(settings.BILLING_USER_TOKEN.get()) && !Algorithms.isEmpty(userToken)) {
+ token = userToken;
+ settings.BILLING_USER_TOKEN.set(userToken);
+ }
+ }
+ }
+
+ private boolean needRestoreUserInfo(OsmandSettings settings) {
+ return Algorithms.isEmpty(settings.BILLING_USER_ID.get()) || Algorithms.isEmpty(settings.BILLING_USER_TOKEN.get());
+ }
+
private PurchaseInfo getPurchaseInfo(Purchase purchase) {
return new PurchaseInfo(purchase.getSku(), purchase.getOrderId(), purchase.getPurchaseToken());
}
@@ -524,7 +556,7 @@ public class InAppPurchaseHelperImpl extends InAppPurchaseHelper {
}
}
- protected InAppCommand getPurchaseLiveUpdatesCommand(final WeakReference activity, final String sku, final String payload) {
+ protected InAppCommand getPurchaseLiveUpdatesCommand(final WeakReference activity, final String sku) {
return new InAppCommand() {
@Override
public void run(InAppPurchaseHelper helper) {
@@ -534,7 +566,6 @@ public class InAppPurchaseHelperImpl extends InAppPurchaseHelper {
if (AndroidUtils.isActivityNotDestroyed(a) && skuDetails != null) {
BillingManager billingManager = getBillingManager();
if (billingManager != null) {
- billingManager.setPayload(payload);
billingManager.initiatePurchaseFlow(a, skuDetails);
} else {
throw new IllegalStateException("BillingManager disposed");
diff --git a/OsmAnd/src/net/osmand/plus/inapp/InAppPurchaseHelper.java b/OsmAnd/src/net/osmand/plus/inapp/InAppPurchaseHelper.java
index 48fd643099..9ed4f4c694 100644
--- a/OsmAnd/src/net/osmand/plus/inapp/InAppPurchaseHelper.java
+++ b/OsmAnd/src/net/osmand/plus/inapp/InAppPurchaseHelper.java
@@ -8,9 +8,6 @@ import android.os.AsyncTask;
import android.text.TextUtils;
import android.util.Log;
-import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
-
import net.osmand.AndroidNetworkUtils;
import net.osmand.AndroidNetworkUtils.OnRequestResultListener;
import net.osmand.AndroidNetworkUtils.OnRequestsResultListener;
@@ -43,6 +40,9 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+
public abstract class InAppPurchaseHelper {
// Debug tag, for logging
protected static final org.apache.commons.logging.Log LOG = PlatformUtil.getLog(InAppPurchaseHelper.class);
@@ -364,8 +364,7 @@ public abstract class InAppPurchaseHelper {
notifyDismissProgress(InAppPurchaseTaskType.PURCHASE_LIVE_UPDATES);
if (!Algorithms.isEmpty(userId) && !Algorithms.isEmpty(token)) {
logDebug("Launching purchase flow for live updates subscription for userId=" + userId);
- final String payload = userId + " " + token;
- exec(InAppPurchaseTaskType.PURCHASE_LIVE_UPDATES, getPurchaseLiveUpdatesCommand(activity, sku, payload));
+ exec(InAppPurchaseTaskType.PURCHASE_LIVE_UPDATES, getPurchaseLiveUpdatesCommand(activity, sku));
} else {
notifyError(InAppPurchaseTaskType.PURCHASE_LIVE_UPDATES, "Empty userId");
stop(true);
@@ -374,7 +373,7 @@ public abstract class InAppPurchaseHelper {
}
protected abstract InAppCommand getPurchaseLiveUpdatesCommand(final WeakReference activity,
- final String sku, final String payload) throws UnsupportedOperationException;
+ final String sku) throws UnsupportedOperationException;
@SuppressLint("StaticFieldLeak")
private class RequestInventoryTask extends AsyncTask {
diff --git a/OsmAnd/src/net/osmand/plus/inapp/util/BillingManager.java b/OsmAnd/src/net/osmand/plus/inapp/util/BillingManager.java
index 561229d92c..306bfd7cbb 100644
--- a/OsmAnd/src/net/osmand/plus/inapp/util/BillingManager.java
+++ b/OsmAnd/src/net/osmand/plus/inapp/util/BillingManager.java
@@ -3,9 +3,6 @@ package net.osmand.plus.inapp.util;
import android.app.Activity;
import android.content.Context;
-import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
-
import com.android.billingclient.api.AcknowledgePurchaseParams;
import com.android.billingclient.api.AcknowledgePurchaseResponseListener;
import com.android.billingclient.api.BillingClient;
@@ -25,7 +22,8 @@ import com.android.billingclient.api.SkuDetailsParams;
import com.android.billingclient.api.SkuDetailsResponseListener;
import net.osmand.PlatformUtil;
-import net.osmand.util.Algorithms;
+import net.osmand.plus.OsmandApplication;
+import net.osmand.plus.settings.backend.OsmandSettings;
import java.util.ArrayList;
import java.util.Collections;
@@ -33,6 +31,9 @@ import java.util.HashSet;
import java.util.List;
import java.util.Set;
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+
/**
* Handles all the interactions with Play Store (via Billing library), maintains connection to
* it through BillingClient and caches temporary states/data if needed
@@ -58,7 +59,6 @@ public class BillingManager implements PurchasesUpdatedListener {
// Public key for verifying signature, in base64 encoding
private String mSignatureBase64;
- private String mPayload;
private final BillingUpdatesListener mBillingUpdatesListener;
private final List mPurchases = new ArrayList<>();
@@ -145,7 +145,11 @@ public class BillingManager implements PurchasesUpdatedListener {
Runnable purchaseFlowRequest = new Runnable() {
@Override
public void run() {
- BillingFlowParams.Builder paramsBuilder = BillingFlowParams.newBuilder().setSkuDetails(skuDetails);
+ OsmandSettings settings = getSettings(activity);
+ BillingFlowParams.Builder paramsBuilder = BillingFlowParams.newBuilder()
+ .setSkuDetails(skuDetails)
+ .setObfuscatedAccountId(settings.BILLING_USER_ID.get())
+ .setObfuscatedProfileId(settings.BILLING_USER_TOKEN.get());
if (oldSku != null) {
paramsBuilder.setOldSku(oldSku, purchaseToken);
}
@@ -180,9 +184,11 @@ public class BillingManager implements PurchasesUpdatedListener {
@Override
public void run() {
// Query the purchase async
- SkuDetailsParams.Builder params = SkuDetailsParams.newBuilder();
- params.setSkusList(skuList).setType(itemType);
- mBillingClient.querySkuDetailsAsync(params.build(),
+ SkuDetailsParams params = SkuDetailsParams.newBuilder()
+ .setSkusList(skuList)
+ .setType(itemType)
+ .build();
+ mBillingClient.querySkuDetailsAsync(params,
new SkuDetailsResponseListener() {
@Override
public void onSkuDetailsResponse(BillingResult billingResult, List skuDetailsList) {
@@ -250,15 +256,6 @@ public class BillingManager implements PurchasesUpdatedListener {
return Collections.unmodifiableList(mPurchases);
}
-
- public String getPayload() {
- return mPayload;
- }
-
- public void setPayload(String payload) {
- this.mPayload = payload;
- }
-
/**
* Handles the purchase
*
Note: Notice that for each purchase, we check if signature is valid on the client.
@@ -277,13 +274,9 @@ public class BillingManager implements PurchasesUpdatedListener {
if (purchase.getPurchaseState() == Purchase.PurchaseState.PURCHASED) {
// Acknowledge the purchase if it hasn't already been acknowledged.
if (!purchase.isAcknowledged()) {
- AcknowledgePurchaseParams.Builder builder =
- AcknowledgePurchaseParams.newBuilder()
- .setPurchaseToken(purchase.getPurchaseToken());
- if (!Algorithms.isEmpty(mPayload)) {
- builder.setDeveloperPayload(mPayload);
- }
- AcknowledgePurchaseParams acknowledgePurchaseParams = builder.build();
+ AcknowledgePurchaseParams acknowledgePurchaseParams = AcknowledgePurchaseParams.newBuilder()
+ .setPurchaseToken(purchase.getPurchaseToken())
+ .build();
mBillingClient.acknowledgePurchase(acknowledgePurchaseParams, new AcknowledgePurchaseResponseListener() {
@Override
public void onAcknowledgePurchaseResponse(BillingResult billingResult) {
@@ -419,6 +412,10 @@ public class BillingManager implements PurchasesUpdatedListener {
private boolean verifyValidSignature(String signedData, String signature) {
return Security.verifyPurchase(mSignatureBase64, signedData, signature);
}
+
+ private OsmandSettings getSettings(Activity activity) {
+ return ((OsmandApplication) activity.getApplication()).getSettings();
+ }
}
From 9da63447c146ef5486f63112b7fede610c56925c Mon Sep 17 00:00:00 2001
From: cepprice
Date: Fri, 5 Mar 2021 10:17:35 +0500
Subject: [PATCH 08/34] Small fix
---
OsmAnd/src/net/osmand/plus/inapp/util/BillingManager.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/OsmAnd/src/net/osmand/plus/inapp/util/BillingManager.java b/OsmAnd/src/net/osmand/plus/inapp/util/BillingManager.java
index 306bfd7cbb..96cd974485 100644
--- a/OsmAnd/src/net/osmand/plus/inapp/util/BillingManager.java
+++ b/OsmAnd/src/net/osmand/plus/inapp/util/BillingManager.java
@@ -145,12 +145,13 @@ public class BillingManager implements PurchasesUpdatedListener {
Runnable purchaseFlowRequest = new Runnable() {
@Override
public void run() {
+ LOG.debug("Launching in-app purchase flow. Replace old SKU? " + (oldSku != null && purchaseToken != null));
OsmandSettings settings = getSettings(activity);
BillingFlowParams.Builder paramsBuilder = BillingFlowParams.newBuilder()
.setSkuDetails(skuDetails)
.setObfuscatedAccountId(settings.BILLING_USER_ID.get())
.setObfuscatedProfileId(settings.BILLING_USER_TOKEN.get());
- if (oldSku != null) {
+ if (oldSku != null && purchaseToken != null) {
paramsBuilder.setOldSku(oldSku, purchaseToken);
}
BillingFlowParams purchaseParams = paramsBuilder.build();
From d47a19eff837c6d67831e1e5602bdeb75bb99abe Mon Sep 17 00:00:00 2001
From: nazar-kutz
Date: Fri, 5 Mar 2021 14:54:01 +0200
Subject: [PATCH 09/34] Provide description of stateless objects in the
constructor of OnlineRoutingEngine
---
.../osmand/plus/onlinerouting/engine/OnlineRoutingEngine.java | 2 ++
1 file changed, 2 insertions(+)
diff --git a/OsmAnd/src/net/osmand/plus/onlinerouting/engine/OnlineRoutingEngine.java b/OsmAnd/src/net/osmand/plus/onlinerouting/engine/OnlineRoutingEngine.java
index 670375c0b5..f296115c3e 100644
--- a/OsmAnd/src/net/osmand/plus/onlinerouting/engine/OnlineRoutingEngine.java
+++ b/OsmAnd/src/net/osmand/plus/onlinerouting/engine/OnlineRoutingEngine.java
@@ -41,6 +41,8 @@ public abstract class OnlineRoutingEngine implements Cloneable {
private final Set allowedParameters = new HashSet<>();
public OnlineRoutingEngine(@Nullable Map params) {
+ // Params represents the entire state of an engine object.
+ // An engine object with null params used only to provide information about the engine type
if (!isEmpty(params)) {
this.params.putAll(params);
}
From 83bd81eea7562c96c0559e0bfa5f8c9e68783dcb Mon Sep 17 00:00:00 2001
From: cepprice
Date: Fri, 5 Mar 2021 20:27:49 +0500
Subject: [PATCH 10/34] Remove Osmand code from class
---
.../plus/inapp/InAppPurchaseHelperImpl.java | 9 ++++++
.../plus/inapp/util/BillingManager.java | 28 ++++++++++++-------
2 files changed, 27 insertions(+), 10 deletions(-)
diff --git a/OsmAnd/src-google/net/osmand/plus/inapp/InAppPurchaseHelperImpl.java b/OsmAnd/src-google/net/osmand/plus/inapp/InAppPurchaseHelperImpl.java
index 9e49aa7fc3..7ea9e7a1d3 100644
--- a/OsmAnd/src-google/net/osmand/plus/inapp/InAppPurchaseHelperImpl.java
+++ b/OsmAnd/src-google/net/osmand/plus/inapp/InAppPurchaseHelperImpl.java
@@ -200,6 +200,7 @@ public class InAppPurchaseHelperImpl extends InAppPurchaseHelper {
BillingManager billingManager = getBillingManager();
if (billingManager != null) {
+ storeUserInfo(billingManager);
billingManager.initiatePurchaseFlow(activity, skuDetails);
} else {
throw new IllegalStateException("BillingManager disposed");
@@ -227,6 +228,7 @@ public class InAppPurchaseHelperImpl extends InAppPurchaseHelper {
}
BillingManager billingManager = getBillingManager();
if (billingManager != null) {
+ storeUserInfo(billingManager);
billingManager.initiatePurchaseFlow(activity, skuDetails);
} else {
throw new IllegalStateException("BillingManager disposed");
@@ -566,6 +568,7 @@ public class InAppPurchaseHelperImpl extends InAppPurchaseHelper {
if (AndroidUtils.isActivityNotDestroyed(a) && skuDetails != null) {
BillingManager billingManager = getBillingManager();
if (billingManager != null) {
+ storeUserInfo(billingManager);
billingManager.initiatePurchaseFlow(a, skuDetails);
} else {
throw new IllegalStateException("BillingManager disposed");
@@ -617,6 +620,12 @@ public class InAppPurchaseHelperImpl extends InAppPurchaseHelper {
onPurchaseDone(getPurchaseInfo(purchase));
}
+ private void storeUserInfo(BillingManager billingManager) {
+ OsmandSettings settings = ctx.getSettings();
+ billingManager.setUserId(settings.BILLING_USER_ID.get());
+ billingManager.setUserToken(settings.BILLING_USER_TOKEN.get());
+ }
+
@Override
protected boolean isBillingManagerExists() {
return getBillingManager() != null;
diff --git a/OsmAnd/src/net/osmand/plus/inapp/util/BillingManager.java b/OsmAnd/src/net/osmand/plus/inapp/util/BillingManager.java
index 96cd974485..f06d577219 100644
--- a/OsmAnd/src/net/osmand/plus/inapp/util/BillingManager.java
+++ b/OsmAnd/src/net/osmand/plus/inapp/util/BillingManager.java
@@ -2,6 +2,7 @@ package net.osmand.plus.inapp.util;
import android.app.Activity;
import android.content.Context;
+import android.text.TextUtils;
import com.android.billingclient.api.AcknowledgePurchaseParams;
import com.android.billingclient.api.AcknowledgePurchaseResponseListener;
@@ -22,8 +23,6 @@ import com.android.billingclient.api.SkuDetailsParams;
import com.android.billingclient.api.SkuDetailsResponseListener;
import net.osmand.PlatformUtil;
-import net.osmand.plus.OsmandApplication;
-import net.osmand.plus.settings.backend.OsmandSettings;
import java.util.ArrayList;
import java.util.Collections;
@@ -59,6 +58,8 @@ public class BillingManager implements PurchasesUpdatedListener {
// Public key for verifying signature, in base64 encoding
private String mSignatureBase64;
+ private String mUserId;
+ private String mUserToken;
private final BillingUpdatesListener mBillingUpdatesListener;
private final List mPurchases = new ArrayList<>();
@@ -146,11 +147,14 @@ public class BillingManager implements PurchasesUpdatedListener {
@Override
public void run() {
LOG.debug("Launching in-app purchase flow. Replace old SKU? " + (oldSku != null && purchaseToken != null));
- OsmandSettings settings = getSettings(activity);
BillingFlowParams.Builder paramsBuilder = BillingFlowParams.newBuilder()
- .setSkuDetails(skuDetails)
- .setObfuscatedAccountId(settings.BILLING_USER_ID.get())
- .setObfuscatedProfileId(settings.BILLING_USER_TOKEN.get());
+ .setSkuDetails(skuDetails);
+ if (!TextUtils.isEmpty(mUserId)) {
+ paramsBuilder.setObfuscatedAccountId(mUserId);
+ }
+ if (!TextUtils.isEmpty(mUserToken)) {
+ paramsBuilder.setObfuscatedProfileId(mUserToken);
+ }
if (oldSku != null && purchaseToken != null) {
paramsBuilder.setOldSku(oldSku, purchaseToken);
}
@@ -401,6 +405,14 @@ public class BillingManager implements PurchasesUpdatedListener {
});
}
+ public void setUserId(String userId) {
+ mUserId = userId;
+ }
+
+ public void setUserToken(String userToken) {
+ mUserToken = userToken;
+ }
+
private void executeServiceRequest(Runnable runnable) {
if (mIsServiceConnected) {
runnable.run();
@@ -413,10 +425,6 @@ public class BillingManager implements PurchasesUpdatedListener {
private boolean verifyValidSignature(String signedData, String signature) {
return Security.verifyPurchase(mSignatureBase64, signedData, signature);
}
-
- private OsmandSettings getSettings(Activity activity) {
- return ((OsmandApplication) activity.getApplication()).getSettings();
- }
}
From 82f2138c07c91b45e687a3e01bb5a65fbea71c58 Mon Sep 17 00:00:00 2001
From: cepprice
Date: Fri, 5 Mar 2021 20:41:40 +0500
Subject: [PATCH 11/34] Small renaming
---
.../plus/inapp/InAppPurchaseHelperImpl.java | 12 +++++------
.../plus/inapp/util/BillingManager.java | 20 +++++++++----------
2 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/OsmAnd/src-google/net/osmand/plus/inapp/InAppPurchaseHelperImpl.java b/OsmAnd/src-google/net/osmand/plus/inapp/InAppPurchaseHelperImpl.java
index 7ea9e7a1d3..cab2719f80 100644
--- a/OsmAnd/src-google/net/osmand/plus/inapp/InAppPurchaseHelperImpl.java
+++ b/OsmAnd/src-google/net/osmand/plus/inapp/InAppPurchaseHelperImpl.java
@@ -200,7 +200,7 @@ public class InAppPurchaseHelperImpl extends InAppPurchaseHelper {
BillingManager billingManager = getBillingManager();
if (billingManager != null) {
- storeUserInfo(billingManager);
+ setupUserInfo(billingManager);
billingManager.initiatePurchaseFlow(activity, skuDetails);
} else {
throw new IllegalStateException("BillingManager disposed");
@@ -228,7 +228,7 @@ public class InAppPurchaseHelperImpl extends InAppPurchaseHelper {
}
BillingManager billingManager = getBillingManager();
if (billingManager != null) {
- storeUserInfo(billingManager);
+ setupUserInfo(billingManager);
billingManager.initiatePurchaseFlow(activity, skuDetails);
} else {
throw new IllegalStateException("BillingManager disposed");
@@ -568,7 +568,7 @@ public class InAppPurchaseHelperImpl extends InAppPurchaseHelper {
if (AndroidUtils.isActivityNotDestroyed(a) && skuDetails != null) {
BillingManager billingManager = getBillingManager();
if (billingManager != null) {
- storeUserInfo(billingManager);
+ setupUserInfo(billingManager);
billingManager.initiatePurchaseFlow(a, skuDetails);
} else {
throw new IllegalStateException("BillingManager disposed");
@@ -620,10 +620,10 @@ public class InAppPurchaseHelperImpl extends InAppPurchaseHelper {
onPurchaseDone(getPurchaseInfo(purchase));
}
- private void storeUserInfo(BillingManager billingManager) {
+ private void setupUserInfo(BillingManager billingManager) {
OsmandSettings settings = ctx.getSettings();
- billingManager.setUserId(settings.BILLING_USER_ID.get());
- billingManager.setUserToken(settings.BILLING_USER_TOKEN.get());
+ billingManager.setObfuscatedAccountId(settings.BILLING_USER_ID.get());
+ billingManager.setObfuscatedProfileId(settings.BILLING_USER_TOKEN.get());
}
@Override
diff --git a/OsmAnd/src/net/osmand/plus/inapp/util/BillingManager.java b/OsmAnd/src/net/osmand/plus/inapp/util/BillingManager.java
index f06d577219..b11bcaec80 100644
--- a/OsmAnd/src/net/osmand/plus/inapp/util/BillingManager.java
+++ b/OsmAnd/src/net/osmand/plus/inapp/util/BillingManager.java
@@ -58,8 +58,8 @@ public class BillingManager implements PurchasesUpdatedListener {
// Public key for verifying signature, in base64 encoding
private String mSignatureBase64;
- private String mUserId;
- private String mUserToken;
+ private String mObfuscatedAccountId;
+ private String mObfuscatedProfileId;
private final BillingUpdatesListener mBillingUpdatesListener;
private final List mPurchases = new ArrayList<>();
@@ -149,11 +149,11 @@ public class BillingManager implements PurchasesUpdatedListener {
LOG.debug("Launching in-app purchase flow. Replace old SKU? " + (oldSku != null && purchaseToken != null));
BillingFlowParams.Builder paramsBuilder = BillingFlowParams.newBuilder()
.setSkuDetails(skuDetails);
- if (!TextUtils.isEmpty(mUserId)) {
- paramsBuilder.setObfuscatedAccountId(mUserId);
+ if (!TextUtils.isEmpty(mObfuscatedAccountId)) {
+ paramsBuilder.setObfuscatedAccountId(mObfuscatedAccountId);
}
- if (!TextUtils.isEmpty(mUserToken)) {
- paramsBuilder.setObfuscatedProfileId(mUserToken);
+ if (!TextUtils.isEmpty(mObfuscatedProfileId)) {
+ paramsBuilder.setObfuscatedProfileId(mObfuscatedProfileId);
}
if (oldSku != null && purchaseToken != null) {
paramsBuilder.setOldSku(oldSku, purchaseToken);
@@ -405,12 +405,12 @@ public class BillingManager implements PurchasesUpdatedListener {
});
}
- public void setUserId(String userId) {
- mUserId = userId;
+ public void setObfuscatedAccountId(String obfuscatedAccountId) {
+ mObfuscatedAccountId = obfuscatedAccountId;
}
- public void setUserToken(String userToken) {
- mUserToken = userToken;
+ public void setObfuscatedProfileId(String obfuscatedProfileId) {
+ mObfuscatedProfileId = obfuscatedProfileId;
}
private void executeServiceRequest(Runnable runnable) {
From 6efb6f27b387c884bc7e7d7795402dbbd9c9e787 Mon Sep 17 00:00:00 2001
From: cepprice
Date: Fri, 5 Mar 2021 21:27:58 +0500
Subject: [PATCH 12/34] Small refactoring
---
.../plus/inapp/InAppPurchaseHelperImpl.java | 43 +++++--------------
.../plus/inapp/util/BillingManager.java | 8 ----
2 files changed, 10 insertions(+), 41 deletions(-)
diff --git a/OsmAnd/src-google/net/osmand/plus/inapp/InAppPurchaseHelperImpl.java b/OsmAnd/src-google/net/osmand/plus/inapp/InAppPurchaseHelperImpl.java
index cab2719f80..4459c49510 100644
--- a/OsmAnd/src-google/net/osmand/plus/inapp/InAppPurchaseHelperImpl.java
+++ b/OsmAnd/src-google/net/osmand/plus/inapp/InAppPurchaseHelperImpl.java
@@ -6,7 +6,6 @@ import android.content.Intent;
import android.net.Uri;
import android.widget.Toast;
-import com.android.billingclient.api.AccountIdentifiers;
import com.android.billingclient.api.BillingClient;
import com.android.billingclient.api.BillingResult;
import com.android.billingclient.api.Purchase;
@@ -200,7 +199,6 @@ public class InAppPurchaseHelperImpl extends InAppPurchaseHelper {
BillingManager billingManager = getBillingManager();
if (billingManager != null) {
- setupUserInfo(billingManager);
billingManager.initiatePurchaseFlow(activity, skuDetails);
} else {
throw new IllegalStateException("BillingManager disposed");
@@ -228,7 +226,6 @@ public class InAppPurchaseHelperImpl extends InAppPurchaseHelper {
}
BillingManager billingManager = getBillingManager();
if (billingManager != null) {
- setupUserInfo(billingManager);
billingManager.initiatePurchaseFlow(activity, skuDetails);
} else {
throw new IllegalStateException("BillingManager disposed");
@@ -462,43 +459,27 @@ public class InAppPurchaseHelperImpl extends InAppPurchaseHelper {
};
private void restoreUserInfo(OsmandSettings settings, Purchase purchase) {
- boolean restored = restoreUserInfoUsingPayload(settings, purchase);
+ boolean restored = restoreUserInfoFromString(settings, purchase.getDeveloperPayload());
if (!restored) {
- restoreUserInfoUsingAccountIdentifiers(settings, purchase);
+ restoreUserInfoFromString(settings, purchase.getAccountIdentifiers().getObfuscatedAccountId());
}
}
- private boolean restoreUserInfoUsingPayload(OsmandSettings settings, Purchase purchase) {
- String payload = purchase.getDeveloperPayload();
- if (Algorithms.isEmpty(payload)) {
+ private boolean restoreUserInfoFromString(OsmandSettings settings, String userInfo) {
+ if (Algorithms.isEmpty(userInfo)) {
return false;
}
- String[] arr = payload.split(" ");
- if (arr.length > 0) {
+ String[] arr = userInfo.split(" ");
+ if (arr.length > 0 && !Algorithms.isEmpty(settings.BILLING_USER_ID.get())) {
settings.BILLING_USER_ID.set(arr[0]);
}
- if (arr.length > 1) {
+ if (arr.length > 1 && !Algorithms.isEmpty(settings.BILLING_USER_TOKEN.get())) {
token = arr[1];
settings.BILLING_USER_TOKEN.set(token);
}
return needRestoreUserInfo(settings);
}
- private void restoreUserInfoUsingAccountIdentifiers(OsmandSettings settings, Purchase purchase) {
- AccountIdentifiers accountInfo = purchase.getAccountIdentifiers();
- if (accountInfo != null) {
- String userId = accountInfo.getObfuscatedAccountId();
- String userToken = accountInfo.getObfuscatedProfileId();
- if (Algorithms.isEmpty(settings.BILLING_USER_ID.get()) && !Algorithms.isEmpty(userId)) {
- settings.BILLING_USER_ID.set(userId);
- }
- if (Algorithms.isEmpty(settings.BILLING_USER_TOKEN.get()) && !Algorithms.isEmpty(userToken)) {
- token = userToken;
- settings.BILLING_USER_TOKEN.set(userToken);
- }
- }
- }
-
private boolean needRestoreUserInfo(OsmandSettings settings) {
return Algorithms.isEmpty(settings.BILLING_USER_ID.get()) || Algorithms.isEmpty(settings.BILLING_USER_TOKEN.get());
}
@@ -568,7 +549,9 @@ public class InAppPurchaseHelperImpl extends InAppPurchaseHelper {
if (AndroidUtils.isActivityNotDestroyed(a) && skuDetails != null) {
BillingManager billingManager = getBillingManager();
if (billingManager != null) {
- setupUserInfo(billingManager);
+ OsmandSettings settings = ctx.getSettings();
+ String userCredential = settings.BILLING_USER_ID.get() + settings.BILLING_USER_TOKEN.get();
+ billingManager.setObfuscatedAccountId(userCredential);
billingManager.initiatePurchaseFlow(a, skuDetails);
} else {
throw new IllegalStateException("BillingManager disposed");
@@ -620,12 +603,6 @@ public class InAppPurchaseHelperImpl extends InAppPurchaseHelper {
onPurchaseDone(getPurchaseInfo(purchase));
}
- private void setupUserInfo(BillingManager billingManager) {
- OsmandSettings settings = ctx.getSettings();
- billingManager.setObfuscatedAccountId(settings.BILLING_USER_ID.get());
- billingManager.setObfuscatedProfileId(settings.BILLING_USER_TOKEN.get());
- }
-
@Override
protected boolean isBillingManagerExists() {
return getBillingManager() != null;
diff --git a/OsmAnd/src/net/osmand/plus/inapp/util/BillingManager.java b/OsmAnd/src/net/osmand/plus/inapp/util/BillingManager.java
index b11bcaec80..b0446f35d4 100644
--- a/OsmAnd/src/net/osmand/plus/inapp/util/BillingManager.java
+++ b/OsmAnd/src/net/osmand/plus/inapp/util/BillingManager.java
@@ -59,7 +59,6 @@ public class BillingManager implements PurchasesUpdatedListener {
// Public key for verifying signature, in base64 encoding
private String mSignatureBase64;
private String mObfuscatedAccountId;
- private String mObfuscatedProfileId;
private final BillingUpdatesListener mBillingUpdatesListener;
private final List mPurchases = new ArrayList<>();
@@ -152,9 +151,6 @@ public class BillingManager implements PurchasesUpdatedListener {
if (!TextUtils.isEmpty(mObfuscatedAccountId)) {
paramsBuilder.setObfuscatedAccountId(mObfuscatedAccountId);
}
- if (!TextUtils.isEmpty(mObfuscatedProfileId)) {
- paramsBuilder.setObfuscatedProfileId(mObfuscatedProfileId);
- }
if (oldSku != null && purchaseToken != null) {
paramsBuilder.setOldSku(oldSku, purchaseToken);
}
@@ -409,10 +405,6 @@ public class BillingManager implements PurchasesUpdatedListener {
mObfuscatedAccountId = obfuscatedAccountId;
}
- public void setObfuscatedProfileId(String obfuscatedProfileId) {
- mObfuscatedProfileId = obfuscatedProfileId;
- }
-
private void executeServiceRequest(Runnable runnable) {
if (mIsServiceConnected) {
runnable.run();
From 8c029663b7acc0f2ac552ca9f611c226672e31f7 Mon Sep 17 00:00:00 2001
From: cepprice
Date: Fri, 5 Mar 2021 21:30:55 +0500
Subject: [PATCH 13/34] Fix typo
---
.../net/osmand/plus/inapp/InAppPurchaseHelperImpl.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/OsmAnd/src-google/net/osmand/plus/inapp/InAppPurchaseHelperImpl.java b/OsmAnd/src-google/net/osmand/plus/inapp/InAppPurchaseHelperImpl.java
index 4459c49510..61412dd7d0 100644
--- a/OsmAnd/src-google/net/osmand/plus/inapp/InAppPurchaseHelperImpl.java
+++ b/OsmAnd/src-google/net/osmand/plus/inapp/InAppPurchaseHelperImpl.java
@@ -550,7 +550,7 @@ public class InAppPurchaseHelperImpl extends InAppPurchaseHelper {
BillingManager billingManager = getBillingManager();
if (billingManager != null) {
OsmandSettings settings = ctx.getSettings();
- String userCredential = settings.BILLING_USER_ID.get() + settings.BILLING_USER_TOKEN.get();
+ String userCredential = settings.BILLING_USER_ID.get() + " " + settings.BILLING_USER_TOKEN.get();
billingManager.setObfuscatedAccountId(userCredential);
billingManager.initiatePurchaseFlow(a, skuDetails);
} else {
From 06077bd353326f1f9a25299330d2d7d7dd16be6c Mon Sep 17 00:00:00 2001
From: cepprice
Date: Fri, 5 Mar 2021 22:13:14 +0500
Subject: [PATCH 14/34] Fix NPE
---
.../plus/settings/fragments/ProfileAppearanceFragment.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/OsmAnd/src/net/osmand/plus/settings/fragments/ProfileAppearanceFragment.java b/OsmAnd/src/net/osmand/plus/settings/fragments/ProfileAppearanceFragment.java
index 32136b8c09..a8a765c253 100644
--- a/OsmAnd/src/net/osmand/plus/settings/fragments/ProfileAppearanceFragment.java
+++ b/OsmAnd/src/net/osmand/plus/settings/fragments/ProfileAppearanceFragment.java
@@ -310,7 +310,7 @@ public class ProfileAppearanceFragment extends BaseSettingsFragment implements O
outState.putString(PROFILE_STRINGKEY_KEY, changedProfile.stringKey);
outState.putInt(PROFILE_ICON_RES_KEY, changedProfile.iconRes);
outState.putSerializable(PROFILE_COLOR_KEY, changedProfile.color);
- outState.putInt(PROFILE_CUSTOM_COLOR_KEY, changedProfile.customColor);
+ outState.putSerializable(PROFILE_CUSTOM_COLOR_KEY, changedProfile.customColor);
if (changedProfile.parent != null) {
outState.putString(PROFILE_PARENT_KEY, changedProfile.parent.getStringKey());
}
@@ -325,7 +325,7 @@ public class ProfileAppearanceFragment extends BaseSettingsFragment implements O
changedProfile.stringKey = savedInstanceState.getString(PROFILE_STRINGKEY_KEY);
changedProfile.iconRes = savedInstanceState.getInt(PROFILE_ICON_RES_KEY);
changedProfile.color = (ProfileIconColors) savedInstanceState.getSerializable(PROFILE_COLOR_KEY);
- changedProfile.customColor = savedInstanceState.getInt(PROFILE_CUSTOM_COLOR_KEY);
+ changedProfile.customColor = (Integer) savedInstanceState.getSerializable(PROFILE_CUSTOM_COLOR_KEY);
String parentStringKey = savedInstanceState.getString(PROFILE_PARENT_KEY);
changedProfile.parent = ApplicationMode.valueOfStringKey(parentStringKey, null);
isBaseProfileImported = savedInstanceState.getBoolean(IS_BASE_PROFILE_IMPORTED);
From 6affa0c43296873d4faf3d012879565f76f75a70 Mon Sep 17 00:00:00 2001
From: nazar-kutz
Date: Fri, 5 Mar 2021 22:52:15 +0200
Subject: [PATCH 15/34] Fix #11023 (draft)
---
.../java/net/osmand/map/OsmandRegions.java | 18 +++++++----
.../main/java/net/osmand/map/WorldRegion.java | 32 +++++++++++++++++--
2 files changed, 42 insertions(+), 8 deletions(-)
diff --git a/OsmAnd-java/src/main/java/net/osmand/map/OsmandRegions.java b/OsmAnd-java/src/main/java/net/osmand/map/OsmandRegions.java
index 882231d8a6..388572bd58 100644
--- a/OsmAnd-java/src/main/java/net/osmand/map/OsmandRegions.java
+++ b/OsmAnd-java/src/main/java/net/osmand/map/OsmandRegions.java
@@ -436,7 +436,7 @@ public class OsmandRegions {
cx /= object.getPointsLength();
cy /= object.getPointsLength();
rd.regionCenter = new LatLon(MapUtils.get31LatitudeY((int) cy), MapUtils.get31LongitudeX((int) cx));
- rd.boundingBox = findBoundingBox(object);
+ findBoundaries(rd, object);
}
rd.regionParentFullName = mapIndexFields.get(mapIndexFields.parentFullName, object);
@@ -462,13 +462,15 @@ public class OsmandRegions {
return rd;
}
- private QuadRect findBoundingBox(BinaryMapDataObject object) {
+ private void findBoundaries(WorldRegion rd, BinaryMapDataObject object) {
if (object.getPointsLength() == 0) {
- return new QuadRect(0, 0, 0, 0);
+ return;
}
+ List polygon = new ArrayList<>();
double currentX = object.getPoint31XTile(0);
double currentY = object.getPoint31YTile(0);
+ polygon.add(new LatLon(currentX, currentY));
double minX = currentX;
double maxX = currentX;
double minY = currentY;
@@ -476,8 +478,10 @@ public class OsmandRegions {
if (object.getPointsLength() > 1) {
for (int i = 1; i < object.getPointsLength(); i++) {
- currentX = object.getPoint31XTile(i);
- currentY = object.getPoint31YTile(i);
+ int tileX = object.getPoint31XTile(i);
+ int tileY = object.getPoint31YTile(i);
+ currentX = tileX;
+ currentY = tileY;
if (currentX > maxX) {
maxX = currentX;
} else if (currentX < minX) {
@@ -488,6 +492,7 @@ public class OsmandRegions {
} else if (currentY < minY) {
minY = currentY;
}
+ polygon.add(new LatLon(currentX, currentY));
}
}
@@ -496,7 +501,8 @@ public class OsmandRegions {
double revertedMinY = MapUtils.get31LatitudeY((int) maxY);
double revertedMaxY = MapUtils.get31LatitudeY((int) minY);
- return new QuadRect(minX, revertedMinY, maxX, revertedMaxY);
+ rd.boundingBox = new QuadRect(minX, revertedMinY, maxX, revertedMaxY);
+ rd.polygon = polygon;
}
private String getSearchIndex(BinaryMapDataObject object) {
diff --git a/OsmAnd-java/src/main/java/net/osmand/map/WorldRegion.java b/OsmAnd-java/src/main/java/net/osmand/map/WorldRegion.java
index b6fdb4f7d4..45bd14f600 100644
--- a/OsmAnd-java/src/main/java/net/osmand/map/WorldRegion.java
+++ b/OsmAnd-java/src/main/java/net/osmand/map/WorldRegion.java
@@ -42,6 +42,7 @@ public class WorldRegion implements Serializable {
protected boolean regionMapDownload;
protected LatLon regionCenter;
protected QuadRect boundingBox;
+ protected List polygon;
public static class RegionParams {
protected String regionLeftHandDriving;
@@ -186,12 +187,39 @@ public class WorldRegion implements Serializable {
}
public boolean containsRegion(WorldRegion region) {
- if (this.boundingBox != null && region.boundingBox != null) {
- return this.boundingBox.contains(region.boundingBox);
+ boolean isBoundingAvailable = this.boundingBox != null && region.boundingBox != null;
+ boolean isPolygonsAvailable = this.polygon != null && region.polygon != null;
+
+ boolean containsBox = false;
+ if (isBoundingAvailable) {
+ containsBox = this.boundingBox.contains(region.boundingBox);
+ }
+ if (containsBox && isPolygonsAvailable) {
+ boolean allPointsInsideThePolygon = true;
+ List regionPolygon = region.polygon;
+ for (int i = 0; i < regionPolygon.size(); i++) {
+ allPointsInsideThePolygon = isPointInsideThePolygon(regionPolygon.get(i));
+ if (!allPointsInsideThePolygon) {
+ return false;
+ }
+ }
+ return true;
}
return false;
}
+ private boolean isPointInsideThePolygon(LatLon test) {
+ boolean result = false;
+ for (int i = 0, j = polygon.size() - 1; i < polygon.size(); j = i++) {
+ if ((polygon.get(i).getLongitude() > test.getLongitude()) != (polygon.get(j).getLongitude() > test.getLongitude()) &&
+ (test.getLatitude() < (polygon.get(j).getLatitude() - polygon.get(i).getLatitude()) * (test.getLongitude() - polygon.get(i).getLongitude())
+ / (polygon.get(j).getLongitude()-polygon.get(i).getLongitude()) + polygon.get(i).getLatitude())) {
+ result = !result;
+ }
+ }
+ return result;
+ }
+
public boolean isContinent() {
if (superregion != null) {
String superRegionId = superregion.getRegionId();
From d4c6e92a345ecc3ed80aa51381b5f4247f5b6a71 Mon Sep 17 00:00:00 2001
From: androiddevkotlin <64539346+androiddevkotlin@users.noreply.github.com>
Date: Sat, 6 Mar 2021 00:56:37 +0200
Subject: [PATCH 16/34] Refactor, ability to use additional spacing with auto =
true
---
OsmAnd/res/layout/colors_card.xml | 18 +++-
.../res/layout/point_editor_fragment_new.xml | 4 +-
.../editors/PointEditorFragmentNew.java | 3 +-
.../net/osmand/plus/widgets/FlowLayout.java | 97 ++++++++-----------
4 files changed, 60 insertions(+), 62 deletions(-)
diff --git a/OsmAnd/res/layout/colors_card.xml b/OsmAnd/res/layout/colors_card.xml
index cade718b70..10b2483607 100644
--- a/OsmAnd/res/layout/colors_card.xml
+++ b/OsmAnd/res/layout/colors_card.xml
@@ -6,19 +6,29 @@
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="@dimen/list_content_padding"
+ android:layout_marginLeft="@dimen/list_content_padding"
+ android:layout_marginEnd="@dimen/list_content_padding"
+ android:layout_marginRight="@dimen/list_content_padding" />
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="@dimen/list_content_padding"
+ android:layout_marginLeft="@dimen/list_content_padding"
+ android:layout_marginEnd="@dimen/list_content_padding"
+ android:layout_marginRight="@dimen/list_content_padding" />
\ No newline at end of file
diff --git a/OsmAnd/res/layout/point_editor_fragment_new.xml b/OsmAnd/res/layout/point_editor_fragment_new.xml
index 7339cbd460..6beccf0dd7 100644
--- a/OsmAnd/res/layout/point_editor_fragment_new.xml
+++ b/OsmAnd/res/layout/point_editor_fragment_new.xml
@@ -453,11 +453,9 @@
android:id="@+id/select_color"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginLeft="@dimen/content_padding_small"
android:layout_marginTop="@dimen/context_menu_padding_margin_tiny"
android:layout_marginBottom="@dimen/content_padding_half"
- android:orientation="horizontal"
- android:layout_marginStart="@dimen/content_padding_small" />
+ android:orientation="horizontal" />
1) {
- freeSizeSpacing = width % childWidth / (itemsCount - 1);
- } else {
- freeSizeSpacing = width % childWidth / itemsCount;
- }
- if (horizontalAutoSpacing) {
- if (isLayoutRtl) {
- if (horizontalPosition - childWidth < getPaddingLeft()) {
- horizontalPosition = width - getPaddingRight();
- verticalPosition += line_height;
- }
- child.layout(horizontalPosition - childWidth, verticalPosition, horizontalPosition, verticalPosition + childHeight);
- horizontalPosition -= childWidth + lp.horizontalSpacing + freeSizeSpacing;
- } else {
- if (horizontalPosition + childWidth > width) {
- horizontalPosition = getPaddingLeft();
- verticalPosition += line_height;
- }
- child.layout(horizontalPosition, verticalPosition, horizontalPosition + childWidth, verticalPosition + childHeight);
- horizontalPosition += childWidth + lp.horizontalSpacing + freeSizeSpacing;
+ int freeSizeSpacing = getFreeSizeSpacing(width, lp, childWidth);
+ if (isLayoutRtl) {
+ if (horizontalPosition - childWidth < getPaddingLeft()) {
+ horizontalPosition = width - getPaddingRight();
+ verticalPosition += line_height;
}
+ child.layout(horizontalPosition - childWidth, verticalPosition, horizontalPosition, verticalPosition + childHeight);
+ horizontalPosition -= childWidth + freeSizeSpacing;
} else {
- if (isLayoutRtl) {
- if (horizontalPosition - childWidth < l) {
- horizontalPosition = width - getPaddingRight();
- verticalPosition += line_height;
- }
- child.layout(horizontalPosition - childWidth, verticalPosition, horizontalPosition, verticalPosition + childHeight);
- horizontalPosition -= childWidth + lp.horizontalSpacing;
- } else {
- if (horizontalPosition + childWidth > width) {
- horizontalPosition = getPaddingLeft();
- verticalPosition += line_height;
- }
- child.layout(horizontalPosition, verticalPosition, horizontalPosition + childWidth, verticalPosition + childHeight);
- horizontalPosition += childWidth + lp.horizontalSpacing;
+ if (horizontalPosition + childWidth > width) {
+ horizontalPosition = getPaddingLeft();
+ verticalPosition += line_height;
}
+ child.layout(horizontalPosition, verticalPosition, horizontalPosition + childWidth, verticalPosition + childHeight);
+ horizontalPosition += childWidth + freeSizeSpacing;
}
}
}
}
+
+ private int getFreeSizeSpacing(int width, LayoutParams lp, int childWidth) {
+ int freeSizeSpacing;
+ int itemsCount = width / (childWidth + lp.horizontalSpacing);
+ if (itemsCount > 1 && horizontalAutoSpacing) {
+ freeSizeSpacing = (width % childWidth / (itemsCount - 1)) + lp.horizontalSpacing;
+ } else if (!horizontalAutoSpacing) {
+ freeSizeSpacing = lp.horizontalSpacing;
+ } else {
+ freeSizeSpacing = (width % childWidth / itemsCount) + lp.horizontalSpacing;
+ }
+ return freeSizeSpacing;
+ }
+
+ public static class LayoutParams extends ViewGroup.LayoutParams {
+
+ final int horizontalSpacing;
+ final int verticalSpacing;
+
+ /**
+ * @param horizontalSpacing Pixels between items, horizontally
+ * @param verticalSpacing Pixels between items, vertically
+ */
+ public LayoutParams(int horizontalSpacing, int verticalSpacing) {
+ super(0, 0);
+ this.horizontalSpacing = horizontalSpacing;
+ this.verticalSpacing = verticalSpacing;
+ }
+ }
}
\ No newline at end of file
From 56af6bf622b8e2f5586447baa7d5b7f2f0f06cc7 Mon Sep 17 00:00:00 2001
From: androiddevkotlin <64539346+androiddevkotlin@users.noreply.github.com>
Date: Sat, 6 Mar 2021 01:35:12 +0200
Subject: [PATCH 17/34] Fix conflicts
---
.../editors/PointEditorFragmentNew.java | 3 +-
.../fragments/ProfileAppearanceFragment.java | 54 ++++++++-----------
.../src/net/osmand/plus/track/ColorsCard.java | 15 ++----
3 files changed, 26 insertions(+), 46 deletions(-)
diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/PointEditorFragmentNew.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/PointEditorFragmentNew.java
index 45545468c2..1c59b4508b 100644
--- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/PointEditorFragmentNew.java
+++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/PointEditorFragmentNew.java
@@ -50,7 +50,6 @@ import net.osmand.plus.R;
import net.osmand.plus.UiUtilities;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.base.BaseOsmAndFragment;
-import net.osmand.plus.base.BottomSheetDialogFragment;
import net.osmand.plus.helpers.AndroidUiHelper;
import net.osmand.plus.helpers.ColorDialogs;
import net.osmand.plus.mapcontextmenu.MapContextMenu;
@@ -194,7 +193,7 @@ public abstract class PointEditorFragmentNew extends BaseOsmAndFragment implemen
@Override
public void onClick(View v) {
FragmentManager fragmentManager = getFragmentManager();
- DialogFragment dialogFragment = createSelectCategoryDialog();
+ DialogFragment dialogFragment = createSelectCategoryDialog();
if (fragmentManager != null && dialogFragment != null) {
dialogFragment.show(fragmentManager, SelectFavoriteCategoryBottomSheet.class.getSimpleName());
}
diff --git a/OsmAnd/src/net/osmand/plus/settings/fragments/ProfileAppearanceFragment.java b/OsmAnd/src/net/osmand/plus/settings/fragments/ProfileAppearanceFragment.java
index b21eee0272..7adf43b3be 100644
--- a/OsmAnd/src/net/osmand/plus/settings/fragments/ProfileAppearanceFragment.java
+++ b/OsmAnd/src/net/osmand/plus/settings/fragments/ProfileAppearanceFragment.java
@@ -23,12 +23,24 @@ import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.TextView;
+import androidx.activity.OnBackPressedCallback;
+import androidx.annotation.ColorInt;
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.appcompat.app.AlertDialog;
+import androidx.appcompat.content.res.AppCompatResources;
+import androidx.core.content.ContextCompat;
+import androidx.core.graphics.drawable.DrawableCompat;
+import androidx.fragment.app.Fragment;
+import androidx.fragment.app.FragmentActivity;
+import androidx.fragment.app.FragmentManager;
+import androidx.preference.Preference;
+import androidx.preference.PreferenceViewHolder;
+import androidx.recyclerview.widget.RecyclerView;
+
import net.osmand.AndroidUtils;
import net.osmand.IndexConstants;
import net.osmand.PlatformUtil;
-import net.osmand.plus.activities.MapActivity;
-import net.osmand.plus.routing.RouteService;
-import net.osmand.plus.settings.backend.ApplicationMode;
import net.osmand.plus.R;
import net.osmand.plus.UiUtilities;
import net.osmand.plus.UiUtilities.DialogButtonType;
@@ -42,7 +54,7 @@ import net.osmand.plus.profiles.SelectProfileBottomSheet.DialogMode;
import net.osmand.plus.profiles.SelectProfileBottomSheet.OnSelectProfileCallback;
import net.osmand.plus.routepreparationmenu.cards.BaseCard;
import net.osmand.plus.routepreparationmenu.cards.BaseCard.CardListener;
-import net.osmand.plus.routing.RouteProvider;
+import net.osmand.plus.routing.RouteService;
import net.osmand.plus.settings.backend.ApplicationMode;
import net.osmand.plus.settings.backend.backup.ProfileSettingsItem;
import net.osmand.plus.settings.backend.backup.SettingsHelper;
@@ -59,21 +71,6 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
-import androidx.activity.OnBackPressedCallback;
-import androidx.annotation.ColorInt;
-import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
-import androidx.appcompat.app.AlertDialog;
-import androidx.appcompat.content.res.AppCompatResources;
-import androidx.core.content.ContextCompat;
-import androidx.core.graphics.drawable.DrawableCompat;
-import androidx.fragment.app.Fragment;
-import androidx.fragment.app.FragmentActivity;
-import androidx.fragment.app.FragmentManager;
-import androidx.preference.Preference;
-import androidx.preference.PreferenceViewHolder;
-import androidx.recyclerview.widget.RecyclerView;
-
import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_SETTINGS_ID;
import static net.osmand.plus.profiles.SelectProfileBottomSheet.PROFILES_LIST_UPDATED_ARG;
import static net.osmand.plus.profiles.SelectProfileBottomSheet.PROFILE_KEY_ARG;
@@ -387,7 +384,7 @@ public class ProfileAppearanceFragment extends BaseSettingsFragment implements O
profileName.setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
- if(hasFocus){
+ if (hasFocus) {
profileName.setSelection(profileName.getText().length());
AndroidUtils.showSoftKeyboard(getMyActivity(), profileName);
}
@@ -427,14 +424,6 @@ public class ProfileAppearanceFragment extends BaseSettingsFragment implements O
colorName = holder.itemView.findViewById(R.id.summary);
colorName.setTextColor(ContextCompat.getColor(app, R.color.preference_category_title));
} else if (COLOR_ITEMS.equals(preference.getKey())) {
- colorItems = (FlowLayout) holder.findViewById(R.id.color_items);
- colorItems.removeAllViews();
- for (ProfileIconColors color : ProfileIconColors.values()) {
- View colorItem = createColorItemView(color, colorItems);
- colorItems.addView(colorItem, new FlowLayout.LayoutParams(0, 0));
- colorItems.setHorizontalAutoSpacing(true);
- }
- updateColorSelector(changedProfile.color);
createColorsCard(holder);
} else if (ICON_ITEMS.equals(preference.getKey())) {
iconItems = (FlowLayout) holder.findViewById(R.id.color_items);
@@ -520,7 +509,7 @@ public class ProfileAppearanceFragment extends BaseSettingsFragment implements O
ImageView coloredCircle = iconItemView.findViewById(R.id.background);
AndroidUtils.setBackground(coloredCircle,
UiUtilities.tintDrawable(AppCompatResources.getDrawable(app, R.drawable.circle_background_light),
- UiUtilities.getColorWithAlpha(ContextCompat.getColor(app, R.color.icon_color_default_light), 0.1f)));
+ UiUtilities.getColorWithAlpha(ContextCompat.getColor(app, R.color.icon_color_default_light), 0.1f)));
coloredCircle.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
@@ -868,11 +857,11 @@ public class ProfileAppearanceFragment extends BaseSettingsFragment implements O
}
return false;
}
-
+
private boolean nameIsEmpty() {
return changedProfile.name.trim().isEmpty();
}
-
+
private void disableSaveButtonWithErrorMessage(String errorMessage) {
saveButton.setEnabled(false);
profileNameOtfb.setError(errorMessage, true);
@@ -1048,7 +1037,8 @@ public class ProfileAppearanceFragment extends BaseSettingsFragment implements O
if (parent != null ? !parent.equals(that.parent) : that.parent != null) return false;
if (name != null ? !name.equals(that.name) : that.name != null) return false;
if (color != that.color) return false;
- if (customColor != null ? !customColor.equals(that.customColor) : that.customColor != null) return false;
+ if (customColor != null ? !customColor.equals(that.customColor) : that.customColor != null)
+ return false;
if (routingProfile != null ? !routingProfile.equals(that.routingProfile) : that.routingProfile != null)
return false;
if (routeService != that.routeService) return false;
diff --git a/OsmAnd/src/net/osmand/plus/track/ColorsCard.java b/OsmAnd/src/net/osmand/plus/track/ColorsCard.java
index 2edeff39ba..b3970b5a7b 100644
--- a/OsmAnd/src/net/osmand/plus/track/ColorsCard.java
+++ b/OsmAnd/src/net/osmand/plus/track/ColorsCard.java
@@ -6,14 +6,10 @@ import android.view.View;
import android.widget.ImageView;
import androidx.annotation.ColorInt;
-import androidx.annotation.NonNull;
import androidx.core.content.ContextCompat;
import androidx.core.graphics.ColorUtils;
import androidx.fragment.app.Fragment;
-import com.google.android.material.internal.FlowLayout;
-
-import net.osmand.AndroidUtils;
import net.osmand.PlatformUtil;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R;
@@ -32,11 +28,6 @@ import org.apache.commons.logging.Log;
import java.util.ArrayList;
import java.util.List;
-import androidx.annotation.ColorInt;
-import androidx.core.content.ContextCompat;
-import androidx.core.graphics.ColorUtils;
-import androidx.fragment.app.Fragment;
-
public class ColorsCard extends BaseCard implements ColorPickerListener {
public static final int MAX_CUSTOM_COLORS = 6;
@@ -46,13 +37,13 @@ public class ColorsCard extends BaseCard implements ColorPickerListener {
public static final int INVALID_VALUE = -1;
- private Fragment targetFragment;
+ private final Fragment targetFragment;
private ApplicationMode appMode;
private ListStringPreference colorsListPreference;
- private List colors;
- private List customColors;
+ private final List colors;
+ private final List customColors;
private int selectedColor;
From 37d795cf7b8806cedfdba2518c257f3ae997eaab Mon Sep 17 00:00:00 2001
From: nazar-kutz
Date: Sat, 6 Mar 2021 01:55:08 +0200
Subject: [PATCH 18/34] improve the readability of the algorithm for checking
that one region is inside another
---
.../main/java/net/osmand/map/WorldRegion.java | 43 ++++++++-----------
.../main/java/net/osmand/util/Algorithms.java | 41 ++++++++++++++++++
2 files changed, 58 insertions(+), 26 deletions(-)
diff --git a/OsmAnd-java/src/main/java/net/osmand/map/WorldRegion.java b/OsmAnd-java/src/main/java/net/osmand/map/WorldRegion.java
index 45bd14f600..b1be29d5fa 100644
--- a/OsmAnd-java/src/main/java/net/osmand/map/WorldRegion.java
+++ b/OsmAnd-java/src/main/java/net/osmand/map/WorldRegion.java
@@ -3,6 +3,7 @@ package net.osmand.map;
import net.osmand.data.LatLon;
import net.osmand.data.QuadRect;
import net.osmand.util.Algorithms;
+import net.osmand.util.Algorithms.Point2D;
import java.io.Serializable;
import java.util.LinkedList;
@@ -187,37 +188,27 @@ public class WorldRegion implements Serializable {
}
public boolean containsRegion(WorldRegion region) {
- boolean isBoundingAvailable = this.boundingBox != null && region.boundingBox != null;
- boolean isPolygonsAvailable = this.polygon != null && region.polygon != null;
-
- boolean containsBox = false;
- if (isBoundingAvailable) {
- containsBox = this.boundingBox.contains(region.boundingBox);
- }
- if (containsBox && isPolygonsAvailable) {
- boolean allPointsInsideThePolygon = true;
- List regionPolygon = region.polygon;
- for (int i = 0; i < regionPolygon.size(); i++) {
- allPointsInsideThePolygon = isPointInsideThePolygon(regionPolygon.get(i));
- if (!allPointsInsideThePolygon) {
- return false;
- }
- }
- return true;
+ if (containsBoundingBox(region.boundingBox)) {
+ // check polygon only if bounding box match
+ return containsPolygon(region.polygon);
}
return false;
}
- private boolean isPointInsideThePolygon(LatLon test) {
- boolean result = false;
- for (int i = 0, j = polygon.size() - 1; i < polygon.size(); j = i++) {
- if ((polygon.get(i).getLongitude() > test.getLongitude()) != (polygon.get(j).getLongitude() > test.getLongitude()) &&
- (test.getLatitude() < (polygon.get(j).getLatitude() - polygon.get(i).getLatitude()) * (test.getLongitude() - polygon.get(i).getLongitude())
- / (polygon.get(j).getLongitude()-polygon.get(i).getLongitude()) + polygon.get(i).getLatitude())) {
- result = !result;
- }
+ private boolean containsBoundingBox(QuadRect rectangle) {
+ if (boundingBox != null && rectangle != null) {
+ return boundingBox.contains(rectangle);
}
- return result;
+ return false;
+ }
+
+ private boolean containsPolygon(List another) {
+ if (polygon != null && another != null) {
+ Point2D[] inner = Algorithms.createPoint2DArrayFromLatLon(polygon);
+ Point2D[] outer = Algorithms.createPoint2DArrayFromLatLon(another);
+ return Algorithms.isFirstPolygonInsideTheSecond(outer, inner);
+ }
+ return false;
}
public boolean isContinent() {
diff --git a/OsmAnd-java/src/main/java/net/osmand/util/Algorithms.java b/OsmAnd-java/src/main/java/net/osmand/util/Algorithms.java
index 36c0034a26..b539ca8363 100644
--- a/OsmAnd-java/src/main/java/net/osmand/util/Algorithms.java
+++ b/OsmAnd-java/src/main/java/net/osmand/util/Algorithms.java
@@ -2,6 +2,7 @@ package net.osmand.util;
import net.osmand.IProgress;
import net.osmand.PlatformUtil;
+import net.osmand.data.LatLon;
import org.apache.commons.logging.Log;
import org.xmlpull.v1.XmlPullParser;
@@ -117,6 +118,46 @@ public class Algorithms {
}
return def;
}
+
+ public static class Point2D {
+ public double x;
+ public double y;
+ }
+
+ public static Point2D[] createPoint2DArrayFromLatLon(List latLons) {
+ Point2D[] array = new Point2D[latLons.size()];
+ for (int i = 0; i < array.length; i++) {
+ Point2D point = new Point2D();
+ point.x = latLons.get(i).getLatitude();
+ point.y = latLons.get(i).getLongitude();
+ array[i] = point;
+ }
+ return array;
+ }
+
+ public static boolean isFirstPolygonInsideTheSecond(Point2D[] first,
+ Point2D[] second) {
+ for (Point2D point : first) {
+ if (!isPointInsideTheBoundary(point, second)) {
+ // if at least one point is not inside the boundary, return false
+ return false;
+ }
+ }
+ return true;
+ }
+
+ public static boolean isPointInsideTheBoundary(Point2D point,
+ Point2D[] polygon) {
+ boolean result = false;
+ for (int i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {
+ if ((polygon[i].y > point.y) != (polygon[j].y > point.y)
+ && (point.x < (polygon[j].x - polygon[i].x) * (point.y - polygon[i].y) /
+ (polygon[j].y-polygon[i].y) + polygon[i].x)) {
+ result = !result;
+ }
+ }
+ return result;
+ }
public static int parseIntSilently(String input, int def) {
if (input != null && input.length() > 0) {
From 37d8a9eee88c8254ef9f6f37703bb710c446c1c7 Mon Sep 17 00:00:00 2001
From: nazar-kutz
Date: Sat, 6 Mar 2021 02:12:54 +0200
Subject: [PATCH 19/34] small refactoring
---
OsmAnd-java/src/main/java/net/osmand/map/OsmandRegions.java | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/OsmAnd-java/src/main/java/net/osmand/map/OsmandRegions.java b/OsmAnd-java/src/main/java/net/osmand/map/OsmandRegions.java
index 388572bd58..f014a4fc8b 100644
--- a/OsmAnd-java/src/main/java/net/osmand/map/OsmandRegions.java
+++ b/OsmAnd-java/src/main/java/net/osmand/map/OsmandRegions.java
@@ -478,10 +478,8 @@ public class OsmandRegions {
if (object.getPointsLength() > 1) {
for (int i = 1; i < object.getPointsLength(); i++) {
- int tileX = object.getPoint31XTile(i);
- int tileY = object.getPoint31YTile(i);
- currentX = tileX;
- currentY = tileY;
+ currentX = object.getPoint31XTile(i);
+ currentY = object.getPoint31YTile(i);
if (currentX > maxX) {
maxX = currentX;
} else if (currentX < minX) {
From 5520f7fb75f42da978d179ac298596a61ed06470 Mon Sep 17 00:00:00 2001
From: Kseniia
Date: Sat, 6 Mar 2021 09:52:51 +0200
Subject: [PATCH 20/34] Add minor stop 10281
---
.../osmand/router/RouteResultPreparation.java | 22 +++++--------------
1 file changed, 6 insertions(+), 16 deletions(-)
diff --git a/OsmAnd-java/src/main/java/net/osmand/router/RouteResultPreparation.java b/OsmAnd-java/src/main/java/net/osmand/router/RouteResultPreparation.java
index 16c492422a..c6a5f1d393 100644
--- a/OsmAnd-java/src/main/java/net/osmand/router/RouteResultPreparation.java
+++ b/OsmAnd-java/src/main/java/net/osmand/router/RouteResultPreparation.java
@@ -186,32 +186,22 @@ public class RouteResultPreparation {
public RouteSegmentResult filterMinorStops(RouteSegmentResult seg) {
List stops = null;
- int startPoint = seg.getStartPointIndex();
- int endPoint = seg.getEndPointIndex();
- int start;
- int end;
+ boolean plus = seg.getStartPointIndex() < seg.getEndPointIndex();
+ int next;
- if (startPoint < endPoint) {
- start = startPoint;
- end = endPoint;
- } else {
- start = endPoint;
- end = startPoint;
- }
-
- while (start <= end) {
- int[] pointTypes = seg.getObject().getPointTypes(start);
+ for (int i = seg.getStartPointIndex(); i != seg.getEndPointIndex(); i = next) {
+ next = plus ? i + 1 : i - 1;
+ int[] pointTypes = seg.getObject().getPointTypes(i);
if (pointTypes != null) {
for (int j = 0; j < pointTypes.length; j++) {
if (pointTypes[j] == seg.getObject().region.stopMinor) {
if (stops == null) {
stops = new ArrayList<>();
}
- stops.add(start);
+ stops.add(i);
}
}
}
- start++;
}
if (stops != null) {
From 136542f0dd587bb37bd82df3ce4f0af3a66fdfc7 Mon Sep 17 00:00:00 2001
From: max-klaus
Date: Sat, 6 Mar 2021 14:22:22 +0300
Subject: [PATCH 21/34] Fix billing bugs
---
.../plus/inapp/InAppPurchaseHelperImpl.java | 41 +++++++++++--------
.../plus/inapp/InAppPurchaseHelperImpl.java | 4 +-
.../plus/inapp/InAppPurchaseHelper.java | 11 ++---
.../plus/inapp/util/BillingManager.java | 9 ++++
4 files changed, 41 insertions(+), 24 deletions(-)
diff --git a/OsmAnd/src-google/net/osmand/plus/inapp/InAppPurchaseHelperImpl.java b/OsmAnd/src-google/net/osmand/plus/inapp/InAppPurchaseHelperImpl.java
index 61412dd7d0..df05570f57 100644
--- a/OsmAnd/src-google/net/osmand/plus/inapp/InAppPurchaseHelperImpl.java
+++ b/OsmAnd/src-google/net/osmand/plus/inapp/InAppPurchaseHelperImpl.java
@@ -6,6 +6,7 @@ import android.content.Intent;
import android.net.Uri;
import android.widget.Toast;
+import com.android.billingclient.api.AccountIdentifiers;
import com.android.billingclient.api.BillingClient;
import com.android.billingclient.api.BillingResult;
import com.android.billingclient.api.Purchase;
@@ -76,6 +77,7 @@ public class InAppPurchaseHelperImpl extends InAppPurchaseHelper {
return billingManager;
}
+ @Override
protected void execImpl(@NonNull final InAppPurchaseTaskType taskType, @NonNull final InAppCommand runnable) {
billingManager = new BillingManager(ctx, BASE64_ENCODED_PUBLIC_KEY, new BillingManager.BillingUpdatesListener() {
@@ -125,7 +127,7 @@ public class InAppPurchaseHelperImpl extends InAppPurchaseHelper {
}
billingManager.querySkuDetailsAsync(BillingClient.SkuType.INAPP, skuInApps, new SkuDetailsResponseListener() {
@Override
- public void onSkuDetailsResponse(BillingResult billingResult, final List skuDetailsListInApps) {
+ public void onSkuDetailsResponse(@NonNull BillingResult billingResult, final List skuDetailsListInApps) {
// Is it a failure?
if (billingResult.getResponseCode() != BillingClient.BillingResponseCode.OK) {
logError("Failed to query inapps sku details: " + billingResult.getResponseCode());
@@ -152,7 +154,7 @@ public class InAppPurchaseHelperImpl extends InAppPurchaseHelper {
billingManager.querySkuDetailsAsync(BillingClient.SkuType.SUBS, skuSubscriptions, new SkuDetailsResponseListener() {
@Override
- public void onSkuDetailsResponse(BillingResult billingResult, final List skuDetailsListSubscriptions) {
+ public void onSkuDetailsResponse(@NonNull BillingResult billingResult, final List skuDetailsListSubscriptions) {
// Is it a failure?
if (billingResult.getResponseCode() != BillingClient.BillingResponseCode.OK) {
logError("Failed to query subscriptipons sku details: " + billingResult.getResponseCode());
@@ -321,7 +323,7 @@ public class InAppPurchaseHelperImpl extends InAppPurchaseHelper {
}
@Override
- public void onSkuDetailsResponse(BillingResult billingResult, List skuDetailsList) {
+ public void onSkuDetailsResponse(@NonNull BillingResult billingResult, List skuDetailsList) {
logDebug("Query sku details finished.");
@@ -442,8 +444,8 @@ public class InAppPurchaseHelperImpl extends InAppPurchaseHelper {
if (liveUpdatesPurchases.size() > 0) {
List tokensSent = Arrays.asList(settings.BILLING_PURCHASE_TOKENS_SENT.get().split(";"));
for (Purchase purchase : liveUpdatesPurchases) {
- if (needRestoreUserInfo(settings)) {
- restoreUserInfo(settings, purchase);
+ if (needRestoreUserInfo()) {
+ restoreUserInfo(purchase);
}
if (!tokensSent.contains(purchase.getSku())) {
tokensToSend.add(purchase);
@@ -458,29 +460,34 @@ public class InAppPurchaseHelperImpl extends InAppPurchaseHelper {
}
};
- private void restoreUserInfo(OsmandSettings settings, Purchase purchase) {
- boolean restored = restoreUserInfoFromString(settings, purchase.getDeveloperPayload());
+ private void restoreUserInfo(Purchase purchase) {
+ boolean restored = restoreUserInfoFromString(purchase.getDeveloperPayload());
if (!restored) {
- restoreUserInfoFromString(settings, purchase.getAccountIdentifiers().getObfuscatedAccountId());
+ AccountIdentifiers accountIdentifiers = purchase.getAccountIdentifiers();
+ if (accountIdentifiers != null) {
+ restoreUserInfoFromString(accountIdentifiers.getObfuscatedAccountId());
+ }
}
}
- private boolean restoreUserInfoFromString(OsmandSettings settings, String userInfo) {
+ private boolean restoreUserInfoFromString(String userInfo) {
if (Algorithms.isEmpty(userInfo)) {
return false;
}
+ OsmandSettings settings = ctx.getSettings();
String[] arr = userInfo.split(" ");
- if (arr.length > 0 && !Algorithms.isEmpty(settings.BILLING_USER_ID.get())) {
+ if (arr.length > 0) {
settings.BILLING_USER_ID.set(arr[0]);
}
- if (arr.length > 1 && !Algorithms.isEmpty(settings.BILLING_USER_TOKEN.get())) {
+ if (arr.length > 1) {
token = arr[1];
settings.BILLING_USER_TOKEN.set(token);
}
- return needRestoreUserInfo(settings);
+ return needRestoreUserInfo();
}
- private boolean needRestoreUserInfo(OsmandSettings settings) {
+ private boolean needRestoreUserInfo() {
+ OsmandSettings settings = ctx.getSettings();
return Algorithms.isEmpty(settings.BILLING_USER_ID.get()) || Algorithms.isEmpty(settings.BILLING_USER_TOKEN.get());
}
@@ -539,7 +546,8 @@ public class InAppPurchaseHelperImpl extends InAppPurchaseHelper {
}
}
- protected InAppCommand getPurchaseLiveUpdatesCommand(final WeakReference activity, final String sku) {
+ @Override
+ protected InAppCommand getPurchaseLiveUpdatesCommand(final WeakReference activity, final String sku, final String userInfo) {
return new InAppCommand() {
@Override
public void run(InAppPurchaseHelper helper) {
@@ -549,9 +557,7 @@ public class InAppPurchaseHelperImpl extends InAppPurchaseHelper {
if (AndroidUtils.isActivityNotDestroyed(a) && skuDetails != null) {
BillingManager billingManager = getBillingManager();
if (billingManager != null) {
- OsmandSettings settings = ctx.getSettings();
- String userCredential = settings.BILLING_USER_ID.get() + " " + settings.BILLING_USER_TOKEN.get();
- billingManager.setObfuscatedAccountId(userCredential);
+ billingManager.setObfuscatedAccountId(userInfo);
billingManager.initiatePurchaseFlow(a, skuDetails);
} else {
throw new IllegalStateException("BillingManager disposed");
@@ -568,6 +574,7 @@ public class InAppPurchaseHelperImpl extends InAppPurchaseHelper {
};
}
+ @Override
protected InAppCommand getRequestInventoryCommand() {
return new InAppCommand() {
@Override
diff --git a/OsmAnd/src-huawei/net/osmand/plus/inapp/InAppPurchaseHelperImpl.java b/OsmAnd/src-huawei/net/osmand/plus/inapp/InAppPurchaseHelperImpl.java
index 0f3536e5d0..7a16429bd5 100644
--- a/OsmAnd/src-huawei/net/osmand/plus/inapp/InAppPurchaseHelperImpl.java
+++ b/OsmAnd/src-huawei/net/osmand/plus/inapp/InAppPurchaseHelperImpl.java
@@ -276,7 +276,7 @@ public class InAppPurchaseHelperImpl extends InAppPurchaseHelper {
}
}
- protected InAppCommand getPurchaseLiveUpdatesCommand(final WeakReference activity, final String sku, final String payload) {
+ protected InAppCommand getPurchaseLiveUpdatesCommand(final WeakReference activity, final String sku, final String userInfo) {
return new InAppCommand() {
@Override
public void run(InAppPurchaseHelper helper) {
@@ -285,7 +285,7 @@ public class InAppPurchaseHelperImpl extends InAppPurchaseHelper {
ProductInfo productInfo = getProductInfo(sku);
if (AndroidUtils.isActivityNotDestroyed(a) && productInfo != null) {
IapRequestHelper.createPurchaseIntent(getIapClient(), sku,
- IapClient.PriceType.IN_APP_SUBSCRIPTION, payload, new IapApiCallback() {
+ IapClient.PriceType.IN_APP_SUBSCRIPTION, userInfo, new IapApiCallback() {
@Override
public void onSuccess(PurchaseIntentResult result) {
if (result == null) {
diff --git a/OsmAnd/src/net/osmand/plus/inapp/InAppPurchaseHelper.java b/OsmAnd/src/net/osmand/plus/inapp/InAppPurchaseHelper.java
index 9ed4f4c694..d511b7be85 100644
--- a/OsmAnd/src/net/osmand/plus/inapp/InAppPurchaseHelper.java
+++ b/OsmAnd/src/net/osmand/plus/inapp/InAppPurchaseHelper.java
@@ -8,6 +8,9 @@ import android.os.AsyncTask;
import android.text.TextUtils;
import android.util.Log;
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+
import net.osmand.AndroidNetworkUtils;
import net.osmand.AndroidNetworkUtils.OnRequestResultListener;
import net.osmand.AndroidNetworkUtils.OnRequestsResultListener;
@@ -40,9 +43,6 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
-import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
-
public abstract class InAppPurchaseHelper {
// Debug tag, for logging
protected static final org.apache.commons.logging.Log LOG = PlatformUtil.getLog(InAppPurchaseHelper.class);
@@ -364,7 +364,8 @@ public abstract class InAppPurchaseHelper {
notifyDismissProgress(InAppPurchaseTaskType.PURCHASE_LIVE_UPDATES);
if (!Algorithms.isEmpty(userId) && !Algorithms.isEmpty(token)) {
logDebug("Launching purchase flow for live updates subscription for userId=" + userId);
- exec(InAppPurchaseTaskType.PURCHASE_LIVE_UPDATES, getPurchaseLiveUpdatesCommand(activity, sku));
+ final String userInfo = userId + " " + token;
+ exec(InAppPurchaseTaskType.PURCHASE_LIVE_UPDATES, getPurchaseLiveUpdatesCommand(activity, sku, userInfo));
} else {
notifyError(InAppPurchaseTaskType.PURCHASE_LIVE_UPDATES, "Empty userId");
stop(true);
@@ -373,7 +374,7 @@ public abstract class InAppPurchaseHelper {
}
protected abstract InAppCommand getPurchaseLiveUpdatesCommand(final WeakReference activity,
- final String sku) throws UnsupportedOperationException;
+ final String sku, final String userInfo) throws UnsupportedOperationException;
@SuppressLint("StaticFieldLeak")
private class RequestInventoryTask extends AsyncTask {
diff --git a/OsmAnd/src/net/osmand/plus/inapp/util/BillingManager.java b/OsmAnd/src/net/osmand/plus/inapp/util/BillingManager.java
index b0446f35d4..ed1772be6f 100644
--- a/OsmAnd/src/net/osmand/plus/inapp/util/BillingManager.java
+++ b/OsmAnd/src/net/osmand/plus/inapp/util/BillingManager.java
@@ -58,7 +58,9 @@ public class BillingManager implements PurchasesUpdatedListener {
// Public key for verifying signature, in base64 encoding
private String mSignatureBase64;
+
private String mObfuscatedAccountId;
+ private String mObfuscatedProfileId;
private final BillingUpdatesListener mBillingUpdatesListener;
private final List mPurchases = new ArrayList<>();
@@ -151,6 +153,9 @@ public class BillingManager implements PurchasesUpdatedListener {
if (!TextUtils.isEmpty(mObfuscatedAccountId)) {
paramsBuilder.setObfuscatedAccountId(mObfuscatedAccountId);
}
+ if (!TextUtils.isEmpty(mObfuscatedProfileId)) {
+ paramsBuilder.setObfuscatedProfileId(mObfuscatedProfileId);
+ }
if (oldSku != null && purchaseToken != null) {
paramsBuilder.setOldSku(oldSku, purchaseToken);
}
@@ -405,6 +410,10 @@ public class BillingManager implements PurchasesUpdatedListener {
mObfuscatedAccountId = obfuscatedAccountId;
}
+ public void setObfuscatedProfileId(String obfuscatedProfileId) {
+ mObfuscatedProfileId = obfuscatedProfileId;
+ }
+
private void executeServiceRequest(Runnable runnable) {
if (mIsServiceConnected) {
runnable.run();
From 53e284d84348ff55894e94f288acf9cb9abb263a Mon Sep 17 00:00:00 2001
From: androiddevkotlin <64539346+androiddevkotlin@users.noreply.github.com>
Date: Sat, 6 Mar 2021 13:51:03 +0200
Subject: [PATCH 22/34] NullPointExcepionFix
---
.../fragments/ProfileAppearanceFragment.java | 50 +++++++++----------
1 file changed, 25 insertions(+), 25 deletions(-)
diff --git a/OsmAnd/src/net/osmand/plus/settings/fragments/ProfileAppearanceFragment.java b/OsmAnd/src/net/osmand/plus/settings/fragments/ProfileAppearanceFragment.java
index 309c89ec47..73a2574531 100644
--- a/OsmAnd/src/net/osmand/plus/settings/fragments/ProfileAppearanceFragment.java
+++ b/OsmAnd/src/net/osmand/plus/settings/fragments/ProfileAppearanceFragment.java
@@ -23,12 +23,24 @@ import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.TextView;
+import androidx.activity.OnBackPressedCallback;
+import androidx.annotation.ColorInt;
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.appcompat.app.AlertDialog;
+import androidx.appcompat.content.res.AppCompatResources;
+import androidx.core.content.ContextCompat;
+import androidx.core.graphics.drawable.DrawableCompat;
+import androidx.fragment.app.Fragment;
+import androidx.fragment.app.FragmentActivity;
+import androidx.fragment.app.FragmentManager;
+import androidx.preference.Preference;
+import androidx.preference.PreferenceViewHolder;
+import androidx.recyclerview.widget.RecyclerView;
+
import net.osmand.AndroidUtils;
import net.osmand.IndexConstants;
import net.osmand.PlatformUtil;
-import net.osmand.plus.activities.MapActivity;
-import net.osmand.plus.routing.RouteService;
-import net.osmand.plus.settings.backend.ApplicationMode;
import net.osmand.plus.R;
import net.osmand.plus.UiUtilities;
import net.osmand.plus.UiUtilities.DialogButtonType;
@@ -42,7 +54,7 @@ import net.osmand.plus.profiles.SelectProfileBottomSheet.DialogMode;
import net.osmand.plus.profiles.SelectProfileBottomSheet.OnSelectProfileCallback;
import net.osmand.plus.routepreparationmenu.cards.BaseCard;
import net.osmand.plus.routepreparationmenu.cards.BaseCard.CardListener;
-import net.osmand.plus.routing.RouteProvider;
+import net.osmand.plus.routing.RouteService;
import net.osmand.plus.settings.backend.ApplicationMode;
import net.osmand.plus.settings.backend.backup.ProfileSettingsItem;
import net.osmand.plus.settings.backend.backup.SettingsHelper;
@@ -59,21 +71,6 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
-import androidx.activity.OnBackPressedCallback;
-import androidx.annotation.ColorInt;
-import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
-import androidx.appcompat.app.AlertDialog;
-import androidx.appcompat.content.res.AppCompatResources;
-import androidx.core.content.ContextCompat;
-import androidx.core.graphics.drawable.DrawableCompat;
-import androidx.fragment.app.Fragment;
-import androidx.fragment.app.FragmentActivity;
-import androidx.fragment.app.FragmentManager;
-import androidx.preference.Preference;
-import androidx.preference.PreferenceViewHolder;
-import androidx.recyclerview.widget.RecyclerView;
-
import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_SETTINGS_ID;
import static net.osmand.plus.profiles.SelectProfileBottomSheet.PROFILES_LIST_UPDATED_ARG;
import static net.osmand.plus.profiles.SelectProfileBottomSheet.PROFILE_KEY_ARG;
@@ -313,7 +310,9 @@ public class ProfileAppearanceFragment extends BaseSettingsFragment implements O
outState.putString(PROFILE_STRINGKEY_KEY, changedProfile.stringKey);
outState.putInt(PROFILE_ICON_RES_KEY, changedProfile.iconRes);
outState.putSerializable(PROFILE_COLOR_KEY, changedProfile.color);
- outState.putInt(PROFILE_CUSTOM_COLOR_KEY, changedProfile.customColor);
+ if (changedProfile.customColor != null) {
+ outState.putInt(PROFILE_CUSTOM_COLOR_KEY, changedProfile.customColor);
+ }
if (changedProfile.parent != null) {
outState.putString(PROFILE_PARENT_KEY, changedProfile.parent.getStringKey());
}
@@ -387,7 +386,7 @@ public class ProfileAppearanceFragment extends BaseSettingsFragment implements O
profileName.setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
- if(hasFocus){
+ if (hasFocus) {
profileName.setSelection(profileName.getText().length());
AndroidUtils.showSoftKeyboard(getMyActivity(), profileName);
}
@@ -511,7 +510,7 @@ public class ProfileAppearanceFragment extends BaseSettingsFragment implements O
ImageView coloredCircle = iconItemView.findViewById(R.id.background);
AndroidUtils.setBackground(coloredCircle,
UiUtilities.tintDrawable(AppCompatResources.getDrawable(app, R.drawable.circle_background_light),
- UiUtilities.getColorWithAlpha(ContextCompat.getColor(app, R.color.icon_color_default_light), 0.1f)));
+ UiUtilities.getColorWithAlpha(ContextCompat.getColor(app, R.color.icon_color_default_light), 0.1f)));
coloredCircle.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
@@ -859,11 +858,11 @@ public class ProfileAppearanceFragment extends BaseSettingsFragment implements O
}
return false;
}
-
+
private boolean nameIsEmpty() {
return changedProfile.name.trim().isEmpty();
}
-
+
private void disableSaveButtonWithErrorMessage(String errorMessage) {
saveButton.setEnabled(false);
profileNameOtfb.setError(errorMessage, true);
@@ -1039,7 +1038,8 @@ public class ProfileAppearanceFragment extends BaseSettingsFragment implements O
if (parent != null ? !parent.equals(that.parent) : that.parent != null) return false;
if (name != null ? !name.equals(that.name) : that.name != null) return false;
if (color != that.color) return false;
- if (customColor != null ? !customColor.equals(that.customColor) : that.customColor != null) return false;
+ if (customColor != null ? !customColor.equals(that.customColor) : that.customColor != null)
+ return false;
if (routingProfile != null ? !routingProfile.equals(that.routingProfile) : that.routingProfile != null)
return false;
if (routeService != that.routeService) return false;
From 09fbe4fb37a922544888b10963be571d69caa26d Mon Sep 17 00:00:00 2001
From: Vitaliy
Date: Sat, 6 Mar 2021 15:45:58 +0200
Subject: [PATCH 23/34] Small fix for custom color
---
.../plus/settings/fragments/ProfileAppearanceFragment.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/OsmAnd/src/net/osmand/plus/settings/fragments/ProfileAppearanceFragment.java b/OsmAnd/src/net/osmand/plus/settings/fragments/ProfileAppearanceFragment.java
index 73a2574531..bc3fa5add6 100644
--- a/OsmAnd/src/net/osmand/plus/settings/fragments/ProfileAppearanceFragment.java
+++ b/OsmAnd/src/net/osmand/plus/settings/fragments/ProfileAppearanceFragment.java
@@ -327,13 +327,15 @@ public class ProfileAppearanceFragment extends BaseSettingsFragment implements O
changedProfile.stringKey = savedInstanceState.getString(PROFILE_STRINGKEY_KEY);
changedProfile.iconRes = savedInstanceState.getInt(PROFILE_ICON_RES_KEY);
changedProfile.color = (ProfileIconColors) savedInstanceState.getSerializable(PROFILE_COLOR_KEY);
- changedProfile.customColor = savedInstanceState.getInt(PROFILE_CUSTOM_COLOR_KEY);
String parentStringKey = savedInstanceState.getString(PROFILE_PARENT_KEY);
changedProfile.parent = ApplicationMode.valueOfStringKey(parentStringKey, null);
isBaseProfileImported = savedInstanceState.getBoolean(IS_BASE_PROFILE_IMPORTED);
changedProfile.locationIcon = (LocationIcon) savedInstanceState.getSerializable(PROFILE_LOCATION_ICON_KEY);
changedProfile.navigationIcon = (NavigationIcon) savedInstanceState.getSerializable(PROFILE_NAVIGATION_ICON_KEY);
isNewProfile = savedInstanceState.getBoolean(IS_NEW_PROFILE_KEY);
+ if (savedInstanceState.containsKey(PROFILE_CUSTOM_COLOR_KEY)) {
+ changedProfile.customColor = savedInstanceState.getInt(PROFILE_CUSTOM_COLOR_KEY);
+ }
}
@Override
From 7cca699fdbe42ba4af1b8f066d87f699ff7d08f3 Mon Sep 17 00:00:00 2001
From: Vitaliy
Date: Sat, 6 Mar 2021 21:20:36 +0200
Subject: [PATCH 24/34] Small fix for flow layout spacing
---
OsmAnd/src/net/osmand/plus/widgets/FlowLayout.java | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/OsmAnd/src/net/osmand/plus/widgets/FlowLayout.java b/OsmAnd/src/net/osmand/plus/widgets/FlowLayout.java
index afc2c030cf..e146eb5610 100644
--- a/OsmAnd/src/net/osmand/plus/widgets/FlowLayout.java
+++ b/OsmAnd/src/net/osmand/plus/widgets/FlowLayout.java
@@ -114,16 +114,11 @@ public class FlowLayout extends ViewGroup {
}
private int getFreeSizeSpacing(int width, LayoutParams lp, int childWidth) {
- int freeSizeSpacing;
int itemsCount = width / (childWidth + lp.horizontalSpacing);
if (itemsCount > 1 && horizontalAutoSpacing) {
- freeSizeSpacing = (width % childWidth / (itemsCount - 1)) + lp.horizontalSpacing;
- } else if (!horizontalAutoSpacing) {
- freeSizeSpacing = lp.horizontalSpacing;
- } else {
- freeSizeSpacing = (width % childWidth / itemsCount) + lp.horizontalSpacing;
+ return (width % childWidth / (itemsCount - 1)) + lp.horizontalSpacing;
}
- return freeSizeSpacing;
+ return lp.horizontalSpacing;
}
public static class LayoutParams extends ViewGroup.LayoutParams {
From acf8571ab3fe390ebb4b90f18564af6040cb99c2 Mon Sep 17 00:00:00 2001
From: androiddevkotlin <64539346+androiddevkotlin@users.noreply.github.com>
Date: Sat, 6 Mar 2021 22:40:27 +0200
Subject: [PATCH 25/34] Fix icon alignment in landscape orientation
---
OsmAnd/res/layout/preference_circle_item.xml | 3 +--
OsmAnd/res/layout/preference_color_select.xml | 9 ++++++---
.../mapcontextmenu/editors/PointEditorFragmentNew.java | 3 ++-
.../settings/fragments/ProfileAppearanceFragment.java | 3 ++-
OsmAnd/src/net/osmand/plus/widgets/FlowLayout.java | 10 +++++-----
5 files changed, 16 insertions(+), 12 deletions(-)
diff --git a/OsmAnd/res/layout/preference_circle_item.xml b/OsmAnd/res/layout/preference_circle_item.xml
index 662b848f29..8fab8547a4 100644
--- a/OsmAnd/res/layout/preference_circle_item.xml
+++ b/OsmAnd/res/layout/preference_circle_item.xml
@@ -2,8 +2,7 @@
+ android:layout_height="wrap_content">
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
+ android:layout_marginStart="@dimen/list_content_padding"
+ android:layout_marginLeft="@dimen/list_content_padding"
+ android:layout_marginEnd="@dimen/list_content_padding"
+ android:layout_marginRight="@dimen/list_content_padding" />
\ No newline at end of file
diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/PointEditorFragmentNew.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/PointEditorFragmentNew.java
index 1c59b4508b..946351baa0 100644
--- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/PointEditorFragmentNew.java
+++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/PointEditorFragmentNew.java
@@ -522,8 +522,9 @@ public abstract class PointEditorFragmentNew extends BaseOsmAndFragment implemen
FlowLayout selectShape = view.findViewById(R.id.select_shape);
for (BackgroundType backgroundType : BackgroundType.values()) {
if (backgroundType.isSelected()) {
+ int minimalPaddingBetweenIcon = app.getResources().getDimensionPixelSize(R.dimen.favorites_select_icon_button_right_padding);
selectShape.addView(createShapeItemView(backgroundType, selectShape),
- new FlowLayout.LayoutParams(0, 0));
+ new FlowLayout.LayoutParams(minimalPaddingBetweenIcon, 0));
selectShape.setHorizontalAutoSpacing(true);
}
}
diff --git a/OsmAnd/src/net/osmand/plus/settings/fragments/ProfileAppearanceFragment.java b/OsmAnd/src/net/osmand/plus/settings/fragments/ProfileAppearanceFragment.java
index 7adf43b3be..0fd6f44ab1 100644
--- a/OsmAnd/src/net/osmand/plus/settings/fragments/ProfileAppearanceFragment.java
+++ b/OsmAnd/src/net/osmand/plus/settings/fragments/ProfileAppearanceFragment.java
@@ -431,7 +431,8 @@ public class ProfileAppearanceFragment extends BaseSettingsFragment implements O
ArrayList icons = ProfileIcons.getIcons();
for (int iconRes : icons) {
View iconItem = createIconItemView(iconRes, iconItems);
- iconItems.addView(iconItem, new FlowLayout.LayoutParams(0, 0));
+ int minimalPaddingBetweenIcon = app.getResources().getDimensionPixelSize(R.dimen.favorites_select_icon_button_right_padding);
+ iconItems.addView(iconItem, new FlowLayout.LayoutParams(minimalPaddingBetweenIcon, 0));
iconItems.setHorizontalAutoSpacing(true);
}
setIconColor(changedProfile.iconRes);
diff --git a/OsmAnd/src/net/osmand/plus/widgets/FlowLayout.java b/OsmAnd/src/net/osmand/plus/widgets/FlowLayout.java
index afc2c030cf..16f87a9561 100644
--- a/OsmAnd/src/net/osmand/plus/widgets/FlowLayout.java
+++ b/OsmAnd/src/net/osmand/plus/widgets/FlowLayout.java
@@ -100,14 +100,14 @@ public class FlowLayout extends ViewGroup {
verticalPosition += line_height;
}
child.layout(horizontalPosition - childWidth, verticalPosition, horizontalPosition, verticalPosition + childHeight);
- horizontalPosition -= childWidth + freeSizeSpacing;
+ horizontalPosition -= freeSizeSpacing;
} else {
if (horizontalPosition + childWidth > width) {
horizontalPosition = getPaddingLeft();
verticalPosition += line_height;
}
child.layout(horizontalPosition, verticalPosition, horizontalPosition + childWidth, verticalPosition + childHeight);
- horizontalPosition += childWidth + freeSizeSpacing;
+ horizontalPosition += freeSizeSpacing;
}
}
}
@@ -117,11 +117,11 @@ public class FlowLayout extends ViewGroup {
int freeSizeSpacing;
int itemsCount = width / (childWidth + lp.horizontalSpacing);
if (itemsCount > 1 && horizontalAutoSpacing) {
- freeSizeSpacing = (width % childWidth / (itemsCount - 1)) + lp.horizontalSpacing;
+ freeSizeSpacing = (width - childWidth) / (itemsCount-1);
} else if (!horizontalAutoSpacing) {
- freeSizeSpacing = lp.horizontalSpacing;
+ freeSizeSpacing = childWidth + lp.horizontalSpacing;
} else {
- freeSizeSpacing = (width % childWidth / itemsCount) + lp.horizontalSpacing;
+ freeSizeSpacing = (width % childWidth / itemsCount);
}
return freeSizeSpacing;
}
From 80adbc698a11359408ea1899fe170f8e63b209d8 Mon Sep 17 00:00:00 2001
From: androiddevkotlin <64539346+androiddevkotlin@users.noreply.github.com>
Date: Sat, 6 Mar 2021 22:46:35 +0200
Subject: [PATCH 26/34] Fix conflicts
---
OsmAnd/src/net/osmand/plus/widgets/FlowLayout.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/OsmAnd/src/net/osmand/plus/widgets/FlowLayout.java b/OsmAnd/src/net/osmand/plus/widgets/FlowLayout.java
index 8db71f84ce..16f87a9561 100644
--- a/OsmAnd/src/net/osmand/plus/widgets/FlowLayout.java
+++ b/OsmAnd/src/net/osmand/plus/widgets/FlowLayout.java
@@ -114,6 +114,7 @@ public class FlowLayout extends ViewGroup {
}
private int getFreeSizeSpacing(int width, LayoutParams lp, int childWidth) {
+ int freeSizeSpacing;
int itemsCount = width / (childWidth + lp.horizontalSpacing);
if (itemsCount > 1 && horizontalAutoSpacing) {
freeSizeSpacing = (width - childWidth) / (itemsCount-1);
@@ -121,9 +122,8 @@ public class FlowLayout extends ViewGroup {
freeSizeSpacing = childWidth + lp.horizontalSpacing;
} else {
freeSizeSpacing = (width % childWidth / itemsCount);
- return (width % childWidth / (itemsCount - 1)) + lp.horizontalSpacing;
}
- return lp.horizontalSpacing;
+ return freeSizeSpacing;
}
public static class LayoutParams extends ViewGroup.LayoutParams {
From 80ea50ff963c7a0fc74a64612c8c4b2cf97c8b0d Mon Sep 17 00:00:00 2001
From: Andreas Voegele
Date: Mon, 8 Mar 2021 09:09:45 +0100
Subject: [PATCH 27/34] Ignore empty gx:coord elements in kml files
---
.../src/net/osmand/plus/helpers/kml2gpx.xslt | 24 ++++++++++---------
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/OsmAnd/src/net/osmand/plus/helpers/kml2gpx.xslt b/OsmAnd/src/net/osmand/plus/helpers/kml2gpx.xslt
index 221b192405..2c899eb840 100644
--- a/OsmAnd/src/net/osmand/plus/helpers/kml2gpx.xslt
+++ b/OsmAnd/src/net/osmand/plus/helpers/kml2gpx.xslt
@@ -178,17 +178,19 @@
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
From 5371f429a4f2fa9d3cc88ba21e8ee425d0ad6778 Mon Sep 17 00:00:00 2001
From: androiddevkotlin <64539346+androiddevkotlin@users.noreply.github.com>
Date: Mon, 8 Mar 2021 14:16:09 +0200
Subject: [PATCH 28/34] wrong direction marker toolbar
https://github.com/osmandapp/OsmAnd/issues/10961
---
OsmAnd/src/net/osmand/plus/UiUtilities.java | 8 +++++---
.../plus/views/mapwidgets/MapMarkersWidgetsFactory.java | 4 +---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/OsmAnd/src/net/osmand/plus/UiUtilities.java b/OsmAnd/src/net/osmand/plus/UiUtilities.java
index 269800c630..4e12388b5c 100644
--- a/OsmAnd/src/net/osmand/plus/UiUtilities.java
+++ b/OsmAnd/src/net/osmand/plus/UiUtilities.java
@@ -1,6 +1,7 @@
package net.osmand.plus;
import android.content.Context;
+import android.content.pm.PackageManager;
import android.content.res.ColorStateList;
import android.graphics.Color;
import android.graphics.Typeface;
@@ -369,13 +370,14 @@ public class UiUtilities {
break;
}
//Looks like screenOrientation correction must not be applied for devices without compass?
- Sensor compass = ((SensorManager) app.getSystemService(Context.SENSOR_SERVICE)).getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD);
- if (compass == null) {
+ PackageManager manager = app.getPackageManager();
+ boolean hasCompass = manager.hasSystemFeature(PackageManager.FEATURE_SENSOR_COMPASS);
+ if (!hasCompass) {
screenOrientation = 0;
}
return screenOrientation;
}
-
+
public static void setupSnackbar(Snackbar snackbar, boolean nightMode) {
setupSnackbar(snackbar, nightMode, null, null, null, null);
}
diff --git a/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapMarkersWidgetsFactory.java b/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapMarkersWidgetsFactory.java
index ac0765cee5..52801776cd 100644
--- a/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapMarkersWidgetsFactory.java
+++ b/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapMarkersWidgetsFactory.java
@@ -33,7 +33,6 @@ public class MapMarkersWidgetsFactory {
private final MapActivity map;
private MapMarkersHelper helper;
- private int screenOrientation;
private boolean portraitMode;
private View topBar;
@@ -59,7 +58,6 @@ public class MapMarkersWidgetsFactory {
public MapMarkersWidgetsFactory(final MapActivity map) {
this.map = map;
helper = map.getMyApplication().getMapMarkersHelper();
- screenOrientation = map.getMyApplication().getUIUtilities().getScreenOrientation();
portraitMode = AndroidUiHelper.isOrientationPortrait(map);
addressTopBar = map.findViewById(R.id.map_top_bar);
@@ -245,7 +243,7 @@ public class MapMarkersWidgetsFactory {
}
dd.setImage(R.drawable.ic_arrow_marker_diretion, MapMarker.getColorId(marker.colorIndex));
if (heading != null && loc != null) {
- dd.setAngle(mes[1] - heading + 180 + screenOrientation);
+ dd.setAngle(mes[1] - heading + 180);
}
if (newImage) {
arrowImg.setImageDrawable(dd);
From 0d06344869a5260ac51058243f4c5c0fe1276c83 Mon Sep 17 00:00:00 2001
From: Victor Shcherb
Date: Mon, 8 Mar 2021 16:15:19 +0100
Subject: [PATCH 29/34] Formatting
---
.../main/java/net/osmand/osm/edit/OsmMapUtils.java | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/OsmAnd-java/src/main/java/net/osmand/osm/edit/OsmMapUtils.java b/OsmAnd-java/src/main/java/net/osmand/osm/edit/OsmMapUtils.java
index 5e19d09658..cf86ca88ed 100644
--- a/OsmAnd-java/src/main/java/net/osmand/osm/edit/OsmMapUtils.java
+++ b/OsmAnd-java/src/main/java/net/osmand/osm/edit/OsmMapUtils.java
@@ -153,35 +153,34 @@ public class OsmMapUtils {
}
boolean area = w.getFirstNodeId() == w.getLastNodeId();
// double check for area (could be negative all)
- if(area) {
+ if (area) {
Node fn = w.getFirstNode();
Node ln = w.getLastNode();
- if(fn != null && fn != null && MapUtils.getDistance(fn.getLatLon(), ln.getLatLon()) < 50) {
+ if (fn != null && fn != null && MapUtils.getDistance(fn.getLatLon(), ln.getLatLon()) < 50) {
area = true;
} else {
area = false;
}
}
LatLon ll = area ? getComplexPolyCenter(nodes, null) : getWeightCenterForNodes(nodes);
- if(ll == null) {
+ if (ll == null) {
return null;
}
double flat = ll.getLatitude();
double flon = ll.getLongitude();
- if(!area || !MapAlgorithms.containsPoint(nodes, ll.getLatitude(), ll.getLongitude())) {
+ if (!area || !MapAlgorithms.containsPoint(nodes, ll.getLatitude(), ll.getLongitude())) {
double minDistance = Double.MAX_VALUE;
for (Node n : nodes) {
if (n != null) {
double d = MapUtils.getDistance(n.getLatitude(), n.getLongitude(), ll.getLatitude(), ll.getLongitude());
- if(d < minDistance) {
+ if (d < minDistance) {
flat = n.getLatitude();
flon = n.getLongitude();
minDistance = d;
}
}
- }
+ }
}
-
return new LatLon(flat, flon);
}
From d8e36b17db18532357044d0158a4d81e5e98da7c Mon Sep 17 00:00:00 2001
From: androiddevkotlin <64539346+androiddevkotlin@users.noreply.github.com>
Date: Tue, 9 Mar 2021 00:20:13 +0200
Subject: [PATCH 30/34] =?UTF-8?q?Show/Hide=20=E2=80=93=20Quick=20Action?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Added action list, should use the same scheme for naming "Show/Hide – Coordinates widget"
Quick action bar on the map: implement similar scheme "Show – Coordinates widget" or "Hide – Cooridnates widget"
https://github.com/osmandapp/OsmAnd/issues/10196
---
OsmAnd/res/values-ar/strings.xml | 16 ---------------
OsmAnd/res/values-az/strings.xml | 6 ------
OsmAnd/res/values-b+be+Latn/strings.xml | 6 ------
OsmAnd/res/values-b+hsb/strings.xml | 8 --------
OsmAnd/res/values-b+kab/strings.xml | 4 ----
OsmAnd/res/values-be/strings.xml | 16 ---------------
OsmAnd/res/values-bg/strings.xml | 2 --
OsmAnd/res/values-ca/strings.xml | 16 ---------------
OsmAnd/res/values-cs/strings.xml | 16 ---------------
OsmAnd/res/values-da/strings.xml | 16 ---------------
OsmAnd/res/values-de/strings.xml | 16 ---------------
OsmAnd/res/values-el/strings.xml | 16 ---------------
OsmAnd/res/values-en-rGB/strings.xml | 2 --
OsmAnd/res/values-eo/strings.xml | 16 ---------------
OsmAnd/res/values-es-rAR/strings.xml | 16 ---------------
OsmAnd/res/values-es-rUS/strings.xml | 16 ---------------
OsmAnd/res/values-es/strings.xml | 16 ---------------
OsmAnd/res/values-et/strings.xml | 16 ---------------
OsmAnd/res/values-eu/strings.xml | 16 ---------------
OsmAnd/res/values-fa/strings.xml | 16 ---------------
OsmAnd/res/values-fi/strings.xml | 12 -----------
OsmAnd/res/values-fr/strings.xml | 16 ---------------
OsmAnd/res/values-gl/strings.xml | 16 ---------------
OsmAnd/res/values-hu/strings.xml | 16 ---------------
OsmAnd/res/values-hy/strings.xml | 8 --------
OsmAnd/res/values-id/strings.xml | 2 --
OsmAnd/res/values-is/strings.xml | 16 ---------------
OsmAnd/res/values-it/strings.xml | 16 ---------------
OsmAnd/res/values-iw/strings.xml | 16 ---------------
OsmAnd/res/values-ja/strings.xml | 16 ---------------
OsmAnd/res/values-ka/strings.xml | 14 -------------
OsmAnd/res/values-kn/strings.xml | 6 ------
OsmAnd/res/values-lt/strings.xml | 9 ---------
OsmAnd/res/values-lv/strings.xml | 6 ------
OsmAnd/res/values-ml/strings.xml | 6 ------
OsmAnd/res/values-nb/strings.xml | 16 ---------------
OsmAnd/res/values-nl/strings.xml | 16 ---------------
OsmAnd/res/values-oc/strings.xml | 6 ------
OsmAnd/res/values-pl/strings.xml | 16 ---------------
OsmAnd/res/values-pt-rBR/strings.xml | 16 ---------------
OsmAnd/res/values-pt/strings.xml | 16 ---------------
OsmAnd/res/values-ro/strings.xml | 10 ----------
OsmAnd/res/values-ru/strings.xml | 16 ---------------
OsmAnd/res/values-sc/strings.xml | 16 ---------------
OsmAnd/res/values-sk/strings.xml | 16 ---------------
OsmAnd/res/values-sl/strings.xml | 8 --------
OsmAnd/res/values-sr/strings.xml | 16 ---------------
OsmAnd/res/values-sv/strings.xml | 4 ----
OsmAnd/res/values-tr/strings.xml | 16 ---------------
OsmAnd/res/values-uk/strings.xml | 16 ---------------
OsmAnd/res/values-zh-rCN/strings.xml | 14 -------------
OsmAnd/res/values-zh-rTW/strings.xml | 16 ---------------
OsmAnd/res/values/strings.xml | 20 +------------------
.../plus/osmedit/ShowHideOSMBugAction.java | 9 ++++-----
.../quickaction/CreateEditActionDialog.java | 10 +++++++++-
.../osmand/plus/quickaction/QuickAction.java | 4 ++++
.../ShowHideCoordinatesWidgetAction.java | 9 ++++-----
.../actions/ShowHideFavoritesAction.java | 9 ++++-----
.../actions/ShowHideGpxTracksAction.java | 8 ++++----
.../actions/ShowHideMapillaryAction.java | 9 ++++-----
.../actions/ShowHidePoiAction.java | 8 +++-----
.../actions/ShowHideTransportLinesAction.java | 9 ++++-----
.../plus/srtmplugin/ContourLinesAction.java | 14 +++++++++----
.../osmand/plus/srtmplugin/TerrainAction.java | 12 ++++++++---
64 files changed, 60 insertions(+), 722 deletions(-)
diff --git a/OsmAnd/res/values-ar/strings.xml b/OsmAnd/res/values-ar/strings.xml
index ad8e8a22a1..eddda38785 100644
--- a/OsmAnd/res/values-ar/strings.xml
+++ b/OsmAnd/res/values-ar/strings.xml
@@ -2123,8 +2123,6 @@
عرض مربع الحوار مؤقتاً" حفظ إلى "مكان
- عرض المفضلة
- إخفاء المفضلةعرض %1$sإخفاء %1$sإضافة فئة
@@ -2239,8 +2237,6 @@
\n • إضافة POI ورفعها مباشرة إلى الموقع (أو في وقت لاحق إن كنت غير متصل بالشبكة)
\nعدل طلب البحث أو زد النطاق.
- إظهار ملاحظات OSM
- إخفاء ملاحظات OSMمرتبة حسب المسافةنظرة عامةالتكبير التلقائي
@@ -2878,8 +2874,6 @@
اعرض المزيدالمسارات على الخريطةإظهار أو إخفاء مسارات GPX المحددة على الخريطة.
- إخفاء المسارات
- عرض المساراتالرجاء إضافة الوجهة أولاًالطريق السابقإضافة نقاط بداية ونهاية
@@ -3066,11 +3060,7 @@
تفضيل الطرق غير المعبدة عند التوجيه.تحرير خرائط OSMلإظهار أو إخفاء الخطوط الكنتورية على الخريطة.
- إظهار الخطوط الكنتورية
- إخفاء الخطوط الكنتوريةلإظهار وإخفاء التضاريس على الخريطة.
- إظهار التضاريس
- إخفاء التضاريسلا يمكن بدء تشغيل أداة تحويل النص إلى كلام.تصدير الوضعوضع أوسماند: %1$s
@@ -3551,8 +3541,6 @@
إضافة وصفحذف الوصفزر لإظهار طبقة التضاريس أو إخفائها على الخريطة.
- إظهار التضاريس
- إخفاء التضاريسالمنحدراتالتضاريستمكين لعرض المنحدرات أو خريطة التضاريس. يمكنك قراءة المزيد عن أنواع الخرائط هذه على موقعنا.
@@ -3673,8 +3661,6 @@
\nإستئنافيمكنك الوصول إلى هذه الإجراءات عن طريق النقر على زر \"%1$s\".
- إخفاء وسائل النقل العام
- إظهار وسائل النقل العامزر لإظهار أو إخفاء وسائل النقل العام على الخريطة.إنشاء أو تعديل نقطة الأهتمام POIمكان الموقف
@@ -3742,8 +3728,6 @@
ضبط ارتفاع السفينةيمكنك ضبط ارتفاع الحاوية لتجنب الجسور المنخفضة. ضع في اعتبارك أنه إذا كان الجسر متحركاً ، فسوف نستخدم ارتفاعه في الحالة المفتوحة.تحديد عرض السفينة لتجنب الجسور الضيقة
- إخفاء مابيلاري
- إظهار مابيلاريإظهار أو إخفاء طبقة مابيلاري على الخريطة.POI كاميرا مراقبة السرعةإلغاء تثبيت كاميرات السرعة
diff --git a/OsmAnd/res/values-az/strings.xml b/OsmAnd/res/values-az/strings.xml
index 78625eeb5d..63278da079 100644
--- a/OsmAnd/res/values-az/strings.xml
+++ b/OsmAnd/res/values-az/strings.xml
@@ -741,8 +741,6 @@
Favorit əlavə et" burda saxlandı: "Yer
- Favoritləri göstər
- Favoritləri gizlət%1$s-i göstər%1$s-i gizlətKateqoriya əlavə et
@@ -752,8 +750,6 @@
Xəritə stilləriAxtarış radiusunu artırAxtarış sorğusunu dəyişin və ya axtarış radiusunu artırın.
- OSM qeydlərini göstər
- OSM qeydlərini gizlətBu fəaliyyət düyməsinə toxunulduqda, xəritədə OSM qeydləri göstəriləcək və ya gizlədiləcək.Məsafəyə görə sıralaFavoritlərdə axtar
@@ -2149,8 +2145,6 @@
Siltonmetr
- Mapillary-ni gizlət
- Mapillary-ni göstər%1$s silindiSil və yenidən başlatVikipediya xəritələrini endir
diff --git a/OsmAnd/res/values-b+be+Latn/strings.xml b/OsmAnd/res/values-b+be+Latn/strings.xml
index 3d0cfd1262..83b3e3f846 100644
--- a/OsmAnd/res/values-b+be+Latn/strings.xml
+++ b/OsmAnd/res/values-b+be+Latn/strings.xml
@@ -2017,8 +2017,6 @@ Praparcyjnaj pamiacі %4$s MB (Abmiežavańnie Android %5$s MB, Dalvik %6$s MB).
Pavialičyć radyus pošukuNičoha nie znojdzienaŹmianicie pošukavy zapyt abo pavialičcie radyus pošuku.
- Pakazać OSM-natatki
- Schavać OSM-natatkiNacisk na hetuju knopku pakaža ci schavaje OSM-natatki na mapie.Adsartavana pa adlehłaściPošuk upadabanych
@@ -2155,8 +2153,6 @@ Praparcyjnaj pamiacі %4$s MB (Abmiežavańnie Android %5$s MB, Dalvik %6$s MB).
Ukliučyć HolasDadać pieršy pramiežkavy punktPakazać pramiežkavy dyjaloh
- Pakazać upadabanyja
- Schavać upadabanyjaPakazać %1$sSchavać %1$sDadać katehoryu
@@ -2821,8 +2817,6 @@ Praparcyjnaj pamiacі %4$s MB (Abmiežavańnie Android %5$s MB, Dalvik %6$s MB).
Pakazać boĺšAdliustroŭvajemyja sliadyNacisk na knopku dziejannia pakaža ci schavaje abranyja GPX-sliady na mapie
- Schavać GPX-sliady
- Pakazać GPX-sliadySpačatku dadajcie punkt pryznačenniaPapiaredni maršrutDadać dom
diff --git a/OsmAnd/res/values-b+hsb/strings.xml b/OsmAnd/res/values-b+hsb/strings.xml
index 1268fbb09f..d9c186a2d7 100644
--- a/OsmAnd/res/values-b+hsb/strings.xml
+++ b/OsmAnd/res/values-b+hsb/strings.xml
@@ -912,8 +912,6 @@
Pytanski radius powjetšićŽadyn pytanski wuslědkZměń pytanje abo powjetš jeho radius.
- OSM-noticy pokazać
- OSM-noticy schowaćSortěrowane po zdalenosćiW faworitach pytaćSćehń reliefowu kartu, zo by so relief pokazał.
@@ -1020,8 +1018,6 @@
Předchadny dypk dodaćPřichodny dypk dodaćNawigaciju zahajić/přetorhnyć
- Fawority pokazać
- Fawority schować%1$s pokazać%1$s schowaćKategoriju dodać
@@ -1578,10 +1574,6 @@
Wšě karty aktualizowaćChceš woprawdźe wšě (%1$d) karty aktualizować\?Změny na OSM
- Pokazaj wysokostne linije
- Schowaj wysokostne linije
- Pokazaj relief
- Schowaj reliefProfil eksportowaćOsmAnd-profil: %1$sProfil \'%1$s\' hižo eksistuje. Chceš jón přepisać\?
diff --git a/OsmAnd/res/values-b+kab/strings.xml b/OsmAnd/res/values-b+kab/strings.xml
index 86cf7e67d3..d10a9afb04 100644
--- a/OsmAnd/res/values-b+kab/strings.xml
+++ b/OsmAnd/res/values-b+kab/strings.xml
@@ -1044,8 +1044,6 @@
Swel…Ffer %1$SSken %1$S
- Inurifen
- Sken inurifenKkes tigawtTigawtTaɣect:
@@ -1254,8 +1252,6 @@
Fren ameccaq ugar n wanida ara d-yettwasiden ubrid.Abrid ad yettwasiḍen ticki ameccaq gar ubrid akked wadig-ik yugar azal i d-yettwammlen.Iberdan isnawanen
- Ffer akal
- Sken akalTaqeffalt i uskan neɣ tuffra n tissi n wakal n tkarḍa.Kkes aglamFren agraw
diff --git a/OsmAnd/res/values-be/strings.xml b/OsmAnd/res/values-be/strings.xml
index 66488f8900..d1ee6e9d85 100644
--- a/OsmAnd/res/values-be/strings.xml
+++ b/OsmAnd/res/values-be/strings.xml
@@ -2137,8 +2137,6 @@
Выдаліць дзеяннеСапраўды выдаліць дзеянне \"%s\"\?Месца
- Паказаць улюбёныя мясціны
- Схаваць улюбёныя мясціныПаказаць %1$sСхаваць %1$sДадаць катэгорыю
@@ -2308,8 +2306,6 @@
Павялічыць радыус пошукуНічога не знойдзенаЗмяніць пошукавы запыт альбо павялічыць радыус пошуку.
- Паказаць OSM-нататкі
- Схаваць OSM-нататкіКнопка для паказу / хавання OSM-нататак на мапе.Адсартавана па адлегласціПошук ва ўлюбёных мясцінах
@@ -2890,8 +2886,6 @@
Паказаць большАдлюстроўваемыя слядыКнопка для адлюстравання/хавання абраных слядоў на мапе.
- Схаваць сляды
- Паказаць слядыУключыць грамадскі транспарт для змен OsmAnd Live.Грамадскі транспарт OsmAnd Live%1$d перасадак
@@ -3310,11 +3304,7 @@
Аддаваць перавагу дарогам без пакрыцця.Змены OSMКнопка для адлюстравання/хавання контурных ліній на мапе.
- Паказаць контурныя лініі
- Схаваць контурныя лінііКнопка для адлюстравання/хавання зацянення рэльефу на мапе.
- Паказаць зацяненне рэльефу
- Схаваць зацяненне рэльефуНемагчыма запусціць механізм пераўтварэння тэксту ў гаворку.Экспарт профілюПрофіль OsmAnd: %1$s
@@ -3426,13 +3416,10 @@
Дадаць ці рэдагаваць улюбёнаеАднавіць прадвызначаны парадак элементаўВярнуцца да рэдагавання
- Паказаць грамадскі транспартКнопка для паказу ці хавання грамадскага транспарту на мапе.Дадаць профіль%1$s з %2$sСхілы
- Схаваць рэльеф
- Паказаць рэльефВыдаліць апісаннеДадаць апісаннеАбраць групу
@@ -3507,12 +3494,9 @@
Можна спалучаць тыпы POI з розных катэгорый. Націсніце \"Пераключыць\", каб абраць усе ці націсніце злева, каб абраць катэгорыю.Змяніць профіль праграмыАглядная мапа свету (падрабязная)
- Схаваць грамадскі транспартПералічыць маршрут у выпадку адхіленняВыдаліцьВызначце шырыню судна, каб пазбягаць вузкіх мастоў
- Схаваць Mapillary
- Паказаць MapillaryПераключальнік для паказу альбо хавання пласта Mapillary.Пазначце даўжыню транспартнага сродку, дазволеную для руху па маршрутах.Ліміт даўжыні
diff --git a/OsmAnd/res/values-bg/strings.xml b/OsmAnd/res/values-bg/strings.xml
index 384039cf20..215fbfee06 100644
--- a/OsmAnd/res/values-bg/strings.xml
+++ b/OsmAnd/res/values-bg/strings.xml
@@ -2063,8 +2063,6 @@
Маршрутът ще бъде преизчислен, ако разстоянието от маршрута до текущото местоположение е повече от избраната стойност.%1$s от %2$sСклонове
- Скриване на терена
- Показване на теренаБутон за показване или скриване на терена върху картата.Изтриване на описаниетоДобавете описание
diff --git a/OsmAnd/res/values-ca/strings.xml b/OsmAnd/res/values-ca/strings.xml
index cc2aa8afe2..a48a93b61f 100644
--- a/OsmAnd/res/values-ca/strings.xml
+++ b/OsmAnd/res/values-ca/strings.xml
@@ -2113,8 +2113,6 @@
El nom de l\'acció directa està duplicatUn commutador per mostrar o amagar els punts Preferits en el mapa.Un commutador per mostrar o amagar els PDIs en el mapa.
- Mostra Preferits
- Amaga PreferitsMostra %1$sAmaga %1$sAfegeix una categoria
@@ -2380,8 +2378,6 @@
Compreu i instal·leu el connector \'Corbes de nivell\' per visualitzar una gradació vertical d\'àrees.Baixeu el mapa \'Corbes de nivell\' per utilitzar-les en aquesta zona.Amaga començant pel nivell d\'escala
- Mostra notes OSM
- Amaga notes OSMBotó que mostra o amaga notes OSM al mapa.Ordenat per distànciaCerca a Preferits
@@ -2837,8 +2833,6 @@
Tipus de carreteraSortida aUn botó per mostrar o amagar les traces seleccionades al mapa.
- Amaga les traces
- Mostra les tracesPugeu a la paradaActiva les modificacions del transport públic amb OsmAnd Live.Transport públic a OsmAnd Live
@@ -3209,11 +3203,7 @@
Prefereix carreteres sense asfaltar a les asfaltades al generar rutes.Edicions a OSMBotó per a mostrar o amagar les corbes de nivell en el mapa.
- Mostra les corbes de nivell
- Amaga les corbes de nivellBotó per a mostrar o amagar l\'ombrejat de relleu al mapa.
- Mostra l\'ombrejat de relleu
- Amaga l\'ombrejat de relleuNo es pot iniciar el sistema text a veu.L\'OsmAnd utilitza l\'estàndard UTM, que és molt similar però no idèntic al format UTM NATO.El format seleccionat s\'aplicarà a tota l\'aplicació.
@@ -3455,8 +3445,6 @@
Afegiu una descripcióSuprimeix la descripcióUn botó per mostrar o amagar la capa de terreny al mapa.
- Mostra el terreny
- Amaga el terrenyOmbrejat del relleuLlegendaNivells de zoom
@@ -3553,8 +3541,6 @@
Podeu indicar l\'alçada del vaixell per evitar ponts baixos. Penseu que si el pont és mòbil, li aplicarem l\'alçada de quan estigui obert.Indiqueu l\'alçada del vaixell per evitar ponts baixos. Penseu que si el pont és mòbil, li aplicarem l\'alçada de quan estigui obert.Indiqueu l\'amplada del vaixell per evitar ponts ajustats
- Amaga Mapillary
- Mostra MapillaryUn commutador per mostrar o amagar la capa de Mapillary al mapa.Especifiqueu la llargada del vehicle que han de permetre les vies.Llargada màxima
@@ -3628,7 +3614,6 @@
Subscripció - OsmAnd LiveCompres OsmAndPerfils de navegació
- Amaga el transport públicBotó que mostra o oculta el transport públic al mapa.Crea o edita PDIPosicions d’aparcament
@@ -3735,7 +3720,6 @@
\n • S\'han corregit problemes en la importació/exportació de la configuració dels perfils
\n
\n
- Mostra el transport públicAfegeix un perfilCanvia el perfil de l\'aplicacióMapa general del món (detallat)
diff --git a/OsmAnd/res/values-cs/strings.xml b/OsmAnd/res/values-cs/strings.xml
index aca529b3ac..b03ed5cf61 100644
--- a/OsmAnd/res/values-cs/strings.xml
+++ b/OsmAnd/res/values-cs/strings.xml
@@ -2117,8 +2117,6 @@
Duplicitní název rychlé akceTlačítko pro zobrazení nebo skrytí Oblíbených míst na mapě.Tlačítko pro zobrazení nebo skrytí bodů zájmu na mapě.
- Zobrazit oblíbená místa
- Skrýt Oblíbená místaZobrazit %1$sSkrýt %1$sPřidat kategorii
@@ -2225,8 +2223,6 @@
Zadat cílNahradit cílPřidat první mezicíl
- Zobrazit OSM poznámky
- Skrýt OSM poznámkyTlačítko pro zobrazení nebo skrytí OpenStreetMap poznámek na mapě.Seřazeno podle vzdálenostiHledat v Oblíbených
@@ -2841,8 +2837,6 @@
Výjezd naVyměnitTlačítko pro zobrazení nebo skrytí vybraných stop na mapě.
- Skrýt stopy
- Zobrazit stopy%1$d přenosůPřidat počáteční a cílový bodPřidat počáteční bod
@@ -3251,8 +3245,6 @@
Trasa bude přepočítána, pokud vzdálenost od trasy k aktuální poloze je větší než zvolená hodnota.%1$s z %2$sSvahy
- Skrýt terén
- Zobrazit terénTlačítko pro zobrazení nebo skrytí vrstvy terénu na mapě.Smazat popisPřidat popis
@@ -3454,8 +3446,6 @@
Video poznámkyNastavte výšku plavidla, abyste se vyhnuli nízkým mostům. Mějte na paměti, že u pohyblivých mostů se zohledňuje jejich výška v otevřeném stavu.Nastavte šířku plavidla, abyste se vyhnuli úzkým mostům
- Skrýt Mapillary
- Zobrazit MapillaryPřepínač pro zobrazení nebo skrytí mapové vrstvy Mapillary.Zadejte délku vozidla, která musí být na trase povolená.Omezení délky
@@ -3633,8 +3623,6 @@
Položky v úvodním panelu a kontextovém menuNastavení uživatelského rozhraníÚvodní panel
- Skrýt veřejnou dopravu
- Zobrazit veřejnou dopravuTlačítko pro zobrazení nebo skrytí veřejné dopravy na mapě.Vytvořit nebo upravit bod zájmuParkovací místa
@@ -3751,11 +3739,7 @@
\n
\n
Tuto změnu můžete aplikovat na všechny profily nebo jen na vybraný profil.
- Skrýt stínování svahů
- Zobrazit stínování svahůTlačítko pro zobrazení nebo skrytí stínování svahů na mapě.
- Skrýt vrstevnice
- Zobrazit vrstevniceTlačítko pro zobrazení nebo skrytí vrstevnic na mapě.Nepodařilo se spustit modul převodu textu na řeč.Bílá
diff --git a/OsmAnd/res/values-da/strings.xml b/OsmAnd/res/values-da/strings.xml
index 04f3d2785b..0361352ed0 100644
--- a/OsmAnd/res/values-da/strings.xml
+++ b/OsmAnd/res/values-da/strings.xml
@@ -2123,8 +2123,6 @@
Dublet genvejsnavnEn til/fra-knap til at vise eller skjule Favoritpunkter på kortet.En til/fra-knap til at vise eller skjule interessepunkter på kortet.
- Vis Favoritter
- Skjul FavoritterVis %1$sSkjul %1$sTilføj en kategori
@@ -2392,8 +2390,6 @@
Skjul fra zoom-niveauSorteret efter afstandSøg i Favoritter
- Vis OSM-noter
- Skjul OSM-noterKnap til at vise eller skjule OSM-noter på kortet.Start søgning igenØg søgeradius
@@ -2847,8 +2843,6 @@
Stå af vedStig på ved stoppestedEn knap til at vise eller skjule valgte GPX-spor på kortet.
- Skjul GPX spor
- Vis GPX sporAngiv en destination førstAktivér offentlig transport for OsmAnd Live ændringer.OsmAnd Live offentlig transport
@@ -3263,11 +3257,7 @@
Foretræk ikke-asfalterede veje fremfor asfalterede veje.OSM redigeringerKnap der viser eller skjuler højdekurver på kortet.
- Vis højdekurver
- Skjul højdekurverEn knap der viser eller skjuler reliefskygger på kortet.
- Vis reliefskygger
- Skjul reliefskyggerHvidTekst-til-tale-programmet kan ikke startes.Simuler positionen ved hjælp af et optaget GPX-spor.
@@ -3430,8 +3420,6 @@
Ruten genberegnes, hvis afstanden fra ruten til den aktuelle placering er større end den valgte værdi.%1$s af %2$sSkråninger
- Skjul terræn
- Vis terrænEn knap der viser eller skjuler terrænlag på kortet.Slet beskrivelseTilføj beskrivelse
@@ -3553,8 +3541,6 @@
NavigationsprofilerOsmAnd TrackerOsmAnd køb
- Skjul offentlig transport
- Vis offentlig transportEn knap til at vise eller skjule offentlig transport på kortet.Opret/rediger IPParkeringsplads
@@ -3598,8 +3584,6 @@
Vis eller skjul yderligere kort-detaljerNatkortTilføj onlinekilde
- Skjul Mapillary
- Vis MapillarySlet næste destinationspunktLydstyrkeknapper som zoomAngiv et navn til punktet
diff --git a/OsmAnd/res/values-de/strings.xml b/OsmAnd/res/values-de/strings.xml
index f889f5fa19..f0370b0558 100644
--- a/OsmAnd/res/values-de/strings.xml
+++ b/OsmAnd/res/values-de/strings.xml
@@ -2137,8 +2137,6 @@
Kartenquelle hinzufügenDie Kartenquelle wurde in „%s“ geändert.Schaltflächenposition ändern
- Favoriten anzeigen
- Favoriten ausblendenKategorie, in der der Favorit gespeichert werden soll:Wählen Sie eine beliebige Kategorie.Schnellaktion
@@ -2384,8 +2382,6 @@
Privatzugang erlaubenZugang zu Privatgrund erlauben.Farbschema
- OSM-Hinweise einblenden
- OSM-Hinweise ausblendenSchaltfläche zum Ein- oder Ausblenden von OSM-Hinweisen auf der Karte.Nach Entfernung sortiertIn Favoriten suchen
@@ -2851,8 +2847,6 @@
Schritt für SchrittStraßentypenEine Schaltfläche zum Ein- oder Ausblenden ausgewählter Tracks auf der Karte.
- Tracks ausblenden
- Tracks einblendenAussteigen beiZusteigen an HaltestelleAktivierung von OsmAnd Live für Änderungen bei öffentlichen Verkehrsmitteln.
@@ -3267,11 +3261,7 @@
Bei der Navigation unbefestigte Straßen gegenüber befestigten bevorzugen.OSM-BearbeitungenSchaltfläche zum Ein- und Ausblenden von Höhenlinien auf der Karte.
- Höhenlinien anzeigen
- Höhenlinien ausblendenSchaltfläche zum Ein- oder Ausblenden der Reliefdarstellung.
- Relief anzeigen
- Relief ausblendenText-to-Speech-Engine kann nicht gestartet werden.Simulation Ihrer Position mit einem aufgezeichneten GPX-Track.Profil exportieren
@@ -3490,8 +3480,6 @@
Beschreibung hinzufügenBeschreibung löschenEine Schaltfläche zum Ein- und Ausblenden der Geländeebene auf der Karte.
- Gelände einblenden
- Gelände ausblendenReliefZoomstufenTransparenz
@@ -3607,8 +3595,6 @@
\n
FortfahrenSie können auf diese Aktionen zugreifen, indem Sie auf die Schaltfläche \"%1$s\" tippen.
- Öffentliche Verkehrsmittel ausblenden
- Öffentliche Verkehrsmittel anzeigenSchaltfläche zum Ein- oder Ausblenden der öffentlichen Verkehrsmittel auf der Karte.POI erstellen oder bearbeitenParkpositionen
@@ -3681,8 +3667,6 @@
Sie können die Schiffshöhe einstellen, um niedrige Brücken zu vermeiden. Denken Sie daran, wenn die Brücke beweglich ist, werden wir ihre Höhe im offenen Zustand verwenden.Schiffshöhe einstellen, um niedrige Brücken zu vermeiden. Beachten Sie: Wenn die Brücke beweglich ist, verwendet die Berechnung ihre Höhe im geöffneten Zustand.Stellen Sie die Schiffsbreite ein, um schmale Brücken zu vermeiden
- Mapillary ausblenden
- Mapillary anzeigenEine Umschaltfläche zum Ein- oder Ausblenden des Mapillary-Layers auf der Karte.Blitzer deinstallierenRechtliches
diff --git a/OsmAnd/res/values-el/strings.xml b/OsmAnd/res/values-el/strings.xml
index 9846bd658c..73b9f244c5 100644
--- a/OsmAnd/res/values-el/strings.xml
+++ b/OsmAnd/res/values-el/strings.xml
@@ -1532,8 +1532,6 @@
Φωτογραφίες με σύνδεσηΠροσθήκη φωτογραφιώνΔεν βρέθηκε τίποτα
- Εμφάνιση σημειώσεων OSM
- Απόκρυψη σημειώσεων OSMΠροςΕτικέτες POIΧωρίς όνομα
@@ -2634,8 +2632,6 @@
Διπλό όνομα γρήγορης ενέργειαςΕναλλαγή εμφάνισης ή απόκρυψης των αγαπημένων σημείων στον χάρτη.Εναλλαγή εμφάνισης ή απόκρυψης ΣΕ στον χάρτη.
- Εμφάνιση αγαπημένων
- Απόκρυψη αγαπημένωνΕμφάνιση %1$sΑπόκρυψη %1$sΠροσθήκη κατηγορίας
@@ -2899,8 +2895,6 @@
Εμφάνιση περισσοτέρωνΕμφανιζόμενα ίχνηΠλήκτρο εμφάνισης ή απόκρυψης επιλεγμένων ιχνών GPX στον χάρτη.
- Απόκρυψη ιχνών GPX
- Εμφάνιση ιχνών GPXΠαρακαλούμε ορίστε τον προορισμό πρώταΠροηγούμενη διαδρομήΠροσθήκη κατοικίας
@@ -3269,11 +3263,7 @@
Να προτιμώνται μη στρωμένοι δρόμοι για δρομολόγηση.Επεξεργασίες OSMΠλήκτρο εμφάνισης ή απόκρυψης ισοϋψών γραμμών στον χάρτη.
- Εμφάνιση ισοϋψών γραμμών
- Απόκρυψη ισοϋψών γραμμώνΕμφάνιση ή απόκρυψη πλήκτρου σκίασης αναγλύφου στον χάρτη.
- Εμφάνιση σκίασης ανάγλυφου
- Απόκρυψη σκίασης ανάγλυφουΑδυναμία εκκίνησης μηχανής κειμένου σε ομιλία.Προσομοίωση της θέσης σας χρησιμοποιώντας καταγεγραμμένη διαδρομή GPX.Εξαγωγή κατατομής (προφίλ)
@@ -3491,8 +3481,6 @@
Μπορείτε να ορίσετε ύψος σκάφους για να αποφύγετε χαμηλές γέφυρες. Σημειώστε ότι εάν η γέφυρα είναι κινητή, θα χρησιμοποιηθεί το ύψος της ανοικτής κατάστασης.Ορίστε ύψος σκάφος για αποφυγή χαμηλών γεφυρών. Σημειώστε ότι εάν η γέφυρα είναι κινητή, θα χρησιμοποιηθεί το ύψος της στην ανοικτή κατάσταση.Ορίστε πλάτος σκάφους για αποφυγή στενών γεφυρών
- Απόκρυψη Mapillary
- Εμφάνιση MapillaryΕναλλαγή εμφάνισης ή απόκρυψης της στρώσης Mapillary του χάρτη.Καθορίστε μήκος οχήματος που επιτρέπεται στους δρόμους.Όριο μήκους
@@ -3594,8 +3582,6 @@
\n • Διόρθωση σφαλμάτων με RTL
\n
\n
- Απόκρυψη δημόσιων συγκοινωνιών
- Εμφάνιση δημόσιων συγκοινωνιώνΠλήκτρο εμφάνισης ή απόκρυψης δημόσιων συγκοινωνιών στον χάρτη.Δημιουργία / Επεξεργασία ΣΕΘέσεις στάθμευσης
@@ -3707,8 +3693,6 @@
Η διαδρομή θα επανυπολογιστεί εάν η απόσταση από τη διαδρομή στην τρέχουσα θέση είναι μεγαλύτερη από την επιλεγμένη τιμή.%1$s από %2$sΠλαγιές
- Απόκρυψη εδάφους
- Εμφάνιση εδάφουςΈνα πλήκτρο εμφάνισης ή απόκρυψης της στρώσης εδάφους στον χάρτη.Διαγραφή περιγραφήςΠροσθήκη περιγραφής
diff --git a/OsmAnd/res/values-en-rGB/strings.xml b/OsmAnd/res/values-en-rGB/strings.xml
index 1d0a01a412..dd1352998f 100644
--- a/OsmAnd/res/values-en-rGB/strings.xml
+++ b/OsmAnd/res/values-en-rGB/strings.xml
@@ -96,8 +96,6 @@
Tapping the action button will add a map marker at the screen centre location.Tapping the action button will add a GPX waypoint at the screen centre location.Tapping the action button will show or hide the favourite points on the map.
- Show Favourites
- Hide FavouritesCategory to save the Favourite in:Analyse on mapYou have cancelled your OsmAnd Live subscription
diff --git a/OsmAnd/res/values-eo/strings.xml b/OsmAnd/res/values-eo/strings.xml
index 5eecbe842e..4527d0bd13 100644
--- a/OsmAnd/res/values-eo/strings.xml
+++ b/OsmAnd/res/values-eo/strings.xml
@@ -2117,8 +2117,6 @@
Duplikata nomo de rapida agoButono por montri/kaŝi ŝatatajn ejojn sur la mapo.Butono por montri/kaŝi interesejojn sur la mapo.
- Montri ŝatatajn
- Kaŝi ŝatatajnMontri %1$sKaŝi %1$sAldoni kategorion
@@ -2384,8 +2382,6 @@
Kaŝi komence de skal‑niveloOrdigitaj laŭ distancoSerĉi en ŝatataj
- Montri OSM-rimarkojn
- Kaŝi OSM-rimarkojnButono por montri/kaŝi OSM‑rimarkojn sur la mapo.Rekomenci serĉonPliigi serĉan radiuson
@@ -2840,8 +2836,6 @@
Eliru ĉeAtendu ĉe haltejoButono por montri/kaŝi elektitajn spurojn sur la mapo.
- Kaŝi spurojn
- Montri spurojnAktivigi publikan transporton por ŝanĝoj OsmAnd Live.Publika transporto OsmAnd LivePliaj informoj pri kiel OsmAnd difinas kursojn estas legeblaj ĉe nia taglibro.
@@ -3257,11 +3251,7 @@
Preferi vojojn sen firma pavimo.OSM‑redaktojButono por montri/kaŝi nivelkurbojn sur la mapo.
- Montri nivelkurbojn
- Kaŝi nivelkurbojnButono por montri/kaŝi nivelombrumon (reliefon) sur la mapo.
- Montri nivelombrumon
- Kaŝi nivelombrumonAntaŭkalkulas tempon de alveno por vojoj de nekonata speco kaj limigas rapidon por ĉiuj vojoj (povas influi kurs‑difinadon).Ne povas ekigi parolsintezilon.Elporti profilon
@@ -3487,8 +3477,6 @@
MapklarigoNivelombrumo%1$s el %2$s
- Kaŝi teren‑formon
- Montri teren‑formonButono por montri/kaŝi tavolon de formo de tereno sur la mapo.Forigi priskribonAldoni priskribon
@@ -3601,8 +3589,6 @@
\n
\n
Vi povas ekigi tiujn agojn per frapeti la butonon “%1$s”.
- Kaŝi publikan transporton
- Montri publikan transportonButono por montri/kaŝi publikan transporton sur la mapo.Krei aŭ redakti interesejonAldoni aŭ forigi ŝatatan ejojn
@@ -3671,8 +3657,6 @@
Vi povas enigi alton de via akvoveturilo por eviti malaltajn pontojn. Estu konscia, ke se ponto estas movebla, la alto en ĝia malfermita stato estos uzata.Enigu alton de akvoveturilo por eviti malaltajn pontojn. Estu konscia, ke se ponto estas movebla, la alto en ĝia malfermita stato estos uzata.Enigu larĝon de akvoveturilo por eviti mallarĝajn pontojn
- Kaŝi Mapillary
- Montri MapillaryŜaltilo por montri aŭ kaŝi tavolon de Mapillary sur la mapo.Malinstali informojn pri rapidkontrolilojLeĝaj
diff --git a/OsmAnd/res/values-es-rAR/strings.xml b/OsmAnd/res/values-es-rAR/strings.xml
index 12460550ce..479822fdd6 100644
--- a/OsmAnd/res/values-es-rAR/strings.xml
+++ b/OsmAnd/res/values-es-rAR/strings.xml
@@ -2120,8 +2120,6 @@
Nombre de la acción rápida duplicadoUn botón que muestra u oculta los puntos favoritos en el mapa.Un botón que muestra u oculta los PDI en el mapa.
- Mostrar Favoritos
- Ocultar FavoritosMostrar %1$sOcultar %1$sAñadir una categoría
@@ -2386,8 +2384,6 @@
Descarga la capa superpuesta del mapa «Sombreado» para mostrar el sombreado vertical.Instala el complemento «Curvas de nivel» para mostrar las áreas verticales graduadas.Ocultar desde el nivel de zoom
- Mostrar notas de OSM
- Ocultar notas de OSMUn botón que muestra u oculta las notas de OSM en el mapa.Ordenados por distanciaBuscar en Favoritos
@@ -2844,8 +2840,6 @@
Bajar enEsperar en la paradaUn botón que muestra u oculta las trazas elegidas en el mapa.
- Ocultar trazas
- Mostrar trazasActivar el transporte público para los cambios de OsmAnd Live.Transporte público en OsmAnd Live%1$d transbordo(s)
@@ -3261,11 +3255,7 @@
Prefiere los caminos sin pavimentar a los pavimentados para el trazado de rutas.Ediciones de OSMUn botón que muestra u oculta las curvas de nivel en el mapa.
- Mostrar curvas de nivel
- Ocultar curvas de nivelUn botón que muestra u oculta el sombreado de las colinas en el mapa.
- Mostrar el sombreado
- Ocultar el sombreadoImposible iniciar el motor de habla sintetizada.Simular la ubicación usando una traza GPX grabada.Exportar perfil
@@ -3489,8 +3479,6 @@
Permite ver el sombreado o el mapa de pendientes. Puedes leer más sobre estos tipos de mapas en nuestro sitio.SombreadoPendientes
- Ocultar terreno
- Mostrar terrenoUn botón que muestra u oculta la capa del terreno en el mapa.Borrar descripciónAñadir descripción
@@ -3605,8 +3593,6 @@
\n
\n
Puedes acceder a estas acciones pulsando el botón «%1$s».
- Ocultar transporte público
- Mostrar transporte públicoBotón que muestra u oculta el transporte público en el mapa.Crear o editar PDIPuestos de estacionamiento
@@ -3689,8 +3675,6 @@
LegalMantenerDesinstalar
- Ocultar Mapillary
- Mostrar MapillaryUn botón que alterna la capa de Mapillary en el mapa.Rumbo%1$s borrado
diff --git a/OsmAnd/res/values-es-rUS/strings.xml b/OsmAnd/res/values-es-rUS/strings.xml
index c2f3dbff3b..d645598dec 100644
--- a/OsmAnd/res/values-es-rUS/strings.xml
+++ b/OsmAnd/res/values-es-rUS/strings.xml
@@ -2120,8 +2120,6 @@
Nombre de la acción rápida duplicadoUn botón que muestra u oculta los puntos favoritos en el mapa.Un botón que muestra u oculta los PDI en el mapa.
- Mostrar Favoritos
- Ocultar FavoritosMostrar %1$sOcultar %1$sAñadir una categoría
@@ -2386,8 +2384,6 @@
Descarga la capa superpuesta del mapa «Sombreado» para mostrar el sombreado vertical.Instala el complemento «Curvas de nivel» para mostrar las áreas verticales graduadas.Ocultar desde el nivel de zoom
- Mostrar notas de OSM
- Ocultar notas de OSMUn botón que muestra u oculta las notas de OSM en el mapa.Ordenados por distanciaBuscar en Favoritos
@@ -2844,8 +2840,6 @@
Bajar enEsperar en la paradaUn botón que muestra u oculta las trazas elegidas en el mapa.
- Ocultar trazas
- Mostrar trazasActivar el transporte público para los cambios de OsmAnd Live.Transporte público en OsmAnd Live%1$d transbordo(s)
@@ -3260,11 +3254,7 @@
Prefiere los caminos sin pavimentar a los pavimentados para el trazado de rutas.Ediciones de OSMUn botón que muestra u oculta las curvas de nivel en el mapa.
- Mostrar curvas de nivel
- Ocultar curvas de nivelUn botón que muestra u oculta el sombreado de las colinas en el mapa.
- Mostrar el sombreado
- Ocultar el sombreadoImposible iniciar el motor de habla sintetizada.Simular la ubicación usando una traza GPX grabada.Exportar perfil
@@ -3490,8 +3480,6 @@
La ruta será recalculada si la distancia a la ubicación actual es mayor que el valor elegido.%1$s de %2$sPendientes
- Ocultar terreno
- Mostrar terrenoUn botón que muestra u oculta la capa del terreno en el mapa.Borrar descripciónAñadir descripción
@@ -3605,8 +3593,6 @@
\n
ReanudarPuedes acceder a estas acciones pulsando el botón «%1$s».
- Ocultar transporte público
- Mostrar transporte públicoBotón que muestra u oculta el transporte público en el mapa.Crear o editar PDIPuestos de estacionamiento
@@ -3687,8 +3673,6 @@
\nPulsa en «%2$s», para borrar todos los datos relacionados con los radares de velocidad (alertas, notificaciones y PDI) hasta reinstalar OsmAnd completamente.
MantenerDesinstalar
- Ocultar Mapillary
- Mostrar MapillaryUn botón que alterna la capa de Mapillary en el mapa.Rumbo%1$s borrado
diff --git a/OsmAnd/res/values-es/strings.xml b/OsmAnd/res/values-es/strings.xml
index 7028da0a54..844b83ed03 100644
--- a/OsmAnd/res/values-es/strings.xml
+++ b/OsmAnd/res/values-es/strings.xml
@@ -2117,8 +2117,6 @@
Nombre de la acción rápida duplicadoUn botón que muestra u oculta los Favoritos en el mapa.Un botón que muestra u oculta los PDI en el mapa.
- Mostrar Favoritos
- Ocultar FavoritosMostrar %1$sOcultar %1$sAñadir una categoría
@@ -2380,8 +2378,6 @@
Permite acceder a áreas privadas.Nivel de zoom de pantalla: %1$sPara largas distancias: Añada destinos intermedios si no se encuentra ninguna ruta en 10 minutos.
- Mostrar notas de OSM
- Ocultar notas de OSMBotón para mostrar u ocultar las notas de OSM en el mapa.Ordenados por distanciaBuscar en Favoritos
@@ -2841,8 +2837,6 @@
Bajarse enEsperar en la paradaUn botón que muestra u oculta las trazas elegidas en el mapa.
- Ocultar trazas
- Mostrar trazasActivar el transporte público para los cambios de OsmAnd Live.Transporte público en OsmAnd Live%1$d transbordo(s)
@@ -3254,11 +3248,7 @@
Prefiere carreteras sin pavimentar sobre las pavimentadas para el enrutamiento.Ediciones de OSMUn botón que muestra u oculta las curvas de nivel en el mapa.
- Mostrar curvas de nivel
- Ocultar curvas de nivelUn botón que muestra u oculta la sombra de una colina en el mapa.
- Mostrar el sombreado
- Ocultar el sombreadoImposible iniciar el motor de habla sintetizada.Exportar perfilPerfil de OsmAnd: %1$s
@@ -3458,8 +3448,6 @@
Recalcular ruta en caso de desvío%1$s de %2$sCuestas
- Esconder terreno
- Mostrar terrenoUn botón para mostrar o esconder una capa de terreno en el mapa.Borra descripciónAñade descripción
@@ -3506,8 +3494,6 @@
Marcadores de mapaFavoritosPerfiles de navegación
- Ocultar transporte público
- Mostrar transporte públicoCrear o editar POIAgregar o editar FavoritoAgregar perfil
@@ -3684,8 +3670,6 @@
Puedes establecer la altura del navío para evitar los puentes bajos. Ten en cuenta que si el puente es móvil, usaremos su altura en estado abierto.Fija la altura del navío para evitar los puentes bajos. Ten en cuenta que si el puente es móvil, usaremos su altura en estado abierto.Fija el ancho del navío para evitar puentes estrechos
- Ocultar Mapillary
- Mostrar MapillaryUn conmutador para mostrar u ocultar la capa de Mapillary en el mapa.Especifica la longitud del vehículo que se permitirá en las rutas.Límite de longitud
diff --git a/OsmAnd/res/values-et/strings.xml b/OsmAnd/res/values-et/strings.xml
index e4c166344e..a258173a70 100644
--- a/OsmAnd/res/values-et/strings.xml
+++ b/OsmAnd/res/values-et/strings.xml
@@ -162,8 +162,6 @@
Paigalda Mapillary piltide lisamiseks sellesse asukohta kaardil.Siin puuduvad fotod.Taaskäivita otsing
- Näita OSM märkmed
- Peida OSM NotesTäname sind tagasiside eestSõlme või teed ei leidunud.Otsingutulemused puuduvad\?
@@ -601,8 +599,6 @@
VäljuSisene peatusesNupp valitud radade kaardil kuvamiseks või peitmiseks.
- Peida rajad
- Kuva rajadPalun määra esmalt sihtkohtLuba ühistransport OsmAnd Live muudatustele.OsmAnd Live ühistransport
@@ -989,11 +985,7 @@
Teekonna koostamisel eelista katteta teid pinnatud teedele.OSM muudatusedNupp kõrgusjoonte kuvamiseks või peitmiseks kaardil.
- Kuva kõrgusjooned
- Peida kõrgusjoonedNupp künkavarjutuste kuvamiseks või peitmiseks kaardil.
- Kuva künkavarjutus
- Peida künkavarjutusKõnesünteesi mootorit ei saa käivitada.Ekspordi profiilOsmAnd profiil: %1$s
@@ -3123,8 +3115,6 @@
KohtDubleerimise vältimiseks nimetati kiirtegevus ümber %1$s.Kiirtegevuse nime duplikaat
- Kuva lemmikud
- Peida lemmikudKuva %1$sPeida %1$sLisa kategooria
@@ -3435,8 +3425,6 @@
Teekonna ümberarvutus, kui kaugus teekonnast praegusesse asukohta on suurem valitud väärtusest.%1$s %2$s-stNõlvad
- Peida maastik
- Kuva maastikNupp maastikukihi kuvamiseks või peitmiseks kaardil.Kustuta kirjeldusLisa kirjeldus
@@ -3521,8 +3509,6 @@
Valige kaardil olevad Vikipeedia artiklite keeled. Artikli lugemise ajal kasuta ükskõik millist saadaolevat keelt.%1$s / %2$sOtsi huvipunktide tüüpe
- Peida ühistranspordi teave
- Näita ühistranspordi teavetNupp, mis kuvab või peidab ühistranspordiandmed kaardil.Lisa või muuda huvipunktiÖine kaart
@@ -3533,8 +3519,6 @@
Madalate sildade vältimiseks saad kirjeldada laeva kõrguse. Palun arvesta, et liikuva silla puhul me kasutame seda kõrgust ka siis, kui sild on avatud.Madalate sildade vältimiseks kirjelda laeva kõrgus. Palun arvesta, et liikuva silla puhul me kasutame seda kõrgust ka siis, kui sild on avatud.Lühikeste sildade vältimiseks kirjelda laeva laius
- Peida Mapillary andmed
- Näita Mapillary andmeidNupp, mis näitab või peidab kaardil Mapillary kihti.Eemalda ja taaskäivitaRulluisud
diff --git a/OsmAnd/res/values-eu/strings.xml b/OsmAnd/res/values-eu/strings.xml
index 4c5c550856..ef6c04acb4 100644
--- a/OsmAnd/res/values-eu/strings.xml
+++ b/OsmAnd/res/values-eu/strings.xml
@@ -2125,8 +2125,6 @@ Area honi dagokio: %1$s x %2$sPantailaren erdian aparkaleku bat gehitzeko botoia." hona gorde da: "Tokia
- Erakutsi gogokoak
- Ezkutatu gogokoakErakutsi %1$sEzkutatu %1$sGehitu kategoria bat
@@ -2267,8 +2265,6 @@ Area honi dagokio: %1$s x %2$s
Handitu bilaketaren erradioaEz da ezer aurkituAldatu bilaketa edo handitu erradioa.
- Erakutsi OSM oharrak
- Ezkutatu OSM oharrakMapan OSM oharrak erakutsi edo ezkutatzeko botoia.Distantziaren arabera ordenatutaBilatu gogokoetan
@@ -2880,8 +2876,6 @@ Area honi dagokio: %1$s x %2$s
EskaileraBideaZehaztu gabea
- Ezkutatu lorratzak
- Erakutsi lorratzakGehitu helburua aurretikAurreko ibilbideaGraduak
@@ -3261,11 +3255,7 @@ Area honi dagokio: %1$s x %2$s
Hobetsi asfaltatu gabeko bideak ibilbideetan.OSM edizioakSestra-kurbak mapan erakusteko edo ezkutatzeko botoia.
- Erakutsi sestra-kurbak
- Ezkutatu sestra-kurbakErliebe-itzalak mapan erakutsi edo ezkutatzeko botoia.
- Erakutsi erliebe-itzalak
- Ezkutatu erliebe-itzalakEzin da testu-ahots motorra abiarazi.Simulatu zure posizioa grabatutako GPX lorratz bat erabiliz.Esportatu profila
@@ -3483,8 +3473,6 @@ Area honi dagokio: %1$s x %2$s
Gehitu deskripzioaEzabatu deskripzioaMapako terreno geruza erakutsi edo ezkutatzeko botoia.
- Erakutsi terrenoa
- Ezkutatu terrenoaMaldakErliebeaGaitu erliebea edo malda mapa ikusteko. Mapa mota hauei buruz gehiago irakur dezakezu gure gunean
@@ -3546,8 +3534,6 @@ Area honi dagokio: %1$s x %2$s
OsmAnd erosketakMaparen sinbologiari gida.Nabigazio profilak
- Ezkutatu garraio publikoa
- Erakutsi garraio publikoaOsmAnd aztarnariaJarraituPertsonalizatu \"Tiradera\", \"Konfiguratu mapa\" eta \"Laster-menua\" ataletan dauden elementu kopurua.
@@ -3667,8 +3653,6 @@ Area honi dagokio: %1$s x %2$smetroErakutsi edo ezkutatu maparen xehetasun gehigarriakGauerako mapa
- Ezkutatu Mapillary
- Erakutsi MapillaryEginaEzabatu hurrengo norako puntua.Bolumen botoiak zoom egiteko
diff --git a/OsmAnd/res/values-fa/strings.xml b/OsmAnd/res/values-fa/strings.xml
index d7b7728f89..01a39b1c6a 100644
--- a/OsmAnd/res/values-fa/strings.xml
+++ b/OsmAnd/res/values-fa/strings.xml
@@ -2180,8 +2180,6 @@
نام تکراری برای کنش فوریدکمهای برای پنهان/آشکارکردن علاقهمندیها روی نقشه.دکمهای برای پنهان/آشکارکردن POIها روی نقشه.
- نشاندادن علاقهمندیها
- مخفیکردن علاقهمندیهانشاندادن %1$sپنهانکردن %1$sافزودن دسته
@@ -2286,8 +2284,6 @@
مقصد شما در ناحیهای با دسترسی خصوصی قرار دارد. دسترسی به جادههای خصوصی برای این سفر مجاز شود؟شروع مجدد جستوجوچیزی پیدا نشد
- آشکارکردن یادداشتهای OSM
- پنهانکردن یادداشتهای OSMدکمهای برای آشکار/پنهان کردن یادداشتهای OSM بر روی نقشه.مرتبشده بر اساس مسافتجستوجو در علاقهمندیها
@@ -2864,8 +2860,6 @@
ایستگاه پیادهشدنایستگاه سوارشدندکمهای برای آشکار/پنهان کردن ردهای انتخابی بر روی نقشه.
- پنهانکردن ردها
- آشکارکردن ردهاحملونقل عمومی با استفاده از بهروزرسانیهای OsmAnd Live فعال شود.حملونقل عمومی با OsmAnd Live%1$d انتقال
@@ -3280,11 +3274,7 @@
در مسیریابی، جادههای روسازینشده را به روسازیشده ترجیح میدهد.ویرایشهای OSMدکمهای برای آشکار/پنهان کردن منحنیهای میزان روی نقشه.
- نشاندادن منحنیهای میزان
- پنهانکردن منحنیهای میزاندکمهای برای آشکار/پنهان کردن سایهروشنها روی نقشه.
- نشاندادن سایهروشنها
- پنهانکردن سایهروشنهاشروع موتور متن به گفتار ناموفق بود.موقعیت خود را با استفاده از یک رد GPX ضبطشده شبیهسازی کنید.پروفایل OsmAnd: %1$s
@@ -3517,8 +3507,6 @@
سایهروشن%1$s از %2$sشیبها
- پنهانکردن ناهمواریها
- نمایش ناهمواریهادکمهای برای آشکار یا پنهان کردن لایهٔ ناهمواریها روی نقشه.دایرهحذف توضیحات
@@ -3631,8 +3619,6 @@
ایجاد یا ویرایش POIافزودن یا ویرایش علاقهمندیبرای دسترسی به این کنشها میتوانید روی دکمهٔ «%1$s» بزنید.
- مخفیکردن حملونقل عمومی
- نمایش حملونقل عمومیدکمهای برای آشکار یا پنهان کردن حملونقل عمومی روی نقشه.با لمس دکمهٔ عملیاتی بین پروفایلهای انتخابشده جابهجا شوید.افزودن پروفایل
@@ -3702,8 +3688,6 @@
میتوانید ارتفاع کشتی را برای پرهیز از پلهای کوتاه وارد کنید. به یاد داشته باشید که اگر پل متحرک است، در حالت باز نیز ارتفاع کشتی را در نظر میگیریم.ارتفاع کشتی را برای پرهیز از پلهای کوتاه وارد کنید. به یاد داشته باشید که اگر پل متحرک است، در حالت باز نیز ارتفاع کشتی را در نظر میگیریم.عرض کشتی را برای پرهیز از پل های باریک وارد کنید
- آشکارکردن مپیلاری
- پنهانکردن مپیلاریدکمهای برای آشکار/پنهان کردن لایهٔ مپیلاری روی نقشه.حذف نصب دوربینهای سرعتحذف نصب و شروع دوباره
diff --git a/OsmAnd/res/values-fi/strings.xml b/OsmAnd/res/values-fi/strings.xml
index 53a392d864..e2ecb5d234 100644
--- a/OsmAnd/res/values-fi/strings.xml
+++ b/OsmAnd/res/values-fi/strings.xml
@@ -1920,8 +1920,6 @@ Jos pidät OsmAndista ja OSMsta ja haluat tukea niitä, on tämä täydellinen t
KP listaViestiKonfiguroi kartta
- Näytä suosikit
- Piilota suosikitNäytä %1$sPiilota %1$sLisää luokka
@@ -2000,8 +1998,6 @@ Jos pidät OsmAndista ja OSMsta ja haluat tukea niitä, on tämä täydellinen t
MapillaryKäynnistä haku uudelleenMitään ei löytynyt
- Näytä OSM-huomautukset
- Piilota OSM-huomautuksetLajiteltu etäisyyden perusteellaEtsi suosikeistaPiilota zoomaustasosta
@@ -2300,10 +2296,6 @@ Jos pidät OsmAndista ja OSMsta ja haluat tukea niitä, on tämä täydellinen t
OletuksenaJälkien tallennuskansioOSM-muokkaukset
- Näytä korkeuskäyrät
- Piilota korkeuskäyrät
- Näytä rinnevarjostus
- Piilota rinnevarjostusVie profiiliOsmAnd profiili: %1$s\'%1$s\' on jo olemassa. Korvataanko\?
@@ -2323,8 +2315,6 @@ Jos pidät OsmAndista ja OSMsta ja haluat tukea niitä, on tämä täydellinen t
JälkiJäljetValitse seurattava jälki tiedosto
- Piilota GPX jäljet
- Näytä GPX jäljetHiihtoHiihtoHiihto
@@ -2596,8 +2586,6 @@ Jos pidät OsmAndista ja OSMsta ja haluat tukea niitä, on tämä täydellinen t
PalveluHätätapausLiikenne
- Näytä julkinen liikenne
- Piilota julkinen liikenneSymbolitKorvaa toinen kohde tällä.Kansiot
diff --git a/OsmAnd/res/values-fr/strings.xml b/OsmAnd/res/values-fr/strings.xml
index 009e95320a..4dda03c224 100644
--- a/OsmAnd/res/values-fr/strings.xml
+++ b/OsmAnd/res/values-fr/strings.xml
@@ -2099,8 +2099,6 @@
EmplacementCe nom existe déjà, l\'action rapide a été renommée en %1$s.Nom d\'action rapide en double
- Afficher les favoris
- Masquer les favorisAfficher %1$sMasquer %1$sAjouter une catégorie
@@ -2303,8 +2301,6 @@
Téléchargez le greffon \'Courbes de niveaux\' pour mieux visualiser le relief.Masquer à partir du niveau de zoomTéléchargez la sur-couche \'Ombrage du relief\' pour mieux visualiser le relief.
- Afficher les notes OSM
- Masquer les notes OSMBouton pour afficher ou masquer les notes OSM sur la carte.Trier par distanceRechercher dans les favoris
@@ -2831,8 +2827,6 @@
Instructions pas à pasTypes de routeSortir à
- Masquer les traces
- Afficher les tracesActiver les modifications de transports publics en temps réel avec OsmAnd Live.Transports publics OsmAnd LivePanneau d\'affichage à l\'arrêt
@@ -3249,11 +3243,7 @@
Privilégier les routes non pavées pour l\'itinéraire.Modifications OSMBouton affichant ou masquant les courbes de niveaux sur la carte.
- Afficher les courbes de niveaux
- Masquer les courbes de niveauxBouton affichant ou masquant l\'ombrage du relief sur la carte.
- Afficher l\'ombrage du relief
- Masquer l\'ombrage du reliefImpossible de démarrer le moteur de synthèse vocale.Simulez votre position à l\'aide d\'une trace GPX enregistrée.Exporter le profil
@@ -3480,8 +3470,6 @@
Active l\'affichage de l\'ombrage du relief et l\'inclinaison. Vous pouvez en savoir plus sur ces types de cartes sur notre site.Ombrage du reliefPentes
- Masquer le terrain
- Afficher le terrainUn bouton pour afficher ou masquer la couche terrain sur la carte.Supprimer la descriptionAjouter une description
@@ -3593,8 +3581,6 @@
\n
\n
Vous pouvez accéder à ces actions en appuyant sur le bouton \"%1$s\".
- Masquer les transports publics
- Afficher les transports publicsBouton pour afficher ou masquer les transports publics sur la carte.Créer ou modifier un PIEmplacements de stationnement
@@ -3663,8 +3649,6 @@
Vous pouvez définir la hauteur du navire pour éviter les ponts bas. Souvenez-vous que si le pont est mobile, nous utiliserons sa hauteur en position ouverte.Définir la hauteur du navire afin d\'éviter les ponts bas. Souvenez-vous que si le pont est mobile, nous utiliserons sa hauteur en position ouverte.Définir la largeur du navire pour éviter les ponts étroits
- Masquer Mapillary
- Afficher MapillaryBouton pour afficher ou masquer la couche Mapillary sur la carte.Dans certains pays ou régions, l\'utilisation d\'avertisseurs de radars est interdit par la loi.
\n
diff --git a/OsmAnd/res/values-gl/strings.xml b/OsmAnd/res/values-gl/strings.xml
index 5f9a1579e7..f12b12da6c 100644
--- a/OsmAnd/res/values-gl/strings.xml
+++ b/OsmAnd/res/values-gl/strings.xml
@@ -2087,8 +2087,6 @@ Lon %2$sDuplicidade do nome da acción rápidaUn botón que amosa ou agocha os Favoritos no mapa.Un botón que amosa ou agocha os PDI no mapa.
- Amosar Favoritos
- Agochar os FavoritosAmosar %1$sAgochar %1$sEngadir unha categoría
@@ -2226,8 +2224,6 @@ Lon %2$s
Reiniciar procuraAumentar o raio de procuraNon se atopou ren
- Amosar notas do OSM
- Agochar notas do OSMOrdenado por distanciaProcurar nos FavoritosEstrada
@@ -2851,8 +2847,6 @@ Lon %2$s
Amosar máisPistas amosadasUn botón que amosa ou agocha as pistas escollidas no mapa.
- Agochar pistas
- Amosar pistas%1$d transferenciasEngadir orixe e destinoEngadir punto de comezo
@@ -3267,11 +3261,7 @@ Lon %2$s
Preferir as estradas sen pavimentar aos pavimentados para o trazado de rutas.Edicións do OSMUn botón que amosa ou agocha as curvas de nivel no mapa.
- Amosar curvas de nivel
- Agochar curvas de nivelUn botón que amosa ou agocha a sombra dos outeiros no mapa.
- Amosar sombreados
- Agochar sombreadosNon é posíbel comezar o motor de síntese de voz.Simular a túa posición empregando unha pista GPX gravada.Exportar o perfil
@@ -3546,8 +3536,6 @@ Lon %2$s
A ruta será recalculada se a distancia á localización actual é maior que o valor escollido.%1$s de %2$sPendentes
- Agochar terreo
- Amosar terreoUn botón que amosa ou agocha a capa do terreo no mapa.Eliminar descriciónEngadir descrición
@@ -3612,8 +3600,6 @@ Lon %2$s
\n
RetomarPodes acceder a estas accións premendo no botón “%1$s”.
- Agochar transporte público
- Amosar transporte públicoBotón que amosa ou agocha o transporte público no mapa.Crear ou editar PDIPosicións de aparcamento
@@ -3683,9 +3669,7 @@ Lon %2$s
Podes definir a altura da embarcación para evitar pontes baixas. Lémbrate se a ponte é móbil, empregaremos a súa altura no estado aberto.Define o alto da embarcación para evitar pontes baixas. Lémbrate se a ponte é móbil, empregaremos a súa altura no estado aberto.Estabelecer o largo da embarcación para evitar pontes estreitas
- Agochar o MapillaryUn botón para amosar ou agochar a capa do Mapillary no mapa.
- Amosar o MapillaryDesinstalar radares de velocidadeLegalPDI de radares de velocidade
diff --git a/OsmAnd/res/values-hu/strings.xml b/OsmAnd/res/values-hu/strings.xml
index 6c14826ad9..fe6e171440 100644
--- a/OsmAnd/res/values-hu/strings.xml
+++ b/OsmAnd/res/values-hu/strings.xml
@@ -2112,8 +2112,6 @@
A gyorsművelet neve kétszer szerepelGomb, amely a térképen megjeleníti vagy elrejti a Kedvenc helyeket.Gomb, amely a térképen megjeleníti vagy elrejti az érdekes pontokat (POI-kat).
- Kedvencek megjelenítése
- Kedvencek elrejtése%1$s megjelenítése%1$s elrejtéseKategória hozzáadása
@@ -2237,8 +2235,6 @@
Utca kijelöléseitt: %1$sCím megadása
- OSM-jegyzetek megjelenítése
- OSM-jegyzetek elrejtéseGomb, amely a térképen megjeleníti vagy elrejti az OSM-jegyzeteket.Távolság szerinti sorrendbenKeresés a Kedvencekben
@@ -2795,8 +2791,6 @@
ÚttípusokSzálljon le itt:Gomb, amely a térképen megjeleníti vagy elrejti a nyomvonalakat.
- Nyomvonalak elrejtése
- Nyomvonalak megjelenítéseElőször adjon meg egy célpontotTömegközlekedés engedélyezése OsmAnd Live frissítésekkel.OsmAnd Live tömegközlekedés
@@ -3091,10 +3085,6 @@
%1$s kBÖsszes térkép frissítéseBiztos, hogy az összes (%1$d) térképet frissíti\?
- Szintvonalak megjelenítése
- Szintvonalak elrejtése
- Domborzatárnyékolás megjelenítése
- Domborzatárnyékolás elrejtéseNyomvonal tárolási mappájaA nyomvonalak tárolhatók a \'rec\' mappában, illetve havi vagy napi bontás szerinti mappákban.Nyomvonalak felvétele a \'rec\' mappába
@@ -3408,8 +3398,6 @@
Az útvonal újraszámításra kerül, amennyiben az útvonal és a jelenlegi helyzet közötti távolság nagyobb, mint a kiválasztott érték.%1$s a %2$s-bólLejtők
- Domborzat elrejtése
- Domborzat megjelenítéseVáltógomb, amely a térképen megjeleníti vagy elrejti a domborzati réteget.Leírás törléseLeírás hozzáadása
@@ -3504,8 +3492,6 @@
Ezekhez a műveletekhez a \"%1$s\" gombra koppintva férhet hozzá.%1$s / %2$sNem támogatott művelet: %1$s
- Tömegközlekedés elrejtése
- Tömegközlekedés megjelenítésePOI készítése vagy módosításaParkolási pozícióKedvenc hozzáadása vagy módosítása
@@ -3594,8 +3580,6 @@
Adja meg a hajómagasságot az alacsony hidak elkerüléséhez. Ne feledje, amennyiben a híd mozdítható, a nyitott állapotú magasságát vesszük figyelembe.Megadhatja a hajómagasságot az alacsony hidak elkerüléséhez. Ne feledje, amennyiben a híd mozdítható, a nyitott állapotú magasságát vesszük figyelembe.Adja meg a hajószélességet a keskeny hidak elkerüléséhez
- Mapillary elrejtése
- Mapillary megjelenítéseVáltógomb, amely a térképen megjeleníti vagy elrejti a Mapillary réteget.Traffipaxok eltávolításaJogi
diff --git a/OsmAnd/res/values-hy/strings.xml b/OsmAnd/res/values-hy/strings.xml
index 6e8df0fd50..d6b1964c02 100644
--- a/OsmAnd/res/values-hy/strings.xml
+++ b/OsmAnd/res/values-hy/strings.xml
@@ -247,8 +247,6 @@
Ավելացնել որոնման շառավղըՈչինչ չի գտնվելՓոխել հարցումը կամ ավելացնել որոնման շառավիղը։
- Ցույց տալ OSM նշումները
- Թաքցնել OSM նշումներըՔարտեզի վրա ցույց տալ կամ թաքցնել OSM նշումները կոճակը:Դասավորված է ըստ հեռավորությանՈրոնում Սիրվածում
@@ -2483,8 +2481,6 @@
Կրկնօրինակ անուն գտնվեցՍեղմելով գործողության կոճակը ցույց կտա կամ կթաքցնի «Սիրված» կետերը քարտեզի վրա:Սեղմելով գործողության կոճակը ցույց կտա կամ կթաքցնի POI կետերը քարտեզի վրա:
- Ցուցադրել «Սիրված»-ը
- Թաքցնել «Սիրված»-ըՑուցադրել %1$sԹաքցնել %1$sԱվելացնել կատեգորիա
@@ -2867,8 +2863,6 @@
Պահել ակտիվՋնջելՈրոշ երկրներում արագության վերահսկողության տեսախցիկների ծանուցումը արգելված է օրենքով ։
- Թաքցնել
- Ցույց տալ MapillaryԱնջատիչ - Mapillary շերտը ցույց տալու կամ թաքցնել ու քարտեզի վրա:Կողմնորոշում%1$s ջնջվեց
@@ -2955,8 +2949,6 @@
OsmAnd-ի գնումներըՏեղեկանք քարտեզի խորհրդանիշներին:Նավիգացիոն պրոֆիլներ
- Թաքցնել հասարակական տրանսպորտը
- Ցույց տալ հասարակական տրանսպորտըԿոճակ, որը ցույց է տալիս կամ թաքցնում է հասարակական տրանսպորտը քարտեզի վրա:Ստեղծել / Խմբագրել POIԱվելացնել / Խմբագրել Սիրվածն-րը
diff --git a/OsmAnd/res/values-id/strings.xml b/OsmAnd/res/values-id/strings.xml
index 8b558c3b81..d69eb004e6 100644
--- a/OsmAnd/res/values-id/strings.xml
+++ b/OsmAnd/res/values-id/strings.xml
@@ -233,8 +233,6 @@
Tingkatkan radius pencarianTidak ada yang ditemukanUbah kata pencarian atau tingkatkan radius pencarian.
- Tampilkan Catatan OSM
- Sembunyikan Catatan OSMMengetuk tombol tindakan akan menampilkan atau menyembunyikan Catatan OSM di peta.Diurutkan menurut jarakCari Favorit
diff --git a/OsmAnd/res/values-is/strings.xml b/OsmAnd/res/values-is/strings.xml
index fa58745492..09b929262e 100644
--- a/OsmAnd/res/values-is/strings.xml
+++ b/OsmAnd/res/values-is/strings.xml
@@ -1801,8 +1801,6 @@
Forstilling á nafni" vistað í "Staður
- Birta eftirlæti
- Fela eftirlætiSýna %1$sFela %1$sBæta við flokki
@@ -2047,8 +2045,6 @@
Byrja leit afturStækka radíus leitarEkkert fannst
- Birta OSM-minnispunkta
- Fela OSM-minnispunktaRaðað eftir vegalengdLeita í eftirlætumViðbót
@@ -2848,8 +2844,6 @@
Fara útaf viðFara um borð við stöðvuninaHnappur til að birta eða fela valda ferla á kortinu.
- Fela ferla
- Birta ferlaVirkja breytingar á almenningssamgöngum í OsmAnd Live.Almenningssamgöngur OsmAnd LiveLestu meira á blogginu okkar um hvernig OsmAnd reiknar leiðir.
@@ -3264,11 +3258,7 @@
Velja frekar vegi með óbundnu slitlagi við leiðagerð.OSM-breytingarHnappur til að birta eða fela hæðarlínur á kortinu.
- Birta hæðarlínur
- Fela hæðarlínurHnappur til að birta eða fela hæðaskyggingu á kortinu.
- Birta hæðaskyggingu
- Fela hæðaskygginguGat ekki ræst talgervil.Herma eftir staðsetningu þinni með áður skráðum GPX-ferli.Flytja út snið
@@ -3491,8 +3481,6 @@
Virkja til að sjá hæðaskyggingar eða brekkur á korti. Þú getur lesið meira um þessa eiginleika á vefnum okkar.HæðaskyggingBrekkur
- Fela yfirborð
- Sýna yfirborðHnappur til að birta eða fela yfirborðslag á kortinu.Endurreikna leið ef farið er út af fyrirfram gefinni leiðVeldu þá vegalengd sem þarf til að leiðin verði endurreiknuð.
@@ -3590,7 +3578,6 @@
Gat ekki fundið nein slík snið.Settu inn eða afritaðu og límdu slóð á nettengdan kortagjafa.Kortamerki
- Fela almenningssamgöngurNota tímamörk kerfis fyrir skjáBreyta nettengdum gagnagjafaOsmAnd rekjari
@@ -3612,7 +3599,6 @@
Halda áframOsmAnd + MapillaryBæta við eða breyta eftirlæti
- Birta almenningssamgöngurSjálfgefin tímamörk fyrir skjáHnappur til að birta eða fela almenningssamgöngur á kortinu.Nálægðarskynjari
@@ -3664,8 +3650,6 @@
Merktar hraðamyndavélarHalda virkuAðvaranir vegna hraðamyndavéla eru bannaðar með lögum í sumum löndum.
- Fela Mapillary
- Sýna MapillaryVíxlhnappur til að birta eða fela Mapillary-lagið á kortinu.Stefna%1$s eytt
diff --git a/OsmAnd/res/values-it/strings.xml b/OsmAnd/res/values-it/strings.xml
index e30bfe222d..0b578f99f3 100644
--- a/OsmAnd/res/values-it/strings.xml
+++ b/OsmAnd/res/values-it/strings.xml
@@ -2120,8 +2120,6 @@
Nome dell\'azione veloce duplicatoQuesto pulsante d’azione mostra o nasconde i preferiti sulla mappa.Questo pulsante azione mostra o nasconde i PDI sulla mappa.
- Mostra preferiti
- Nascondi preferitiMostra %1$sNascondi %1$sAggiungi una categoria
@@ -2248,8 +2246,6 @@
Aumenta il raggio di ricercaNessun risultatoCambia la ricerca o aumenta il raggio.
- Mostra le note OSM
- Nascondi le note OSMToccando il pulsante azione verranno mostrate o nascoste le note OSM sulla mappa.Ordinato per distanzaCerca nei Preferiti
@@ -2826,8 +2822,6 @@
Tipi di stradeMostra di piùTracciati visualizzati
- Nascondi Tracciati GPX
- Mostra Tracciati GPXModalità %sEvita tipi di trasporto…A piedi
@@ -3248,11 +3242,7 @@
Preferisci le strade pavimentate.Modifiche OSMUn controllo per mostrare o nascondere nella mappa le linee isoipse.
- Mostra le linee isoipse
- Nascondi le linee isoipseUn controllo per mostrare o nascondere nella mappa le ombreggiature dei rilievi.
- Mostra l\'ombreggiatura dei rilievi
- Nascondi l\'ombreggiatura dei rilieviImpossibile avviare il motore dal-testo-alla-voce.Simula la mia posizione utilizzando una traccia GPX registrata.Utilizzata per stimare l\'orario d\'arrivo per le strade di tipo sconosciute e come limite di velocità per tutte le strade (può influenzare il calcolo del percorso)
@@ -3470,8 +3460,6 @@
Aggiungi descrizioneElimina descrizioneUn bottone per mostrare o nascondere la vista rilievo sulla mappa.
- Mostra rilievo
- Nascondi rilievoPendenzeOmbreggiatura rilieviPuoi avere maggiori informazioni sulle Pendenze in %1$s.
@@ -3507,8 +3495,6 @@
Tutte le linguePlugin sviluppatoreOggetti
- Nascondi i trasporti pubblici
- Mostra i trasporti pubbliciIl pulsante mostra o nasconde nella mappa i trasporti pubblici.Crea/Modifica PDIPosizione di parcheggio
@@ -3664,8 +3650,6 @@
Puoi mpostare l\'altezza dell\'imbarcazione per evitare ponti bassi. Ricorda che, se il ponte è mobile, useremo la sua altezza da aperto.Imposta l\'altezza dell\'imbarcazione per evitare ponti bassi. Ricorda che, se il ponte è mobile, useremo la sua altezza da aperto.Imposta la larghezza della\"imbarcazione per evitare i ponti stretti
- Nascondi Mapillary
- Mostra MapillaryUn pulsante per visualizzare nella mappa o nascondere il livello Mapillary .Fornisci la lunghezza del tuo veicolo, alcune restrizioni di percorso potrebbero essere applicate per veicoli.Disinstalla autovelox
diff --git a/OsmAnd/res/values-iw/strings.xml b/OsmAnd/res/values-iw/strings.xml
index 4899a2373e..c299b049d4 100644
--- a/OsmAnd/res/values-iw/strings.xml
+++ b/OsmAnd/res/values-iw/strings.xml
@@ -1125,8 +1125,6 @@
הגדלת רדיוס החיפושלא נמצא כלוםעריכת החיפוש או הגדלת הטווח.
- הצגת הערות OSM
- הסתרת הערות OSMכפתור להצגה או להסתרה של הערות OSM על המפה.מסודר לפי מרחקחיפוש במועדפים
@@ -1648,8 +1646,6 @@
מיקוםבורר להצגה או הסתרה של הנקודות המועדפות במפה.בורר להצגה או הסתרה של נקודות עניין במפה.
- הצגת מועדפים
- הסתרת מועדפיםהצגת %1$sהסתרת %1$sהוספת קטגוריה
@@ -2841,8 +2837,6 @@
סוגי כבישיםלצאת ב־כפתור להצגה או הסתרה של המסלולים הנבחרים במפה.
- הסתרת מסלולים
- הצגת מסלוליםהפעלת תחבורה ציבורית לשינויים ב־OsmAnd החי.OsmAnd חי תחבורה ציבורית%1$d העברות
@@ -3253,11 +3247,7 @@
להעדיף דרכים לא סלולות על פני סלולות בבחירת מסלול.עריכות OSMכפתור להצגה או להסתרה של קווי מתאר במפה.
- הצגת קווי מתאר
- הסתרת קווי מתארכפתור להצגה או הסתרה של הצללות במפה.
- הצגת הצללה
- הסתרת הצללהלא ניתן להפעיל מנוע המרת טקסט לדיבור.הדמיית המיקום שלך באמצעות מסלול GPX שהוקלט מראש.ייצוא פרופיל
@@ -3464,8 +3454,6 @@
הצללה%1$s מתוך %2$sמדרונות
- הסתרת תוואי שטח
- הצגת תוואי שטחכפתור להצגה או הסתרה של שכבת תוואי שטח על גבי המפה.מחיקת תיאורהוספת תיאור
@@ -3584,8 +3572,6 @@
תקן מר״בב־OsmAnd נעשה שימוש בתקן מר״ב, שדומה אך לא זהה לתצורת המר״ב של נאט״ו.ניתן לגשת לפעולות האלו על ידי לחיצה על הכפתור „%1$s”.
- הסתרת תחבורה ציבורית
- הצגת תחבורה ציבוריתכפתור להצגה או הסתרה של תחבורה ציבורית על המפה.יצירה או עריכה של נקודת ענייןמקומות חנייה
@@ -3678,8 +3664,6 @@
ניתן להגדיר את גובה כלי השיט כדי להימנע מגשרים נמוכים. נא לשים לב שאם הגשר נע, אנו נשתמש בגובהו במצב הפתוח.יש להגדיר את גובה כלי השיט כדי להימנע מגשרים נמוכים. נא לשים לב שאם הגשר נע, אנו נשתמש בגובהו במצב הפתוח.הגדרת רוחב כלי השיט כדי להימנע מגשרים צרים
- הסתרת Mapillary
- הצגת Mapillaryמפסק להצגה או הסתרה של שכבת Mapillary על גבי המפה.הסרת מצלמות מהירותמשפטי
diff --git a/OsmAnd/res/values-ja/strings.xml b/OsmAnd/res/values-ja/strings.xml
index bbde03f05b..ace0b01cd1 100644
--- a/OsmAnd/res/values-ja/strings.xml
+++ b/OsmAnd/res/values-ja/strings.xml
@@ -2141,8 +2141,6 @@ POIの更新は利用できません
クイックアクション名の重複マップ画面でのお気に入り地点の表示/非表示の切替が出来ます。マップ画面でのPOIの表示/非表示の切替が出来ます。
- お気に入りを表示
- お気に入りを非表示%1$sを表示%1$sを非表示カテゴリーを追加
@@ -2347,8 +2345,6 @@ POIの更新は利用できません
• オプションで速度と標高表示ができます
• 等高線と山陰の表示(要追加プラグイン)
"
- OSMメモを表示
- OSMメモを非表示マップ画面でのOSMメモの表示/非表示を切り替えるボタンです。距離順で並べ替えお気に入りで検索
@@ -2790,8 +2786,6 @@ POIの更新は利用できません
さらに表示マップ上の経路マップ上にある選択したGPX経路の表示/非表示を切り替えるボタンです。
- 経路の非表示
- 経路の表示最初に目的地を設定して下さい前回のルート立方メートル
@@ -3263,11 +3257,7 @@ POIの更新は利用できません
オック語OSMの編集マップ上の等高線の表示/非表示を切り替えられるボタンです。
- 等高線を表示
- 等高線を非表示マップ上の陰影起伏図の表示/非表示を切り替えられるボタンです。
- 陰影起伏図を表示
- 陰影起伏図を非表示テキスト読み上げエンジンを起動できません。プロファイルのエクスポートOsmAndプロファイル:%1$s
@@ -3491,8 +3481,6 @@ POIの更新は利用できません
ズームレベル陰影起伏図勾配
- 地形を非表示
- 地形を表示マップ上の地形レイヤーの表示/非表示を切り替えるボタンです。説明を削除説明を追加
@@ -3501,8 +3489,6 @@ POIの更新は利用できません
円形四角形最小
- 公共交通機関を非表示
- 公共交通機関を表示マップ内公共交通機関の表示/非表示を切り替えるボタンです。POIの作成/編集駐車位置
@@ -3729,8 +3715,6 @@ POIの更新は利用できません
低い橋を避けるために船の高さを調整できます。橋が可動式の場合は、開いた状態の高さが参照されます。低い橋を避けるために船の高さを設定します。注:橋が可動式の場合は、開いた状態の高さが参照されます。狭い橋を避けるために船の幅を設定します
- Mapillaryを非表示
- Mapillaryを表示マップ上のMapillaryレイヤーの表示/非表示を切り替えるトグルボタンです。ルート検索時に指定した車両の長さを考慮します。長さ制限
diff --git a/OsmAnd/res/values-ka/strings.xml b/OsmAnd/res/values-ka/strings.xml
index 843bb16d97..296d28d3e6 100644
--- a/OsmAnd/res/values-ka/strings.xml
+++ b/OsmAnd/res/values-ka/strings.xml
@@ -1223,8 +1223,6 @@
ახალი პროფილის ჩაწერა%1$s %2$s-დანდაქანებები
- რელიეფის დამალვა
- რელიეფის ჩვენებარელიეფის შრის საჩვენებელი ღილაკი.აღწერის წაშლააღწერის დამატება
@@ -1796,8 +1794,6 @@
შემობრუნებათეთრი%1$d გადმოწერა
- ბილიკების ჩვენება
- ბილიკების დამალვაგამოსვლა%1$s-ითნაჩვენები ბილიკები
@@ -1957,8 +1953,6 @@
რუკის გამართვა%1$s-ის დამალვა%1$s-ის ჩვენება
- რჩეულების დამალვა
- რჩეულების ჩვენებამოქმედების წაშლამოქმედების დამატებარჩეულის დამატება
@@ -2216,8 +2210,6 @@
მიმართულების ისრებიმოტოციკლი Enduroმოტორიანი სკუტერი
- Mapillary-ის დამალვა
- Mapillary-ის ჩვენებაწავშალოთ ყველა\?ეკრანის კონტროლინავიგაციის ინსტრუქციები
@@ -2282,8 +2274,6 @@
საწყისი წერტილიპროფილის იმპორტიპროფილის ექსპორტი
- ბორცვების დამალვა
- ბორცვების ჩვენება%1$s კბ%1$s მბ%1$s გბ
@@ -2533,8 +2523,6 @@
გზის დაგეგმვაWikipedia-ის რუკების გადმოწერააპის პროფილის შეცვლა
- საზოგადოებრივი ტრანსპორტის დამალვა
- საზოგადოებრივი ტრანსპორტის ჩვენებაOsmAnd + Mapillary%1$s / %2$sმოქმედების შეცდომა %1$s
@@ -2554,8 +2542,6 @@
შეტყობნებებირუკის დიალოგის ფანჯარაOsmAnd-ის პროფილი: %1$s
- კონტურული ხაზების დამალვა
- კონტურული ხაზების ჩვენებაყველა რუკის განახლებაგამოყენებულია %1$s კბგამოყენებულია %1$s მბ
diff --git a/OsmAnd/res/values-kn/strings.xml b/OsmAnd/res/values-kn/strings.xml
index fcc64923ac..96d53b96cc 100644
--- a/OsmAnd/res/values-kn/strings.xml
+++ b/OsmAnd/res/values-kn/strings.xml
@@ -240,8 +240,6 @@
ಚಿತ್ರಗಳನ್ನು ಸೇರಿಸಿಮ್ಯಾಪಿಲರಿಏನೂ ಸಿಗಲಿಲ್ಲ :(
- ಒಎಸ್ಎಂ ಟಿಪ್ಪಣಿಗಳನ್ನು ತೋರಿಸು
- ಒಎಸ್ಎಂ ಟಿಪ್ಪಣಿಗಳನ್ನು ಅಡಗಿಸುಬಣ್ಣವನ್ನು ಬದಲಿಸುಹೆಸರನ್ನು ಸಂಪಾದಿಸುವಿಳಾಸವನ್ನು ಟೈಪಿಸು
@@ -320,11 +318,7 @@
ಸುಸಜ್ಜಿತ ರಸ್ತೆಗಳಿಗೆ ಆದ್ಯತೆ ನೀಡಿ.OSM ಪರಿಶಲನೆಗಳುನಕ್ಷೆಯಲ್ಲಿ ಬಾಹ್ಯರೇಖೆಗಳನ್ನು ತೋರಿಸಲು ಅಥವಾ ಮರೆಮಾಡಲು ಟಾಗಲ್.
- ಬಾಹ್ಯರೇಖೆ ರೇಖೆಗಳನ್ನು ತೋರಿಸಿ
- ಬಾಹ್ಯರೇಖೆ ರೇಖೆಗಳನ್ನು ಮರೆಮಾಡಿನಕ್ಷೆಯಲ್ಲಿ \'ಹಿಲ್ಶೇಡ್\' ಅನ್ನು ತೋರಿಸಲು ಅಥವಾ ಮರೆಮಾಡಲು ಟಾಗಲ್ ಮಾಡಿ.
- ಹಿಲ್ಶೇಡ್ ತೋರಿಸು
- ಹಿಲ್ಶೇಡ್ ಅನ್ನು ಮರೆಮಾಡಿtext-to-speech ಎಂಜಿನ್ ಅನ್ನು ಪ್ರಾರಂಭಿಸಲು ಸಾಧ್ಯವಿಲ್ಲಪ್ರೊಫೈಲನ್ನು ಬೇರೆಡೆಗೆ ರಫ್ತುಮಾಡಿOsmAnd ಪ್ರೊಫೈಲ್:%1$s
diff --git a/OsmAnd/res/values-lt/strings.xml b/OsmAnd/res/values-lt/strings.xml
index c096fe2a30..1a1cc5ffc0 100644
--- a/OsmAnd/res/values-lt/strings.xml
+++ b/OsmAnd/res/values-lt/strings.xml
@@ -2068,8 +2068,6 @@ Tai yra puikus būdas paremti OsmAnd ir OSM, jei jie jums patinka.
Padidinti paieškos spindulįNepavyko nieko rastiPakeiskite paieškos užklausą arba padidinkite paieškos spindulį.
- Rodyti OSM Pastabas
- Slėpti OSM PastabasIeškoti parankiniuoseĮskiepisSpalvų schema
@@ -2139,8 +2137,6 @@ Tai yra puikus būdas paremti OsmAnd ir OSM, jei jie jums patinka.
Rodyti parankinių dialogąRodyti tarpinį dialogo langą" įrašytas į "
- Rodyti Parankinius
- Slėpti ParankiniusRodyti %1$sSlėpti %1$sNavigacija
@@ -2618,8 +2614,6 @@ Tai yra puikus būdas paremti OsmAnd ir OSM, jei jie jums patinka.
Kelių tipaiRodyti daugiauPaspaudus šį mygtuką žemėlapyje parodomi arba paslepiami GPX pėdsakai
- Slėpti GPX pėdsakus
- Rodyti GPX pėdsakusPrašome iš pradžių pridėti tiksląAnkstesnis maršrutasPridėti namus
@@ -2726,8 +2720,6 @@ Tai yra puikus būdas paremti OsmAnd ir OSM, jei jie jums patinka.
AtkurtiIeškoti gatvėsMatuoti atstumą
- Paslėpti viešąjį transportą
- Rodyti viešąjį transportąPridėti profilįNepalaikomas tipasĮjungimo/išjungimo mygtukas
@@ -2740,7 +2732,6 @@ Tai yra puikus būdas paremti OsmAnd ir OSM, jei jie jums patinka.
IšinstaliuotiNaktinis žemėlapismetrai
- Rodyti MapillaryIlgio limitasGuolis%1$s ištrinta
diff --git a/OsmAnd/res/values-lv/strings.xml b/OsmAnd/res/values-lv/strings.xml
index 2d59b4fb2a..27ad892e50 100644
--- a/OsmAnd/res/values-lv/strings.xml
+++ b/OsmAnd/res/values-lv/strings.xml
@@ -2072,8 +2072,6 @@ Apraksta laukumu: %1$s x %2$s
VietaSpiežot darbības pogu, tiks rādīti vai slēpti favorīti.Spiežot darbības pogu, tiks rādīti vai slēpti POI.
- Rādīt favorītus
- Nerādīt izlasiRādīt %1$sPaslēpt %1$sPievienot kategoriju
@@ -2168,8 +2166,6 @@ Apraksta laukumu: %1$s x %2$s
Ieteicamais reljefs: līdzens vai kalnains.SlīpumsBerberu
- Rādīt OSM piezīmes
- Nerādīt OSM piezīmesNospiežot darbības pogu, tiek rādītas vai slēptas OEM piezīmes uz kartes.Sakārtots pēc distancesMeklēt Izlasē
@@ -2668,8 +2664,6 @@ No Afganistānas līdz Zimbabvei, no Austrālijas līdz ASV, Argentīna, Brazīl
Iziet pieSoliņš pieturāNospiežot šo pogu, tiek parādīti vai slēpti izvēlētie GPX treki uz kartes
- Paslēpt GPX trekus
- Parādīt GPX trekusVispirms pievienojiet galapunktuIespējot sabiedrisko transportu OsmAnd Live.OsmAnd Live sabiedriskais transports
diff --git a/OsmAnd/res/values-ml/strings.xml b/OsmAnd/res/values-ml/strings.xml
index a3d79f3089..e4d1f3be78 100644
--- a/OsmAnd/res/values-ml/strings.xml
+++ b/OsmAnd/res/values-ml/strings.xml
@@ -1695,8 +1695,6 @@
"വീണ്ടും തെരയുക ""തെരച്ചില് വൃത്തം വലുതാക്കുക ""ഒന്നും കണ്ടെത്താനായില്ല "
- ഓഎസ് എം കുറിപ്പുകള് (നോട്ട്സ്) കാണിക്കുക
- "ഓഎസ് എം കുറിപ്പുകള് (നോട്ട്സ്) കാണിക്കാതിരിക്കുക "ഓഎസ് എം കുറിപ്പുകള് (നോട്ട്സ്) കാണാന്/കാണാതിരിക്കാന് ഈ ആക്ഷന് ബട്ടണ് അമത്തുക"ദൂരക്രമത്തിലടുക്കുക ""താല്പര്യമുള്ളവയില് തെരയുക "
@@ -2342,8 +2340,6 @@
സ്ഥലം"അതിവേഗ പ്രവൃത്തിയുടെ നാമം ഉപയോഗത്തിലുണ്ട്, ഡ്യൂപ്ലിക്കേഷൻ ഒഴിവാക്കുന്നതിന് %1$s എന്നാക്കി മാറ്റി."ദ്രുത പ്രവർത്തനത്തിന്റെ പേര് ഒന്നിലധികം പകര്പ്പിലുണ്ട്
- പ്രിയപ്പെട്ടവ കാണിക്കുക
- പ്രിയങ്കരങ്ങൾ മറയ്ക്കുക%1$s കാണിക്കുക%1$s മറയ്ക്കുകഒരു വിഭാഗം ചേർക്കുക
@@ -2648,8 +2644,6 @@
പുറത്തേക്ക് എത്തുകസ്റ്റോപ്പിൽ നിന്ന് കയറുക"ഈ ബട്ടണ് തെരഞ്ഞെടുത്ത GPX ട്രാക്കുകൾ മാപ്പില് കാണിക്കാന് /മറയ്ക്കാന് ഉപയോഗിക്കാം"
- GPX ട്രാക്കുകൾ മറയ്ക്കുക
- GPX ട്രാക്കുകൾ കാണിക്കുകആദ്യം ലക്ഷ്യസ്ഥാനം ചേർക്കുക"OsmAnd ലൈവ് മാറ്റങ്ങൾക്കായി പൊതു ഗതാഗത സംവിധാനത്തെ പ്രാപ്തമാക്കുക.""ഓഎസ്എംആന്റ് ലൈവ് പൊതു ഗതാഗതം"
diff --git a/OsmAnd/res/values-nb/strings.xml b/OsmAnd/res/values-nb/strings.xml
index f26d7030f4..5324099e36 100644
--- a/OsmAnd/res/values-nb/strings.xml
+++ b/OsmAnd/res/values-nb/strings.xml
@@ -1969,10 +1969,8 @@
NavigeringKartinnstillingLegg til en kategori
- Skjul favoritterVis %1$sSkjul %1$s
- Vis favoritterStedLegg til favorittTale på/av
@@ -2130,8 +2128,6 @@
Filtrer bilder etter innsender, dato eller type. Kun aktivt på nærgående forstørrelsesnivå.Installer Mapillary for å legge til bilder i denne kartposisjonen.Foto på gatenivå for alle. Oppdag plasser, samarbeid, fang inn verden.
- Vis OSM-notater
- Skjul OSM-notaterKnapp til å vise eller skjule OSM-notater på kartet.Takk for at du kjøpte \'Havdybdekonturer\'Havdybdekonturer
@@ -2850,8 +2846,6 @@
Gå av påSitt på stoppetKnapp for å vise eller skjule valgte spor på kartet.
- Skjul spor
- Vis sporSkru på offentlig transport i OsmAnd Live-endringer.Offentlig transport i OsmAnd Live%1$d overføringer
@@ -3158,11 +3152,7 @@
Er du sikker på at du vil oppdatere alle (%1$d) kart\?Foretrekk veier uten fast dekkeForetrekk veier uten fast dekke framfor med fast dekke for ruting.
- Vis koter
- Skjul koterEn knapp for å vise eller skjule relieffskygger på kartet.
- Vis relieffskygge
- Skjul relieffskyggeKan ikke starte tekst-til-tale-motor.Simuler posisjonen din ved bruk av et innspilt GPX-spor.OsmAnd-profil: %1$s
@@ -3387,8 +3377,6 @@
Åpne innstillingerTerreng%1$s av %2$s
- Skjul terreng
- Vis terrengSlett beskrivelseLegg til beskrivelseVelg gruppe
@@ -3444,8 +3432,6 @@
Mål avstandReising (Wikivoyage og Wikipedia)Navigasjonsprofiler
- Skjul offentlig transport
- Vis offentlig transportTilbake til redigeringOpprett eller rediger interessepunktLegg til profil
@@ -3574,8 +3560,6 @@
Du kan sette fartøyhøyde for å unngå lave broer. Hvis broen endrer høyde, brukes høyden i åpen tilstand.Slett nærmeste målpunktNavngi punktet
- Skjul Mapillary
- Vis MapillaryPeiling%1$s slettetLydstyrkeknapper til forstørring
diff --git a/OsmAnd/res/values-nl/strings.xml b/OsmAnd/res/values-nl/strings.xml
index 1c682d61d9..2aed93b35e 100644
--- a/OsmAnd/res/values-nl/strings.xml
+++ b/OsmAnd/res/values-nl/strings.xml
@@ -2118,8 +2118,6 @@
Sneltoets-duplicaatEen schakelknop om Favorieten al dan niet te tonen op de kaart.Een schakelknop om POI’s al dan niet op de kaart te tonen.
- Favorieten tonen
- Favorieten verbergen%1$s tonen%1$s verbergenCategorie toevoegen
@@ -2325,8 +2323,6 @@
\n
Naam bevat erg veel hoofdletters, toch doorgaan?Zoek in Favorieten
- OSM-opmerkingen tonen
- OSM-opmerkingen verbergenKnop om OSM-opmerkingen al dan niet te tonen.Gesorteerd op afstandUw bestemming ligt in een gebied dat particulier eigendom is. Wilt u gebruik van particuliere wegen voor deze route toestaan\?
@@ -2857,8 +2853,6 @@
Toon meerGetoonde tracksEen knop om geselecteerde GPX-tracks al dan niet te tonen op de kaart.
- GPX-tracks verbergen
- GPX-tracks tonenVoeg a.u.b. eerst de Bestemming inVorige routeThuisadres toevoegen
@@ -3125,11 +3119,7 @@
Naast elkaarKaartenKnop om hoogtelijnen al dan niet te tonen op de kaart.
- Hoogtelijnen tonen
- Hoogtelijnen verbergenKnop om de reliëfschaduw al dan niet te tonen op de kaart.
- Reliëfschaduw tonen
- Reliëfschaduw verbergenTrack opgeslagenToon knooppunt van de fietsroutesHoogtelijnen en reliëfschaduw
@@ -3402,8 +3392,6 @@
Kan profiel niet back-uppen.%1$s van %2$sHellingen
- Terrein verbergen
- Terrein tonenEen knop om de terreinlaag al dan niet te tonen op de kaart.Beschrijving verwijderenBeschrijving toevoegen
@@ -3438,8 +3426,6 @@
Het toepassen van deze wijzigingen wist de cache van deze rasterkaartbronStel de hoogte van het vaartuig inStel de hoogte van het vaartuig in om lage bruggen te vermijden. Let op, als de brug beweegbaar is, gebruiken we de hoogte in geopende toestand.
- Mapillary verbergen
- Mapillary tonenEen schakelknop om de Mapillary-laag al dan niet te tonen op de kaart.Geef de toegestane voertuiglengte op voor routes.Maximale lengte
@@ -3553,8 +3539,6 @@
Aangepaste kleur%1$s / %2$sPOI-types zoeken
- OV-informatie verbergen
- OV-informatie tonenKnop om OV-informatie al dan niet te tonen op de kaart.Favoriet toevoegen / bewerkenPOI toevoegen / bewerken
diff --git a/OsmAnd/res/values-oc/strings.xml b/OsmAnd/res/values-oc/strings.xml
index 788aa757e2..7e0d9fa6ed 100644
--- a/OsmAnd/res/values-oc/strings.xml
+++ b/OsmAnd/res/values-oc/strings.xml
@@ -137,8 +137,6 @@
Mostrar maiTraças vesedoirasDe quichar sus lo boton mòstra ò amaga la traça GPS sus la mapa
- Amagar la traça GPS
- Mostrar la traça GPSComençatz per indicar una destinacionItinerari precedentAjustar lo domicile
@@ -481,11 +479,7 @@
Preferissi lei rotas sensa quitran.Edicions d\'OSMUn commutador per mostrar o amagar lei corbas de nivèu sus la mapa.
- Mostrar lei corbas de nivèu
- Amagar lei corbas de nivèuUn commutador per mostrar o amagar l\'ombrejat de relèu de la mapa.
- Mostrar l’ombrejat de relèu
- Amagar l’ombrejat de relèuExportar lo perfiuPerfiu d\'OsmAnd: %1$sLo perfiu \'%1$s\' existís ja. Lo volètz subrescriure\?
diff --git a/OsmAnd/res/values-pl/strings.xml b/OsmAnd/res/values-pl/strings.xml
index 1e00cb7e75..63c8be8d06 100644
--- a/OsmAnd/res/values-pl/strings.xml
+++ b/OsmAnd/res/values-pl/strings.xml
@@ -2134,8 +2134,6 @@
Kopia nazwy szybkiej czynnościPrzełącznik wyświetlania lub ukrywania ulubionych miejsc na mapie.Przełącznik wyświetlania lub ukrywania użytecznych miejsc na mapie.
- Pokaż Ulubione
- Ukryj UlubioneTworzenie elementówTa wiadomość uzupełni się w polu komentarza.Wiadomość
@@ -2280,8 +2278,6 @@
Zainstaluj wtyczkę \'Poziomice\', aby pokazać stopniowane obszary pionowe.Pobierz mapę \"Cieniowanie Rzeźby Terenu\", by wyświetlić cieniowanie pionowe.Kup i zainstaluj wtyczkę \'Poziomice\', aby pokazać stopniowane obszary pionowe.
- Pokaż uwagi OSM
- Ukryj uwagi OSMPrzybliżony zasięg i jakość mapy:
\n • Europa Zachodnia: ****
\n • Europa Wschodnia: ***
@@ -2843,8 +2839,6 @@
Wyświetl więcejWyświetlane śladyPrzycisk do pokazywania lub ukrywania wybranych śladów na mapie.
- Ukryj ślady
- Pokaż śladyProszę najpierw ustalić celPoprzednia trasaDowiedz się więcej na naszym blogu, jak OsmAnd wyznacza trasy.
@@ -3260,10 +3254,6 @@
Preferuje drogi nieutwardzone.Zmiany OSMPrzełącza wyświetlenie poziomic na mapie.
- Wyświetl poziomice
- Ukryj poziomice
- Wyświetl cieniowanie terenu
- Ukryj cieniowanie terenuPrzycisk do pokazywania lub ukrywania cieniowania terenu na mapie.Nie można uruchomić mechanizmu zamiany tekstu na mowę.Wspólne
@@ -3478,8 +3468,6 @@
Dodaj opisUsuń opisPrzycisk do wyświetlania lub ukrywania warstwy terenu na mapie.
- Pokaż teren
- Ukryj terenNachylenieWłącz, aby wyświetlić cieniowanie wzniesień lub stoków. Możesz przeczytać więcej o tego rodzaju mapach na naszej stronie.Legenda
@@ -3604,8 +3592,6 @@
\n
\nPowrót do edycji
- Ukryj transport publiczny
- Pokaż transport publicznyUtwórz lub edytuj użyteczne miejsceDodaj lub edytuj ulubione miejscePrzycisk akcji przełącza między wybranymi profilami.
@@ -3657,8 +3643,6 @@
Ustaw wysokość statku, by unikać niskich mostów. Uwaga: dla mostów zwodzonych liczymy wysokość podniesionego mostu.Ustaw wysokość statkuUstaw szerokość statku, by unikać wąskich mostów
- Ukryj Mapillary
- Pokaż MapillaryWprowadź szerokość pojazdu, niektóre restrykcje dróg mogą dotyczyć szerokich pojazdów.Wprowadź wysokość pojazdu, niektóre restrykcje dróg mogą dotyczyć wysokich pojazdów.Wprowadź wagę pojazdu, niektóre restrykcje dróg mogą dotyczyć ciężkich pojazdów.
diff --git a/OsmAnd/res/values-pt-rBR/strings.xml b/OsmAnd/res/values-pt-rBR/strings.xml
index 34bd6feef6..c142233a7a 100644
--- a/OsmAnd/res/values-pt-rBR/strings.xml
+++ b/OsmAnd/res/values-pt-rBR/strings.xml
@@ -2049,8 +2049,6 @@
Aumentar o raio de buscaNada encontradoModifique o texto da pesquisa ou aumente o raio de busca.
- Mostrar Anotações do OSM
- Ocultar notas OSMBotão para mostrar ou ocultar notas do OSM no mapa.Classificado por distânciaPesquisar Favoritos
@@ -2456,8 +2454,6 @@
Nome de ação rápida duplicadoUma alternância para mostrar ou ocultar os pontos Favoritos no mapa.Alternar para mostrar ou ocultar POIs no mapa.
- Mostrar Favoritos
- Ocultar favoritosMostrar %1$sOcultar %1$sAdicionar uma categoria
@@ -2839,8 +2835,6 @@
Desembarque emEmbarque na paradaUm botão para mostrar ou ocultar as trilhas selecionadas no mapa.
- Ocultar trilhas
- Mostrar trilhasHabilitar o transporte público para alterações do OsmAnd Live.Transporte público OsmAnd LiveNão pavimentado
@@ -3253,11 +3247,7 @@
Prefira não pavimentada sobre estradas pavimentadas para o roteamento.Edições OSMBotão que mostra ou oculta linhas de contorno no mapa.
- Mostrar curvas de nível
- Ocultar linhas de contornoUm botão para mostrar ou ocultar sombras de relevo.
- Mostrar sombras de relevo
- Ocultar sombras de relevoNão é possível iniciar o mecanismo de conversão de texto em fala.Simule sua posição usando um rasteador GPX gravada.Exportar perfil
@@ -3483,8 +3473,6 @@
Sombras de relevo%1$s de %2$sEncostas
- Ocultar terreno
- Mostrar terrenoUm botão para mostrar ou ocultar a camada do terreno no mapa.Excluir descriçãoAdicionar descrição
@@ -3597,8 +3585,6 @@
\n
\n
Você pode acessar essas ações tocando no botão “%1$s”.
- Ocultar transporte público
- Mostrar transporte públicoBotão que mostra ou oculta o transporte público no mapa.Criar ou editar POIPosições de estacionamento
@@ -3667,8 +3653,6 @@
Você pode definir a altura da embarcação para evitar pontes baixas. Lembre-se, se a ponte for móvel, usaremos sua altura no estado aberto.Defina a altura da embarcação para evitar pontes baixas. Lembre-se, se a ponte for móvel, usaremos sua altura no estado aberto.Defina a largura da embarcação para evitar pontes estreitas
- Ocultar Mapillary
- Mostrar MapillaryUma alternância para mostrar ou ocultar a camada Mapillary no mapa.Desinstalar radares de velocidadeLegal
diff --git a/OsmAnd/res/values-pt/strings.xml b/OsmAnd/res/values-pt/strings.xml
index d94decabf7..4eafe977d0 100644
--- a/OsmAnd/res/values-pt/strings.xml
+++ b/OsmAnd/res/values-pt/strings.xml
@@ -1911,8 +1911,6 @@
Aumentar raio de pesquisaNada encontradoAltere a pesquisa ou aumente o raio dela.
- Mostrar anotações OSM
- Ocultar anotações do OSMBotão para mostrar ou ocultar anotações OSM no mapa.Ordenar por distânciaPesquisar em Favoritos
@@ -2724,8 +2722,6 @@
Nome de ação rápida duplicadoUma alternância para mostrar ou ocultar os pontos favoritos no mapa.Uma alternância para mostrar ou ocultar PIs no mapa.
- Mostrar Favoritos
- Esconder favoritosMostrar %1$sEsconder %1$sAdicionar uma categoria
@@ -2892,7 +2888,6 @@
Mostrar maisTrilhos mostradosUm botão para mostrar ou ocultar trilhos selecionados no mapa.
- Ocultar trilhosSem elétricosEvita elétricosSem autocarros
@@ -2909,7 +2904,6 @@
ParalelosSeixosCaminho para cavaleiros
- Mostrar trilhosPor favor defina primeiro o destinoRota anteriorAdicionar casa
@@ -3280,11 +3274,7 @@
Aspeto do perfilEdições OSMBotão que mostra ou oculta curvas de nível no mapa.
- Mostrar curvas de nível
- Ocultar curvas de nívelUm botão para mostrar ou ocultar sombras de relevo.
- Mostrar sombras de relevo
- Ocultar sombras de relevoNão é possível iniciar o mecanismo de conversão de texto em fala.Simule a sua posição usando um caminho GPX gravado.Exportar o perfil
@@ -3339,8 +3329,6 @@
Sombras de relevo%1$s de %2$sPistas
- Ocultar terreno
- Mostrar terrenoUm botão para mostrar ou esconder a camada do terreno no mapa.Apagar descriçãoAdicionar descrição
@@ -3584,8 +3572,6 @@
LombardoCor customizadaCombinar categorias de POI de categorias diferentes. Toque em trocar para selecionar tudo, toque no lado esquerdo para seleção da categoria.
- Ocultar o transporte público
- Mostrar transporte públicoBotão que mostra ou oculta o transporte público no mapa.Criar ou editar um POIPosições de estacionamento
@@ -3650,7 +3636,6 @@
Go-cartOs alertas de radares de velocidade em alguns países são proibidos por lei.Manter ativo
- Ocultar MapillaryForneça um nome para o pontoA aplicação dessas alterações limpará os dados em cache dessa origem de blocoEste aparelho não possui câmeras de velocidade.
@@ -3673,7 +3658,6 @@
%1$s apagadoUma alternância para mostrar ou ocultar a camada Mapillary no mapa.Definir altura da embarcação
- Mostrar MapillaryMotocicleta enduroPatins em linhaDesativado. Requer \'manter o ecrã ligadp\' em \'tempo limite após a ativação\'.
diff --git a/OsmAnd/res/values-ro/strings.xml b/OsmAnd/res/values-ro/strings.xml
index f216bc900e..c6f961eb7c 100644
--- a/OsmAnd/res/values-ro/strings.xml
+++ b/OsmAnd/res/values-ro/strings.xml
@@ -1803,8 +1803,6 @@
Măriți aria de căutareNimic găsitModifică criteriile de căutare sau mărește aria de căutare.
- Arată notele OSM
- Ascunde notele OSMAtingând acest buton de acțiune, se afișează sau se ascund notele OSM de pe hartă.Sortat după distanțăCaută Favorite
@@ -2203,8 +2201,6 @@
SchimbațiAfișați mai multeTrasee afișate
- Ascundeți traseele GPX
- Afișați traseele GPXSelectați destinația mai întâiRuta anterioarăAdăugați acasă
@@ -2379,11 +2375,7 @@
Prefer drumurile nepavate.Editare OSMComută pentru a afișa sau ascunde liniile de contur pe hartă.
- Afişează conturul liniilor
- Ascunde conturul liniilorComută pentru a arăta sau ascunde umbrele de pe hartă.
- Arata si umbrele
- Ascunde afisarea umbrelorMotorul text-to-speech nu porneste.Exportă profilulProfil osmand exportat %1$s
@@ -2821,8 +2813,6 @@
tonemetriiAdăugare surse online
- Ascundere Mapillary
- Afișare MapillaryO comutare pentru a afișa sau ascunde stratul Mapillary pe hartă.Specificați lungimea vehiculului care trebuie permisă pe rute.Limită lungime
diff --git a/OsmAnd/res/values-ru/strings.xml b/OsmAnd/res/values-ru/strings.xml
index 629a956ea1..df4223eeb4 100644
--- a/OsmAnd/res/values-ru/strings.xml
+++ b/OsmAnd/res/values-ru/strings.xml
@@ -40,8 +40,6 @@
Увеличить радиус поискаНичего не найденоИзменить запрос или увеличить радиус поиска.
- Показать OSM-заметки
- Скрыть OSM-заметкиПереключатель отображения OSM-заметок на карте.Отсортировано по расстояниюПоиск в избранных
@@ -2256,8 +2254,6 @@
ДобавитьУдалить действиеВы уверены, что хотите удалить действие «%s»\?
- Показать избранные
- Скрыть избранныеПоказать %1$sСкрыть %1$sНастройки карты
@@ -2865,8 +2861,6 @@
ПоменятьПоказать большеОтображаемые треки
- Скрыть треки
- Показать трекиВремя сутокПо шагамТипы дорог
@@ -3224,11 +3218,7 @@
Вы можете применить это ко всем или только к выбранному профилю.ОбщийПереключатель, показывающая или скрывающая контурные линии на карте.
- Показать контурные линии
- Скрыть контурные линииПереключатель, чтобы показать или скрыть затенение рельефа на карте.
- Показать затенение рельефа
- Скрыть затенение рельефаЭкспорт профиляПрофиль OsmAnd: %1$s«%1$s» уже существует. Перезаписать\?
@@ -3477,8 +3467,6 @@
%1$s из %2$sНастройка минимального и максимального уровней масштабирования, при которых слой будет отображаться.Переключатель, чтобы показать или скрыть слой рельефа местности на карте.
- Показать рельеф
- Скрыть рельефРельефЛыжный туризмСнегоход
@@ -3602,8 +3590,6 @@
\n
\n
Функции, доступные при нажатии кнопки «%1$s».
- Скрыть общественный транспорт
- Показать общественный транспортДобавить или изменить избранноеСоздать или изменить POIВозврат к редактированию
@@ -3672,8 +3658,6 @@
Вы можете указать высоту судна, чтобы избегать низких мостов. Имейте в виду, что если мост раздвижной, будет использована его высота в открытом состоянии.Укажите высоту судна, чтобы избежать низких мостов. Имейте в виду, что если мост раздвижной, будет использована его высота в открытом состоянии.Укажите ширину судна, чтобы избежать узких мостов
- Скрыть Mapillary
- Показать MapillaryПереключатель, чтобы показать или скрыть слой Mapillary на карте.ЗаконодательствоВ некоторых странах и регионах использование предупреждений о камерах контроля скорости запрещено законом.
diff --git a/OsmAnd/res/values-sc/strings.xml b/OsmAnd/res/values-sc/strings.xml
index 800c4709a5..d00dbd0aab 100644
--- a/OsmAnd/res/values-sc/strings.xml
+++ b/OsmAnd/res/values-sc/strings.xml
@@ -2119,8 +2119,6 @@
Ammustra una ventana intermèdiaUnu butone pro ammustrare o cuare sos puntos preferidos in sa mapa.Unu butone pro ammustrare o cuare sos PDI in sa mapa.
- Ammustra sos preferidos
- Cua sos preferidosAmmustra %1$sCua %1$sAnnanghe una categoria
@@ -2387,8 +2385,6 @@
Còmpora e installa s\'estensione \'Curvas de Livellu\' pro ammustrare sas àreas verticales graduadas.Chirca in sos preferidosOrdinados pro distàntzia
- Ammustra sas notas OSM
- Cua sas notas OSMUnu butone pro ammustrare o cuare sas Notas OSM in sa mapa.Torra a incumintzare sa chircaIsmànnia su raju de chirca
@@ -2842,8 +2838,6 @@
Essi inÀrtzia in sa firmadaUnu butone pro ammustrare o cuare sas rastas ischertadas in sa mapa.
- Istichi sas rastas
- Ammustra sas rastasAbìlita su trasportu pùblicu pro sas modìficas de OsmAnd Live.Trasportu pùblicu in OsmAnd Live%1$d tramudòngios
@@ -3258,11 +3252,7 @@
Preferi caminos no apamentados a sos caminos pamentados pro s\'àndala.Modìficas de OSMButone chi ammustrat o cuat sas curvas de livellu in sa mapa.
- Ammustra sas curvas de livellu
- Cua sas curvas de livelluUnu butone pro ammustrare o cuare sas umbraduras de sos rilievos in sa mapa.
- Ammustra sas umbraduras de sos rilievos
- Cua sas umbraduras de sos rilievosAllughidura de su motore de sìntesi vocale fallida.Sìmula sa positzione tua impreende una rasta GPX registrada.Esporta su profilu
@@ -3488,8 +3478,6 @@
Umbraduras de sos rilievos%1$s de %2$sPistas
- Cua su terrinu
- Ammustra su terrinuUnu butone pro ammustrare o cuare s\'istratu de su terrinu in sa mapa.Iscantzella sa descritzioneAnnanghe una descritzione
@@ -3603,8 +3591,6 @@
\nSighiPodes atzèdere a custas atziones incarchende su butone \"%1$s\".
- Cua sos trasportos pùblicos
- Ammustra sos trasportos pùblicosButone pro ammustrare o cuare sos trasportos pùblicos in sa mapa.Crea o modìfica unu PDILogos de parchègiu
@@ -3672,8 +3658,6 @@
Podes impostare s\'artària de sa barca pro evitare sos pontes bassos. Ammenta·ti chi, si su ponte est mòbile, amus a impreare s\'artària sua de cando est abertu.Imposta s\'artària de sa barca pro evitare sos pontes bassos. Ammenta·ti chi, si su ponte est mòbile, amus a impreare s\'artària sua de cando est abertu.Imposta sa largària de sa barca pro evitare pontes astrintos
- Cua Mapillary
- Ammustra MapillaryUnu butone pro ammustrare o cuare s\'istratu de Mapillary in sa mapa.Disinstalla sos autoveloxLegale
diff --git a/OsmAnd/res/values-sk/strings.xml b/OsmAnd/res/values-sk/strings.xml
index 77703c92a5..5b2e98d67b 100644
--- a/OsmAnd/res/values-sk/strings.xml
+++ b/OsmAnd/res/values-sk/strings.xml
@@ -2124,8 +2124,6 @@
Duplicitný názov rýchlej akciePrepínač pre zobrazenie alebo skrytie Obľúbených bodov na mape.Prepínač pre zobrazenie alebo skrytie bodov záujmu na mape.
- Zobraziť Obľúbené body
- Skryť Obľúbené bodyZobraziť %1$sSkryť %1$sPridať kategóriu
@@ -2385,8 +2383,6 @@
Stiahnite mapu \"Vrstevnice\" pre tento región.Zoradené podľa vzdialenostiHľadať v Obľúbených bodoch
- Zobraziť OSM poznámky
- Skryť OSM poznámkyTlačidlo pre zobrazenie alebo skrytie OSM poznámok na mape.Váš cieľ je v oblasti so súkromným prístupom. Povoliť vstup na súkromné cesty pre tento výlet\?Znovu začať hľadanie
@@ -2842,8 +2838,6 @@
Vystúpte naNastúpte na zastávkeTlačidlo pre zobrazenie alebo skrytie zvolených stôp na mape.
- Skryť stopy
- Zobraziť stopy%1$d prestup(y)Pridať východzí a cieľový bodPridať východzí bod
@@ -3268,11 +3262,7 @@
Vymazať %1$s\?Úpravy OSMTlačidlo pre zobrazenie alebo skrytie vrstevníc na mape.
- Zobraziť vrstevnice
- Skryť vrstevniceTlačidlo pre zobrazenie alebo skrytie tieňovaných svahov na mape.
- Zobraziť tieňované svahy
- Skryť tieňované svahyNepodarilo sa spustiť modul prevodu textu na reč.Simulovať polohu pomocou zaznamenanej stopy GPX.Importovať profil
@@ -3486,8 +3476,6 @@
Trasa bude prepočítaná ak vzdialenosť od trasy k aktuálnej polohe je väčšia ako zvolená hodnota.%1$s z %2$sSklony svahov
- Skryť terén
- Zobraziť terénTlačidlo pre zobrazenie alebo skrytie vrstvy terénu na mape.Vymazať popisPridať popis
@@ -3599,8 +3587,6 @@
\n • Opravy chýb pre jazyky písané sprava doľava
\n
\n
- Skryť verejnú dopravu
- Zobraziť verejnú dopravuTlačidlo na zobrazenie alebo skrytie verejnej dopravy na mape.Vytvoriť alebo upraviť bod záujmuParkovacie miesta
@@ -3681,8 +3667,6 @@
\nZvoľte %2$s a všetky údaje o rýchlostných radaroch budú odstránené, až kým nebude OsmAnd znovu preinštalovaný.
Ponechať aktívneV niektorých krajinách je varovanie pred rýchlostnými radarmi zakázané zákonom.
- Skryť Mapillary
- Zobraziť MapillaryPrepínač pre zobrazenie alebo skrytie vrstvy Mapillary na mape.Smerovanie%1$s vymazané
diff --git a/OsmAnd/res/values-sl/strings.xml b/OsmAnd/res/values-sl/strings.xml
index ef4d7e4679..94ff5eb396 100644
--- a/OsmAnd/res/values-sl/strings.xml
+++ b/OsmAnd/res/values-sl/strings.xml
@@ -2095,8 +2095,6 @@
Ali ste prepričani, da želite izbrisati dejanje »%s«?Ime dejanjaMesto
- Pokaži priljubljene
- Skrij priljubljenePokaži %1$sSkrij %1$sDodaj kategorijo
@@ -2256,8 +2254,6 @@
Povečaj območje iskanjaNi zadetkovPoskusite zamenjati iskalni niz ali pa povečajte obseg iskanja.
- Pokaži Opombe OSM
- Skrij Opombe OSMRazvrščeno po razdaljiIskanje med priljubljenimiVstavek
@@ -2871,8 +2867,6 @@
ZamenjajPokaži večPrikazane sledi
- Skrij sledi GPX
- Pokaži sledi GPXNajprej je treba dodati ciljPredhodna potDodaj domači naslov
@@ -3234,8 +3228,6 @@
Trenutna ciljna točka na poti bo izbrisana. Če je ta vaš cilj, bo navigacija zaustavljena.Podrobnosti o zanimivih točkah so na voljo na Wikipediji. Lahko je vaš žepni vodič, ki deluje tudi brez povezave – omogočiti je treba le vstavek Wikipedije in podrobno spoznati svet okoli vas.Omogoči za nadzor približevanja zemljevida z gumbi za glasnost.
- Skrij Mapillary
- Prikaži mapillaryDodaj spletni virOdstrani in ponovno zaženiUporabi gumbe za glasnost za približevanje
diff --git a/OsmAnd/res/values-sr/strings.xml b/OsmAnd/res/values-sr/strings.xml
index 084c6de825..16020da81d 100644
--- a/OsmAnd/res/values-sr/strings.xml
+++ b/OsmAnd/res/values-sr/strings.xml
@@ -1245,8 +1245,6 @@
Повећај област претрагеНема ничег пронађеногПромените претрагу или повећајте област претраге.
- Прикажи белешке ОСМ-а
- Сакриј белешке ОСМ-аДугме да прикажите или да сакријете OSM белешке на карти.Разврстано по удаљеностиТражи у Омиљеним
@@ -2217,8 +2215,6 @@
Прикажи дијалог за Омиљене" сачувано у "Место
- Прикажи Омиљене
- Сакриј ОмиљенеПрикажи %1$sСакриј %1$sДодај категорију
@@ -2899,8 +2895,6 @@
Приказане путањеУкрцавање на стајањуДугме које приказује или сакрива одабране путање са карте.
- Сакриј путање
- Прикажи путањеОмогући јавни превоз на OsmAnd Live изменама.OsmAnd Live јавни превозКалдрма
@@ -3258,11 +3252,7 @@
Преферира неасфалтиране путеве испред асфалтрираних за рутирање.ОСМ изменеДугме које приказује или сакрива линије изохипси на карти.
- Прикажи изохипсе
- Сакриј изохипсеДугме које приказује или сакрива рељеф на карти.
- Прикажи рељеф
- Сакриј рељефНе могу да покренем мотор за синтетизовање гласа.Симулирајте Вашу позицију користећу снимљену GPX стазу.Извези профил
@@ -3461,8 +3451,6 @@
Поврати све поставке профила\?Чувам нови профилНе могу да направим резервну копију профила.
- Сакриј терен
- Прикажи теренДугме да прикаже или сакрите слој терена на карти.Обриши описДодај опис
@@ -3501,8 +3489,6 @@
OsmAnd куповинеУпутство за легенду карте.Профили навођења
- Сакриј јавни превоз
- Прикажи јавни превозДугме које приказује или скрива јавни превоз на карти.Паркинг позицијеПоврати подразумевани поредак ставки
@@ -3579,8 +3565,6 @@
Држи активнимИзбришиУпозорења за радаре су законом забрањене у неким државама.
- Сакриј Mapillary
- Прикажи MapillaryЈорубаВарајскиТаџички
diff --git a/OsmAnd/res/values-sv/strings.xml b/OsmAnd/res/values-sv/strings.xml
index 502d5544dd..f9305301d2 100644
--- a/OsmAnd/res/values-sv/strings.xml
+++ b/OsmAnd/res/values-sv/strings.xml
@@ -2025,8 +2025,6 @@ Om du tycker om OsmAnd och OSM och vill stödja dem så är detta ett utmärkt s
Lägg till favorit" har sparats i "Plats
- Visa favoriter
- Dölj favoriterVisa %1$sDölj %1$sLägg till en kategori
@@ -2123,8 +2121,6 @@ Vänligen tillhandahåll fullständig kod
Välj stadVälj postnummerAutozoomning på/av
- Visa OSM-anteckningar
- Dölj OSM-anteckningarEtt tryck på denna åtgärdsknapp visar eller döljer OSM-anteckningar på kartan.Starta om sökningenUtöka sökradien
diff --git a/OsmAnd/res/values-tr/strings.xml b/OsmAnd/res/values-tr/strings.xml
index 243127892f..631aacada7 100644
--- a/OsmAnd/res/values-tr/strings.xml
+++ b/OsmAnd/res/values-tr/strings.xml
@@ -1981,8 +1981,6 @@
DüşükSuİşlem Adı
- OSM notlarını göster
- OSM notlarını gizleOSM notlarını haritada göstermek veya gizlemek için bir düğme.Mesafeye göre sıralandıDüğmeye uzunca basıp sürüklemek, ekrandaki konumunu değiştirir.
@@ -2442,8 +2440,6 @@
Yol türleriTakasDaha fazla görüntüle
- Yolları Gizle
- Yolları GösterEv ekleIş ekleİş
@@ -2962,8 +2958,6 @@
" kaydedildi "YerHızlı eylem adı yinelenen
- Sık Kullanılanları göster
- Sık Kullanılanları gizle%1$s göster%1$s gizleKategori ekle
@@ -3261,11 +3255,7 @@
Yönlendirme için asfaltsız yolları asfaltlılara tercih et.OSM düzenlemeleriEş yükselti eğrilerini haritada gösterme veya gizleme düğmesi.
- Eş yükselti eğrilerini göster
- Eş yükselti eğrilerini gizleHaritada tepe gölgelerini göstermek veya gizlemek için bir düğme.
- Tepe gölgesini göster
- Tepe gölgesini gizleMetinden konuşmaya motoru başlatılamıyor.Kayıtlı bir GPX yolu kullanarak konumunuzu simüle edin.Profili dışa aktar
@@ -3491,8 +3481,6 @@
Güzergahtan geçerli konuma olan mesafe seçilen değerden fazla ise güzergah yeniden hesaplanacaktır.%1$s / %2$sYamaçlar
- Araziyi gizle
- Araziyi gösterHaritada arazi katmanını göstermek veya gizlemek için bir düğme.Açıklamayı silAçıklama ekle
@@ -3606,8 +3594,6 @@
\n
Devam ettirBu eylemlere “%1$s” düğmesine dokunarak erişebilirsiniz.
- Toplu taşıma araçlarını gizle
- Toplu taşıma araçlarını gösterHaritada toplu taşıma araçlarını gösteren veya gizleyen düğme.POI oluştur veya düzenlePark etme alanları
@@ -3675,8 +3661,6 @@
Alçak köprülerden kaçınmak için gemi yüksekliğini ayarlayabilirsiniz. Köprü hareket edebiliyorsa, açık durumdaki yüksekliğini kullanacağımızı unutmayın.Alçak köprülerden kaçınmak için gemi yüksekliğini ayarlayın. Köprü hareket edebiliyorsa, açık durumdaki yüksekliğini kullanacağımızı unutmayın.Dar köprülerden kaçınmak için gemi genişliğini ayarlayın
- Mapillary\'i gizle
- Mapillary\'i gösterHarita üzerinde Mapillary katmanını göstermek veya gizlemek için bir geçiş.Hız kameralarını kaldırYasal
diff --git a/OsmAnd/res/values-uk/strings.xml b/OsmAnd/res/values-uk/strings.xml
index 7d92f4dbac..ecbdddd2b2 100644
--- a/OsmAnd/res/values-uk/strings.xml
+++ b/OsmAnd/res/values-uk/strings.xml
@@ -2093,8 +2093,6 @@
Вилучити діюВи впевнені, що хочете вилучити дію „%s“?Місце
- Показати Закладки
- Приховати ЗакладкиПоказати %1$sПриховати %1$sДодати категорію
@@ -2208,8 +2206,6 @@
Нічого не знайденоМісце призначення розташовано в області з приватним доступом. Дозволити доступ до приватних доріг у цій подорожі\?Змініть пошуковий запит або ж розширте пошуковий радіус.
- Показати примітки OSM
- Приховати примітки OSMНатискання на кнопку дії покаже чи приховає примітки OSM на мапі.Відсортоване за відстаннюПошук у закладках
@@ -2801,8 +2797,6 @@
ПомінятиПоказати більшеПоказані треки
- Приховати треки
- Показати трекиСпершу додайте пункт призначенняПопередній маршрутДодати домівку
@@ -3261,11 +3255,7 @@
Надати перевагу незаасфальтованим над асфальтованими дорогами для прокладки.Правки OSMУвімк/вимк показ горизонталей.
- Показати горизонталі
- Сховати горизонталіКнопка, що показує чи приховує горизонталі на мапі.
- Показати затемнення рельєфу
- Приховати затемнення рельєфуНе вдається запустити рушій мовлення.Відтворити свою позицію за допомогою записаного треку GPX.Експорт профілю
@@ -3490,8 +3480,6 @@
Пагорб%1$s з %2$sСхили
- Сховати місцевість
- Показати місцевістьКнопка для відображення або приховування шару місцевості на мапі.Видалити описДодати опис
@@ -3603,8 +3591,6 @@
\n
\n
Розташування припаркованого авто
- Приховати громадський транспорт
- Показати громадський транспортКнопка показу або приховування громадського транспорту на мапі.Створити чи змінити POIДодати чи змінити закладку
@@ -3673,8 +3659,6 @@
Ви можете встановити висоту судна, щоб уникнути низьких мостів. Майте на увазі, якщо міст рухомий, використовуватиметься його висота у відкритому стані.Встановіть висоту судна, щоб уникнути низьких мостів. Майте на увазі, якщо міст рухомий, використовуватиметься його висота у відкритому стані.Встановіть ширину судна, щоб уникнути вузьких мостів
- Вимкнути Mapillary
- Показати MapillaryПеремикач показує/приховує шар Mapillary на мапі.Видалити камери контролю швидкостіЗаконодавство
diff --git a/OsmAnd/res/values-zh-rCN/strings.xml b/OsmAnd/res/values-zh-rCN/strings.xml
index 390f33407d..b1afb6439f 100644
--- a/OsmAnd/res/values-zh-rCN/strings.xml
+++ b/OsmAnd/res/values-zh-rCN/strings.xml
@@ -1249,8 +1249,6 @@
增加搜索范围什么都没找到更改搜索或增加其半径。
- 显示 OSM 注记
- 隐藏 OSM 注记添加照片允许进入私有土地。全部下载
@@ -2381,8 +2379,6 @@
快速动作名称重复轻触动作按钮将会在地图上显示或隐收藏夹标点。轻触动作按钮将会在地图上显示或隐藏 POI。
- 显示收藏夹
- 隐藏收藏夹显示 %1$s隐藏 %1$s添加类别
@@ -2730,8 +2726,6 @@
道路类型退出于在地图中显示或隐藏已选中的GPX轨迹的按钮。
- 隐藏GPX轨迹
- 显示GPX路径请先设置目的地为OsmAnd Live启用公共交通的变更情况。添加出发地和目的地
@@ -2890,8 +2884,6 @@
透明度缩放等级图例
- 隐藏地形
- 显示地形删除描述添加描述选择形状
@@ -2912,8 +2904,6 @@
搜索兴趣点类型半径尺订阅 - OsmAnd Live
- 隐藏公共交通
- 显示公共交通创建/编辑兴趣点编辑在线资源正轴等角圆柱投影
@@ -2928,8 +2918,6 @@
您可以设置船只高度,以避免过低桥梁。请记住,如果桥是可移动的,我们将使用它在打开状态下的高度。设置船只高度,以避免过低桥梁。请记住,如果桥是可移动的,我们将使用它在打开状态下的高度。设置船只宽度以避免狭窄的桥梁
- 隐藏Mapillary
- 显示Mapillary%1$s 已删除卸载并重新启动删除下一个目的地
@@ -2952,8 +2940,6 @@
允许专家路线节点网络隐藏罗盘标尺
- 隐藏山体阴影
- 隐藏轮廓线在地图上显示或隐藏地形图层的按钮。显示或隐藏其他地图细节在地图上显示或隐藏Mapillary图层的开关。
diff --git a/OsmAnd/res/values-zh-rTW/strings.xml b/OsmAnd/res/values-zh-rTW/strings.xml
index bfa817bfa3..d980706693 100644
--- a/OsmAnd/res/values-zh-rTW/strings.xml
+++ b/OsmAnd/res/values-zh-rTW/strings.xml
@@ -2092,8 +2092,6 @@
預設的名稱" 儲存到 "場所
- 顯示我的收藏
- 隱藏我的收藏顯示 %1$s隱藏 %1$s增加一項類別
@@ -2380,8 +2378,6 @@
安裝「等高線」外掛程式以顯示漸層垂直區域。自此縮放等級開始隱藏按距離排序
- 顯示 OSM 註記
- 隱藏 OSM 註記在我的最愛中搜尋顯示或隱藏地圖上的 OSM 註記的按鈕。您的目的地位處私人通路的區域。本次旅程允許使用私人道路嗎?
@@ -2837,8 +2833,6 @@
離開於站點的座位在地圖上顯示或隱藏所選軌跡的按鈕。
- 隱藏軌跡
- 顯示軌跡傳送紀錄檔避免電車避免電車
@@ -3253,11 +3247,7 @@
在計算路徑時,相較於有鋪面的道路,較偏好無鋪面的道路。OSM 編輯在地圖上顯示或隱藏等高線的按鈕。
- 顯示等高線
- 隱藏等高線在地圖上顯示或隱藏地形陰影的按鈕。
- 顯示地形陰影
- 隱藏地形陰影無法啟動文字轉語音引擎。使用已紀錄的 GPX 軌跡模擬您的位置。匯出設定檔
@@ -3484,8 +3474,6 @@
啟用以檢視地形陰影或坡度圖。您可以在我們的網站上閱讀更多關於這些地圖類型的資訊。地形陰影坡度
- 隱藏地形
- 顯示地形用於顯示或隱藏地圖上地形圖層的按鈕。刪除描述新增描述
@@ -3596,9 +3584,7 @@
\n • 修復 RTL 的臭蟲
\n
\n
- 顯示大眾運輸您可以透過點選「%1$s」按鈕存取這些動作。
- 隱藏大眾運輸在地圖上顯示或隱藏大眾運輸的按鈕。建立或編輯 POI停車位置
@@ -3667,8 +3653,6 @@
您可以設定船艦高度以避免矮橋。請記住,如果橋是可動式的,我們將會使用其在開啟狀態的高度。設定船艦高度以避免矮橋。請記住,如果橋是可動式的,我們將會使用其開啟狀態的高度。設定船艦寬度以避免窄橋
- 隱藏 Mapillary
- 顯示 Mapillary在地圖上顯示或隱藏 Mapillary 圖層的開關。解除安裝測速照相法律
diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml
index c43425fa92..a93a58dec7 100644
--- a/OsmAnd/res/values/strings.xml
+++ b/OsmAnd/res/values/strings.xml
@@ -12,14 +12,12 @@
-->
- Show/hide
+ Show/hideCopy POI nameThe recording will be continued.Select category or add new oneDistance by tapA toggle to show or hide the Coordinates widget on the map.
- Show Coordinates widget
- Hide Coordinates widgetRouting could avoid strong uphills.Application restart required to apply some settings.On pause
@@ -342,8 +340,6 @@
Length limitSpecify vehicle length to be permitted on routes.A toggle to show or hide the Mapillary layer on the map.
- Show Mapillary
- Hide MapillarySet vessel width to avoid narrow bridgesSet vessel height to avoid low bridges. Keep in mind, if the bridge is movable, we will use its height in the open state.You can set vessel height to avoid low bridges. Keep in mind, if the bridge is movable, we will use its height in the open state.
@@ -420,8 +416,6 @@
Parking positionsCreate or edit POIButton showing or hiding public transport on the map.
- Show public transport
- Hide public transport
• New offline Slope maps\n\n
• Full customization of Favorites and GPX Waypoints – custom colors, icons, shapes\n\n
@@ -519,8 +513,6 @@
Add descriptionDelete descriptionA button to show or hide terrain layer on the map.
- Show terrain
- Hide terrainSlopes%1$s of %2$sThe route will be recalculated if the distance from the route to the current location is more than selected value.
@@ -721,11 +713,7 @@
Cannot start text-to-speech engine.OSM editsButton showing or hiding contour lines on the map.
- Show contour lines
- Hide contour linesA button to show or hide hillshades on the map.
- Show hillshade
- Hide hillshadeYou can apply this change to all or only the selected profile.SharedPrefer unpaved roads
@@ -1113,8 +1101,6 @@
Show moreDisplayed tracksA button to show or hide selected tracks on the map.
- Hide Tracks
- Show TracksPlease set the destination firstPrevious routeAdd home
@@ -1524,8 +1510,6 @@
Increase search radiusNothing foundChange the search or increase its radius.
- Show OSM notes
- Hide OSM notesButton to show or hide OSM notes on the map.Sorted by distanceSearch in Favorites
@@ -4007,8 +3991,6 @@
Quick action name duplicateA toggle to show or hide the Favorite points on the map.A toggle to show or hide POIs on the map.
- Show Favorites
- Hide FavoritesShow %1$sHide %1$sAdd a category
diff --git a/OsmAnd/src/net/osmand/plus/osmedit/ShowHideOSMBugAction.java b/OsmAnd/src/net/osmand/plus/osmedit/ShowHideOSMBugAction.java
index a50d53f7d5..5d2ed59049 100644
--- a/OsmAnd/src/net/osmand/plus/osmedit/ShowHideOSMBugAction.java
+++ b/OsmAnd/src/net/osmand/plus/osmedit/ShowHideOSMBugAction.java
@@ -16,7 +16,7 @@ public class ShowHideOSMBugAction extends QuickAction {
public static final QuickActionType TYPE = new QuickActionType(24,
"osmbug.showhide", ShowHideOSMBugAction.class)
- .nameActionRes(R.string.quick_action_showhide_title)
+ .nameActionRes(R.string.quick_action_show_hide_title)
.nameRes(R.string.osm_notes).iconRes(R.drawable.ic_action_osm_note).nonEditable()
.category(QuickActionType.CONFIGURE_MAP);
@@ -55,10 +55,9 @@ public class ShowHideOSMBugAction extends QuickAction {
@Override
public String getActionText(OsmandApplication application) {
-
- return application.getSettings().SHOW_OSM_BUGS.get()
- ? application.getString(R.string.quick_action_osmbugs_hide)
- : application.getString(R.string.quick_action_osmbugs_show);
+ String nameRes = application.getString(getNameRes());
+ String actionName = isActionWithSlash(application) ? application.getString(R.string.shared_string_hide) : application.getString(R.string.shared_string_show);
+ return application.getString(R.string.ltr_or_rtl_combine_via_dash, actionName, nameRes);
}
@Override
diff --git a/OsmAnd/src/net/osmand/plus/quickaction/CreateEditActionDialog.java b/OsmAnd/src/net/osmand/plus/quickaction/CreateEditActionDialog.java
index 81476161f9..abb8ff3210 100644
--- a/OsmAnd/src/net/osmand/plus/quickaction/CreateEditActionDialog.java
+++ b/OsmAnd/src/net/osmand/plus/quickaction/CreateEditActionDialog.java
@@ -221,7 +221,15 @@ public class CreateEditActionDialog extends DialogFragment
name.setEnabled(action.isActionEditable());
action.setAutoGeneratedTitle(name);
- if (savedInstanceState == null) name.setText(action.getName(getContext()));
+ String actionName = getString(R.string.quick_action_show_hide_title);
+ String resName = action.getName(getContext());
+ if (savedInstanceState == null) {
+ if (action.getActionNameRes() != 0) {
+ name.setText(getString(R.string.ltr_or_rtl_combine_via_dash, actionName, resName));
+ } else {
+ name.setText(action.getName(getContext()));
+ }
+ }
else action.setName(name.getText().toString());
image.setImageResource(action.getIconRes(getApplication()));
diff --git a/OsmAnd/src/net/osmand/plus/quickaction/QuickAction.java b/OsmAnd/src/net/osmand/plus/quickaction/QuickAction.java
index c2e73cdc1b..dafbbbac49 100644
--- a/OsmAnd/src/net/osmand/plus/quickaction/QuickAction.java
+++ b/OsmAnd/src/net/osmand/plus/quickaction/QuickAction.java
@@ -48,6 +48,10 @@ public class QuickAction {
return actionType == null ? 0 : actionType.getNameRes();
}
+ public int getActionNameRes() {
+ return actionType == null ? 0 : actionType.getActionNameRes();
+ }
+
public int getIconRes() {
return actionType == null ? 0 : actionType.getIconRes();
}
diff --git a/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHideCoordinatesWidgetAction.java b/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHideCoordinatesWidgetAction.java
index f1a450d09e..225fe3b0e3 100644
--- a/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHideCoordinatesWidgetAction.java
+++ b/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHideCoordinatesWidgetAction.java
@@ -14,7 +14,7 @@ import net.osmand.plus.quickaction.QuickActionType;
public class ShowHideCoordinatesWidgetAction extends QuickAction {
public static final QuickActionType TYPE = new QuickActionType(35,
"coordinates.showhide", ShowHideCoordinatesWidgetAction.class)
- .nameActionRes(R.string.quick_action_showhide_title)
+ .nameActionRes(R.string.quick_action_show_hide_title)
.nameRes(R.string.coordinates_widget)
.iconRes(R.drawable.ic_action_coordinates_widget).nonEditable()
.category(QuickActionType.CONFIGURE_SCREEN);
@@ -50,10 +50,9 @@ public class ShowHideCoordinatesWidgetAction extends QuickAction {
@Override
public String getActionText(OsmandApplication application) {
-
- return application.getSettings().SHOW_COORDINATES_WIDGET.get()
- ? application.getString(R.string.quick_action_coordinates_widget_hide)
- : application.getString(R.string.quick_action_coordinates_widget_show);
+ String nameRes = application.getString(getNameRes());
+ String actionName = isActionWithSlash(application) ? application.getString(R.string.shared_string_hide) : application.getString(R.string.shared_string_show);
+ return application.getString(R.string.ltr_or_rtl_combine_via_dash, actionName, nameRes);
}
@Override
diff --git a/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHideFavoritesAction.java b/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHideFavoritesAction.java
index 3393af785e..019c27dc07 100644
--- a/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHideFavoritesAction.java
+++ b/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHideFavoritesAction.java
@@ -15,7 +15,7 @@ public class ShowHideFavoritesAction extends QuickAction {
public static final QuickActionType TYPE = new QuickActionType(4,
"favorites.showhide", ShowHideFavoritesAction.class)
- .nameActionRes(R.string.quick_action_showhide_title)
+ .nameActionRes(R.string.quick_action_show_hide_title)
.nameRes(R.string.shared_string_favorites)
.iconRes(R.drawable.ic_action_favorite).nonEditable()
.category(QuickActionType.CONFIGURE_MAP);
@@ -51,10 +51,9 @@ public class ShowHideFavoritesAction extends QuickAction {
@Override
public String getActionText(OsmandApplication application) {
-
- return application.getSettings().SHOW_FAVORITES.get()
- ? application.getString(R.string.quick_action_favorites_hide)
- : application.getString(R.string.quick_action_favorites_show);
+ String nameRes = application.getString(getNameRes());
+ String actionName = isActionWithSlash(application) ? application.getString(R.string.shared_string_hide) : application.getString(R.string.shared_string_show);
+ return application.getString(R.string.ltr_or_rtl_combine_via_dash, actionName, nameRes);
}
@Override
diff --git a/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHideGpxTracksAction.java b/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHideGpxTracksAction.java
index 1e67f1a6ac..49fb552e9f 100644
--- a/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHideGpxTracksAction.java
+++ b/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHideGpxTracksAction.java
@@ -17,7 +17,7 @@ public class ShowHideGpxTracksAction extends QuickAction {
public static final QuickActionType TYPE = new QuickActionType(28,
"gpx.showhide", ShowHideGpxTracksAction.class)
- .nameActionRes(R.string.quick_action_showhide_title)
+ .nameActionRes(R.string.quick_action_show_hide_title)
.nameRes(R.string.show_gpx).iconRes(R.drawable.ic_action_polygom_dark).nonEditable()
.category(QuickActionType.CONFIGURE_MAP);
@@ -54,9 +54,9 @@ public class ShowHideGpxTracksAction extends QuickAction {
@Override
public String getActionText(OsmandApplication application) {
- return application.getSelectedGpxHelper().isShowingAnyGpxFiles()
- ? application.getString(R.string.quick_action_gpx_tracks_hide)
- : application.getString(R.string.quick_action_gpx_tracks_show);
+ String nameRes = application.getString(getNameRes());
+ String actionName = isActionWithSlash(application) ? application.getString(R.string.shared_string_hide) : application.getString(R.string.shared_string_show);
+ return application.getString(R.string.ltr_or_rtl_combine_via_dash, actionName, nameRes);
}
@Override
diff --git a/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHideMapillaryAction.java b/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHideMapillaryAction.java
index 709d589537..82fa73be91 100644
--- a/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHideMapillaryAction.java
+++ b/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHideMapillaryAction.java
@@ -18,7 +18,7 @@ public class ShowHideMapillaryAction extends QuickAction {
public static final QuickActionType TYPE = new QuickActionType(33,
"mapillary.showhide", ShowHideMapillaryAction.class)
- .nameActionRes(R.string.quick_action_showhide_title)
+ .nameActionRes(R.string.quick_action_show_hide_title)
.nameRes(R.string.mapillary)
.iconRes(R.drawable.ic_action_mapillary).nonEditable()
.category(QuickActionType.CONFIGURE_MAP);
@@ -57,10 +57,9 @@ public class ShowHideMapillaryAction extends QuickAction {
@Override
public String getActionText(OsmandApplication application) {
-
- return application.getSettings().SHOW_MAPILLARY.get()
- ? application.getString(R.string.quick_action_mapillary_hide)
- : application.getString(R.string.quick_action_mapillary_show);
+ String nameRes = application.getString(getNameRes());
+ String actionName = isActionWithSlash(application) ? application.getString(R.string.shared_string_hide) : application.getString(R.string.shared_string_show);
+ return application.getString(R.string.ltr_or_rtl_combine_via_dash, actionName, nameRes);
}
@Override
diff --git a/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHidePoiAction.java b/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHidePoiAction.java
index 735b9efdc1..742045809c 100644
--- a/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHidePoiAction.java
+++ b/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHidePoiAction.java
@@ -38,7 +38,7 @@ public class ShowHidePoiAction extends QuickAction {
public static final QuickActionType TYPE = new QuickActionType(5,
"poi.showhide", ShowHidePoiAction.class)
- .nameActionRes(R.string.quick_action_showhide_title)
+ .nameActionRes(R.string.quick_action_show_hide_title)
.nameRes(R.string.poi)
.iconRes(R.drawable.ic_action_info_dark)
.category(QuickActionType.CONFIGURE_MAP);
@@ -57,10 +57,8 @@ public class ShowHidePoiAction extends QuickAction {
@Override
public String getActionText(OsmandApplication application) {
-
- return !isCurrentFilters(application)
- ? application.getString(R.string.quick_action_poi_show, getName(application))
- : application.getString(R.string.quick_action_poi_hide, getName(application));
+ String actionName = isActionWithSlash(application) ? application.getString(R.string.shared_string_hide) : application.getString(R.string.shared_string_show);
+ return application.getString(R.string.ltr_or_rtl_combine_via_dash, actionName, getName(application));
}
@Override
diff --git a/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHideTransportLinesAction.java b/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHideTransportLinesAction.java
index d4c6bd0788..2e4dd985ed 100644
--- a/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHideTransportLinesAction.java
+++ b/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHideTransportLinesAction.java
@@ -16,7 +16,7 @@ public class ShowHideTransportLinesAction extends QuickAction {
public static final QuickActionType TYPE = new QuickActionType(31,
"transport.showhide", ShowHideTransportLinesAction.class)
- .nameActionRes(R.string.quick_action_showhide_title)
+ .nameActionRes(R.string.quick_action_show_hide_title)
.nameRes(R.string.poi_filter_public_transport)
.iconRes(R.drawable.ic_action_transport_bus).nonEditable()
.category(QuickActionType.CONFIGURE_MAP);
@@ -49,10 +49,9 @@ public class ShowHideTransportLinesAction extends QuickAction {
@Override
public String getActionText(OsmandApplication application) {
-
- return TransportLinesMenu.isShowLines(application)
- ? application.getString(R.string.quick_action_transport_hide)
- : application.getString(R.string.quick_action_transport_show);
+ String nameRes = application.getString(getNameRes());
+ String actionName = isActionWithSlash(application) ? application.getString(R.string.shared_string_hide) : application.getString(R.string.shared_string_show);
+ return application.getString(R.string.ltr_or_rtl_combine_via_dash, actionName, nameRes);
}
@Override
diff --git a/OsmAnd/src/net/osmand/plus/srtmplugin/ContourLinesAction.java b/OsmAnd/src/net/osmand/plus/srtmplugin/ContourLinesAction.java
index 0a67a3cfb0..13210ed6fc 100644
--- a/OsmAnd/src/net/osmand/plus/srtmplugin/ContourLinesAction.java
+++ b/OsmAnd/src/net/osmand/plus/srtmplugin/ContourLinesAction.java
@@ -22,7 +22,7 @@ public class ContourLinesAction extends QuickAction {
public static final QuickActionType TYPE = new QuickActionType(29,
"contourlines.showhide", ContourLinesAction.class)
- .nameActionRes(R.string.quick_action_showhide_title)
+ .nameActionRes(R.string.quick_action_show_hide_title)
.nameRes(R.string.srtm_plugin_name).iconRes(R.drawable.ic_plugin_srtm).nonEditable()
.category(QuickActionType.CONFIGURE_MAP);
@@ -73,8 +73,14 @@ public class ContourLinesAction extends QuickAction {
}
@Override
- public String getActionText(OsmandApplication app) {
- return SRTMPlugin.isContourLinesLayerEnabled(app) ? app.getString(R.string.quick_action_contour_lines_hide)
- : app.getString(R.string.quick_action_contour_lines_show);
+ public String getActionText(OsmandApplication application) {
+ String nameRes = application.getString(getNameRes());
+ String actionName = isActionWithSlash(application) ? application.getString(R.string.shared_string_hide) : application.getString(R.string.shared_string_show);
+ return application.getString(R.string.ltr_or_rtl_combine_via_dash, actionName, nameRes);
+ }
+
+ @Override
+ public boolean isActionWithSlash(OsmandApplication application) {
+ return SRTMPlugin.isContourLinesLayerEnabled(application);
}
}
\ No newline at end of file
diff --git a/OsmAnd/src/net/osmand/plus/srtmplugin/TerrainAction.java b/OsmAnd/src/net/osmand/plus/srtmplugin/TerrainAction.java
index 988f6a5782..61d09399e2 100644
--- a/OsmAnd/src/net/osmand/plus/srtmplugin/TerrainAction.java
+++ b/OsmAnd/src/net/osmand/plus/srtmplugin/TerrainAction.java
@@ -16,7 +16,7 @@ import net.osmand.plus.quickaction.QuickActionType;
public class TerrainAction extends QuickAction {
public static final QuickActionType TYPE = new QuickActionType(30,
- "terrain.showhide", TerrainAction.class).nameActionRes(R.string.quick_action_showhide_title).
+ "terrain.showhide", TerrainAction.class).nameActionRes(R.string.quick_action_show_hide_title).
nameRes(R.string.shared_string_terrain).iconRes(R.drawable.ic_action_hillshade_dark).nonEditable().
category(QuickActionType.CONFIGURE_MAP);
@@ -62,7 +62,13 @@ public class TerrainAction extends QuickAction {
@Override
public String getActionText(OsmandApplication application) {
- return application.getSettings().TERRAIN.get() ? application.getString(R.string.quick_action_terrain_hide)
- : application.getString(R.string.quick_action_terrain_show);
+ String nameRes = application.getString(getNameRes());
+ String actionName = isActionWithSlash(application) ? application.getString(R.string.shared_string_hide) : application.getString(R.string.shared_string_show);
+ return application.getString(R.string.ltr_or_rtl_combine_via_dash, actionName, nameRes);
+ }
+
+ @Override
+ public boolean isActionWithSlash(OsmandApplication application) {
+ return application.getSettings().TERRAIN.get();
}
}
From ae1868c1f6440688774d88faf9c72d1ed85d22d3 Mon Sep 17 00:00:00 2001
From: Vitaliy
Date: Tue, 9 Mar 2021 01:50:35 +0200
Subject: [PATCH 31/34] Small fix for action name
---
.../quickaction/CreateEditActionDialog.java | 25 +++++++++----------
1 file changed, 12 insertions(+), 13 deletions(-)
diff --git a/OsmAnd/src/net/osmand/plus/quickaction/CreateEditActionDialog.java b/OsmAnd/src/net/osmand/plus/quickaction/CreateEditActionDialog.java
index abb8ff3210..819c0b9b77 100644
--- a/OsmAnd/src/net/osmand/plus/quickaction/CreateEditActionDialog.java
+++ b/OsmAnd/src/net/osmand/plus/quickaction/CreateEditActionDialog.java
@@ -197,13 +197,12 @@ public class CreateEditActionDialog extends DialogFragment
}
private void setupHeader(View root, Bundle savedInstanceState){
-
ImageView image = (ImageView) root.findViewById(R.id.image);
- EditText name = (EditText) root.findViewById(R.id.name);
+ EditText nameEditText = (EditText) root.findViewById(R.id.name);
int buttonsAndLinksTextColorResId = isLightContent ? R.color.active_buttons_and_links_text_light : R.color.active_buttons_and_links_text_dark;
- name.setTextColor(ContextCompat.getColor(getContext(), buttonsAndLinksTextColorResId));
+ nameEditText.setTextColor(ContextCompat.getColor(getContext(), buttonsAndLinksTextColorResId));
- name.addTextChangedListener(new TextWatcher() {
+ nameEditText.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
}
@@ -218,20 +217,20 @@ public class CreateEditActionDialog extends DialogFragment
}
});
- name.setEnabled(action.isActionEditable());
- action.setAutoGeneratedTitle(name);
+ nameEditText.setEnabled(action.isActionEditable());
+ action.setAutoGeneratedTitle(nameEditText);
- String actionName = getString(R.string.quick_action_show_hide_title);
- String resName = action.getName(getContext());
if (savedInstanceState == null) {
+ String name = action.getName(getContext());
if (action.getActionNameRes() != 0) {
- name.setText(getString(R.string.ltr_or_rtl_combine_via_dash, actionName, resName));
+ String actionName = getString(action.getActionNameRes());
+ nameEditText.setText(getString(R.string.ltr_or_rtl_combine_via_dash, actionName, name));
} else {
- name.setText(action.getName(getContext()));
+ nameEditText.setText(name);
}
- }
- else action.setName(name.getText().toString());
-
+ } else {
+ action.setName(nameEditText.getText().toString());
+ }
image.setImageResource(action.getIconRes(getApplication()));
}
From 67382d777c5cb0a813febd829658c87f4d8af896 Mon Sep 17 00:00:00 2001
From: nazar-kutz
Date: Tue, 9 Mar 2021 10:08:09 +0200
Subject: [PATCH 32/34] Polish realization
---
.../main/java/net/osmand/map/WorldRegion.java | 15 ++-----
.../main/java/net/osmand/util/Algorithms.java | 41 +++++++------------
2 files changed, 19 insertions(+), 37 deletions(-)
diff --git a/OsmAnd-java/src/main/java/net/osmand/map/WorldRegion.java b/OsmAnd-java/src/main/java/net/osmand/map/WorldRegion.java
index b1be29d5fa..e3b2aa2a69 100644
--- a/OsmAnd-java/src/main/java/net/osmand/map/WorldRegion.java
+++ b/OsmAnd-java/src/main/java/net/osmand/map/WorldRegion.java
@@ -3,7 +3,6 @@ package net.osmand.map;
import net.osmand.data.LatLon;
import net.osmand.data.QuadRect;
import net.osmand.util.Algorithms;
-import net.osmand.util.Algorithms.Point2D;
import java.io.Serializable;
import java.util.LinkedList;
@@ -196,19 +195,13 @@ public class WorldRegion implements Serializable {
}
private boolean containsBoundingBox(QuadRect rectangle) {
- if (boundingBox != null && rectangle != null) {
- return boundingBox.contains(rectangle);
- }
- return false;
+ return (boundingBox != null && rectangle != null) &&
+ boundingBox.contains(rectangle);
}
private boolean containsPolygon(List another) {
- if (polygon != null && another != null) {
- Point2D[] inner = Algorithms.createPoint2DArrayFromLatLon(polygon);
- Point2D[] outer = Algorithms.createPoint2DArrayFromLatLon(another);
- return Algorithms.isFirstPolygonInsideTheSecond(outer, inner);
- }
- return false;
+ return (polygon != null && another != null) &&
+ Algorithms.isFirstPolygonInsideSecond(another, polygon);
}
public boolean isContinent() {
diff --git a/OsmAnd-java/src/main/java/net/osmand/util/Algorithms.java b/OsmAnd-java/src/main/java/net/osmand/util/Algorithms.java
index b539ca8363..a8069ce9da 100644
--- a/OsmAnd-java/src/main/java/net/osmand/util/Algorithms.java
+++ b/OsmAnd-java/src/main/java/net/osmand/util/Algorithms.java
@@ -119,26 +119,10 @@ public class Algorithms {
return def;
}
- public static class Point2D {
- public double x;
- public double y;
- }
-
- public static Point2D[] createPoint2DArrayFromLatLon(List latLons) {
- Point2D[] array = new Point2D[latLons.size()];
- for (int i = 0; i < array.length; i++) {
- Point2D point = new Point2D();
- point.x = latLons.get(i).getLatitude();
- point.y = latLons.get(i).getLongitude();
- array[i] = point;
- }
- return array;
- }
-
- public static boolean isFirstPolygonInsideTheSecond(Point2D[] first,
- Point2D[] second) {
- for (Point2D point : first) {
- if (!isPointInsideTheBoundary(point, second)) {
+ public static boolean isFirstPolygonInsideSecond(List firstPolygon,
+ List secondPolygon) {
+ for (LatLon point : firstPolygon) {
+ if (!isPointInsidePolygon(point, secondPolygon)) {
// if at least one point is not inside the boundary, return false
return false;
}
@@ -146,13 +130,18 @@ public class Algorithms {
return true;
}
- public static boolean isPointInsideTheBoundary(Point2D point,
- Point2D[] polygon) {
+ public static boolean isPointInsidePolygon(LatLon point,
+ List polygon) {
+ double pointX = point.getLongitude();
+ double pointY = point.getLatitude();
boolean result = false;
- for (int i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {
- if ((polygon[i].y > point.y) != (polygon[j].y > point.y)
- && (point.x < (polygon[j].x - polygon[i].x) * (point.y - polygon[i].y) /
- (polygon[j].y-polygon[i].y) + polygon[i].x)) {
+ for (int i = 0, j = polygon.size() - 1; i < polygon.size(); j = i++) {
+ double x1 = polygon.get(i).getLongitude();
+ double y1 = polygon.get(i).getLatitude();
+ double x2 = polygon.get(j).getLongitude();
+ double y2 = polygon.get(j).getLatitude();
+ if ((y1 > pointY) != (y2 > pointY)
+ && (pointX < (x2 - x1) * (pointY - y1) / (y2-y1) + x1)) {
result = !result;
}
}
From 693816c7010548db99cfbddf06b2f799fee8be30 Mon Sep 17 00:00:00 2001
From: xmd5a
Date: Tue, 9 Mar 2021 12:12:09 +0300
Subject: [PATCH 33/34] Add phrase
---
OsmAnd/res/values/phrases.xml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/OsmAnd/res/values/phrases.xml b/OsmAnd/res/values/phrases.xml
index 53138bcc18..a15dd99721 100644
--- a/OsmAnd/res/values/phrases.xml
+++ b/OsmAnd/res/values/phrases.xml
@@ -4345,4 +4345,6 @@
Conference centreGeodesist
+ Local ref
+
From fe1fda65ff8eae39ef96ea2ca36194577cb801d1 Mon Sep 17 00:00:00 2001
From: xmd5a
Date: Tue, 9 Mar 2021 12:27:04 +0300
Subject: [PATCH 34/34] Fix
---
OsmAnd/res/values/phrases.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/OsmAnd/res/values/phrases.xml b/OsmAnd/res/values/phrases.xml
index a15dd99721..675077e65c 100644
--- a/OsmAnd/res/values/phrases.xml
+++ b/OsmAnd/res/values/phrases.xml
@@ -4345,6 +4345,6 @@
Conference centreGeodesist
- Local ref
+ Local ref