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ət Kateqoriya əlavə et @@ -752,8 +750,6 @@ Xəritə stilləri Axtarış radiusunu artır Axtarış sorğusunu dəyişin və ya axtarış radiusunu artırın. - OSM qeydlərini göstər - OSM qeydlərini gizlət Bu 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ırala Favoritlərdə axtar @@ -2149,8 +2145,6 @@ Sil ton metr - Mapillary-ni gizlət - Mapillary-ni göstər %1$s silindi Sil və yenidən başlat Vikipediya 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šuku Ničoha nie znojdziena Źmianicie pošukavy zapyt abo pavialičcie radyus pošuku. - Pakazać OSM-natatki - Schavać OSM-natatki Nacisk na hetuju knopku pakaža ci schavaje OSM-natatki na mapie. Adsartavana pa adlehłaści Pošuk upadabanych @@ -2155,8 +2153,6 @@ Praparcyjnaj pamiacі %4$s MB (Abmiežavańnie Android %5$s MB, Dalvik %6$s MB). Ukliučyć Holas Dadać pieršy pramiežkavy punkt Pakazać pramiežkavy dyjaloh - Pakazać upadabanyja - Schavać upadabanyja Pakazać %1$s Schavać %1$s Dadać 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 sliady Nacisk na knopku dziejannia pakaža ci schavaje abranyja GPX-sliady na mapie - Schavać GPX-sliady - Pakazać GPX-sliady Spačatku dadajcie punkt pryznačennia Papiaredni maršrut Dadać 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ědk Změń pytanje abo powjetš jeho radius. - OSM-noticy pokazać - OSM-noticy schować Sortěrowane po zdalenosći W 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 relief Profil eksportować OsmAnd-profil: %1$s Profil \'%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$S Sken %1$S - Inurifen - Sken inurifen Kkes tigawt Tigawt Taɣ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 akal Taqeffalt i uskan neɣ tuffra n tissi n wakal n tkarḍa. Kkes aglam Fren 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à duplicat Un 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 Preferits Mostra %1$s Amaga %1$s Afegeix 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 OSM Botó que mostra o amaga notes OSM al mapa. Ordenat per distància Cerca a Preferits @@ -2837,8 +2833,6 @@ Tipus de carretera Sortida a Un botó per mostrar o amagar les traces seleccionades al mapa. - Amaga les traces - Mostra les traces Pugeu a la parada Activa 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 OSM Botó per a mostrar o amagar les corbes de nivell en el mapa. - Mostra les corbes de nivell - Amaga les corbes de nivell Botó per a mostrar o amagar l\'ombrejat de relleu al mapa. - Mostra l\'ombrejat de relleu - Amaga l\'ombrejat de relleu No 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 terreny Ombrejat del relleu Llegenda Nivells 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 Mapillary Un 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 Live Compres OsmAnd Perfils de navegació - Amaga el transport públic Botó que mostra o oculta el transport públic al mapa. Crea o edita PDI Posicions 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úblic Afegeix un perfil Canvia 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é akce Tlačí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ísta Zobrazit %1$s Skrýt %1$s Přidat kategorii @@ -2225,8 +2223,6 @@ Zadat cíl Nahradit cíl Přidat první mezicíl - Zobrazit OSM poznámky - Skrýt OSM poznámky Tlačítko pro zobrazení nebo skrytí OpenStreetMap poznámek na mapě. Seřazeno podle vzdálenosti Hledat v Oblíbených @@ -2841,8 +2837,6 @@ Výjezd na Vyměnit Tlačí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ý bod Př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$s Svahy - Skrýt terén - Zobrazit terén Tlačítko pro zobrazení nebo skrytí vrstvy terénu na mapě. Smazat popis Přidat popis @@ -3454,8 +3446,6 @@ Video poznámky Nastavte 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 Mapillary Př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 menu Nastavení uživatelského rozhraní Úvodní panel - Skrýt veřejnou dopravu - Zobrazit veřejnou dopravu Tlačítko pro zobrazení nebo skrytí veřejné dopravy na mapě. Vytvořit nebo upravit bod zájmu Parkovací 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 vrstevnice Tlačí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 genvejsnavn En 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 Favoritter Vis %1$s Skjul %1$s Tilføj en kategori @@ -2392,8 +2390,6 @@ Skjul fra zoom-niveau Sorteret efter afstand Søg i Favoritter - Vis OSM-noter - Skjul OSM-noter Knap til at vise eller skjule OSM-noter på kortet. Start søgning igen Øg søgeradius @@ -2847,8 +2843,6 @@ Stå af ved Stig på ved stoppested En knap til at vise eller skjule valgte GPX-spor på kortet. - Skjul GPX spor - Vis GPX spor Angiv en destination først Aktivér offentlig transport for OsmAnd Live ændringer. OsmAnd Live offentlig transport @@ -3263,11 +3257,7 @@ Foretræk ikke-asfalterede veje fremfor asfalterede veje. OSM redigeringer Knap der viser eller skjuler højdekurver på kortet. - Vis højdekurver - Skjul højdekurver En knap der viser eller skjuler reliefskygger på kortet. - Vis reliefskygger - Skjul reliefskygger Hvid Tekst-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$s Skråninger - Skjul terræn - Vis terræn En knap der viser eller skjuler terrænlag på kortet. Slet beskrivelse Tilføj beskrivelse @@ -3553,8 +3541,6 @@ Navigationsprofiler OsmAnd Tracker OsmAnd køb - Skjul offentlig transport - Vis offentlig transport En knap til at vise eller skjule offentlig transport på kortet. Opret/rediger IP Parkeringsplads @@ -3598,8 +3584,6 @@ Vis eller skjul yderligere kort-detaljer Natkort Tilføj onlinekilde - Skjul Mapillary - Vis Mapillary Slet næste destinationspunkt Lydstyrkeknapper som zoom Angiv 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ügen Die Kartenquelle wurde in „%s“ geändert. Schaltflächenposition ändern - Favoriten anzeigen - Favoriten ausblenden Kategorie, in der der Favorit gespeichert werden soll: Wählen Sie eine beliebige Kategorie. Schnellaktion @@ -2384,8 +2382,6 @@ Privatzugang erlauben Zugang zu Privatgrund erlauben. Farbschema - OSM-Hinweise einblenden - OSM-Hinweise ausblenden Schaltfläche zum Ein- oder Ausblenden von OSM-Hinweisen auf der Karte. Nach Entfernung sortiert In Favoriten suchen @@ -2851,8 +2847,6 @@ Schritt für Schritt Straßentypen Eine Schaltfläche zum Ein- oder Ausblenden ausgewählter Tracks auf der Karte. - Tracks ausblenden - Tracks einblenden Aussteigen bei Zusteigen an Haltestelle Aktivierung von OsmAnd Live für Änderungen bei öffentlichen Verkehrsmitteln. @@ -3267,11 +3261,7 @@ Bei der Navigation unbefestigte Straßen gegenüber befestigten bevorzugen. OSM-Bearbeitungen Schaltfläche zum Ein- und Ausblenden von Höhenlinien auf der Karte. - Höhenlinien anzeigen - Höhenlinien ausblenden Schaltfläche zum Ein- oder Ausblenden der Reliefdarstellung. - Relief anzeigen - Relief ausblenden Text-to-Speech-Engine kann nicht gestartet werden. Simulation Ihrer Position mit einem aufgezeichneten GPX-Track. Profil exportieren @@ -3490,8 +3480,6 @@ Beschreibung hinzufügen Beschreibung löschen Eine Schaltfläche zum Ein- und Ausblenden der Geländeebene auf der Karte. - Gelände einblenden - Gelände ausblenden Relief Zoomstufen Transparenz @@ -3607,8 +3595,6 @@ \n Fortfahren Sie können auf diese Aktionen zugreifen, indem Sie auf die Schaltfläche \"%1$s\" tippen. - Öffentliche Verkehrsmittel ausblenden - Öffentliche Verkehrsmittel anzeigen Schaltfläche zum Ein- oder Ausblenden der öffentlichen Verkehrsmittel auf der Karte. POI erstellen oder bearbeiten Parkpositionen @@ -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 anzeigen Eine Umschaltfläche zum Ein- oder Ausblenden des Mapillary-Layers auf der Karte. Blitzer deinstallieren Rechtliches 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 Favourites Category to save the Favourite in: Analyse on map You 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 ago Butono por montri/kaŝi ŝatatajn ejojn sur la mapo. Butono por montri/kaŝi interesejojn sur la mapo. - Montri ŝatatajn - Kaŝi ŝatatajn Montri %1$s Kaŝi %1$s Aldoni kategorion @@ -2384,8 +2382,6 @@ Kaŝi komence de skal‑nivelo Ordigitaj laŭ distanco Serĉi en ŝatataj - Montri OSM-rimarkojn - Kaŝi OSM-rimarkojn Butono por montri/kaŝi OSM‑rimarkojn sur la mapo. Rekomenci serĉon Pliigi serĉan radiuson @@ -2840,8 +2836,6 @@ Eliru ĉe Atendu ĉe haltejo Butono por montri/kaŝi elektitajn spurojn sur la mapo. - Kaŝi spurojn - Montri spurojn Aktivigi publikan transporton por ŝanĝoj OsmAnd Live. Publika transporto OsmAnd Live Pliaj informoj pri kiel OsmAnd difinas kursojn estas legeblaj ĉe nia taglibro. @@ -3257,11 +3251,7 @@ Preferi vojojn sen firma pavimo. OSM‑redaktoj Butono por montri/kaŝi nivelkurbojn sur la mapo. - Montri nivelkurbojn - Kaŝi nivelkurbojn Butono por montri/kaŝi nivelombrumon (reliefon) sur la mapo. - Montri nivelombrumon - Kaŝi nivelombrumon Antaŭ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 @@ Mapklarigo Nivelombrumo %1$s el %2$s - Kaŝi teren‑formon - Montri teren‑formon Butono por montri/kaŝi tavolon de formo de tereno sur la mapo. Forigi priskribon Aldoni priskribon @@ -3601,8 +3589,6 @@ \n \n Vi povas ekigi tiujn agojn per frapeti la butonon “%1$s”. - Kaŝi publikan transporton - Montri publikan transporton Butono por montri/kaŝi publikan transporton sur la mapo. Krei aŭ redakti interesejon Aldoni 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 rapidkontroliloj Leĝ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 duplicado Un 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 Favoritos Mostrar %1$s Ocultar %1$s Añ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 OSM Un botón que muestra u oculta las notas de OSM en el mapa. Ordenados por distancia Buscar en Favoritos @@ -2844,8 +2840,6 @@ Bajar en Esperar en la parada Un botón que muestra u oculta las trazas elegidas en el mapa. - Ocultar trazas - Mostrar trazas Activar 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 OSM Un botón que muestra u oculta las curvas de nivel en el mapa. - Mostrar curvas de nivel - Ocultar curvas de nivel Un botón que muestra u oculta el sombreado de las colinas en el mapa. - Mostrar el sombreado - Ocultar el sombreado Imposible 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. Sombreado Pendientes - Ocultar terreno - Mostrar terreno Un botón que muestra u oculta la capa del terreno en el mapa. Borrar descripción Añ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úblico Botón que muestra u oculta el transporte público en el mapa. Crear o editar PDI Puestos de estacionamiento @@ -3689,8 +3675,6 @@ Legal Mantener Desinstalar - Ocultar Mapillary - Mostrar Mapillary Un 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 duplicado Un 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 Favoritos Mostrar %1$s Ocultar %1$s Añ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 OSM Un botón que muestra u oculta las notas de OSM en el mapa. Ordenados por distancia Buscar en Favoritos @@ -2844,8 +2840,6 @@ Bajar en Esperar en la parada Un botón que muestra u oculta las trazas elegidas en el mapa. - Ocultar trazas - Mostrar trazas Activar 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 OSM Un botón que muestra u oculta las curvas de nivel en el mapa. - Mostrar curvas de nivel - Ocultar curvas de nivel Un botón que muestra u oculta el sombreado de las colinas en el mapa. - Mostrar el sombreado - Ocultar el sombreado Imposible 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$s Pendientes - Ocultar terreno - Mostrar terreno Un botón que muestra u oculta la capa del terreno en el mapa. Borrar descripción Añadir descripción @@ -3605,8 +3593,6 @@ \n Reanudar Puedes acceder a estas acciones pulsando el botón «%1$s». - Ocultar transporte público - Mostrar transporte público Botón que muestra u oculta el transporte público en el mapa. Crear o editar PDI Puestos 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. Mantener Desinstalar - Ocultar Mapillary - Mostrar Mapillary Un 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 duplicado Un 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 Favoritos Mostrar %1$s Ocultar %1$s Añadir una categoría @@ -2380,8 +2378,6 @@ Permite acceder a áreas privadas. Nivel de zoom de pantalla: %1$s Para largas distancias: Añada destinos intermedios si no se encuentra ninguna ruta en 10 minutos. - Mostrar notas de OSM - Ocultar notas de OSM Botón para mostrar u ocultar las notas de OSM en el mapa. Ordenados por distancia Buscar en Favoritos @@ -2841,8 +2837,6 @@ Bajarse en Esperar en la parada Un botón que muestra u oculta las trazas elegidas en el mapa. - Ocultar trazas - Mostrar trazas Activar 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 OSM Un botón que muestra u oculta las curvas de nivel en el mapa. - Mostrar curvas de nivel - Ocultar curvas de nivel Un botón que muestra u oculta la sombra de una colina en el mapa. - Mostrar el sombreado - Ocultar el sombreado Imposible iniciar el motor de habla sintetizada. Exportar perfil Perfil de OsmAnd: %1$s @@ -3458,8 +3448,6 @@ Recalcular ruta en caso de desvío %1$s de %2$s Cuestas - Esconder terreno - Mostrar terreno Un botón para mostrar o esconder una capa de terreno en el mapa. Borra descripción Añade descripción @@ -3506,8 +3494,6 @@ Marcadores de mapa Favoritos Perfiles de navegación - Ocultar transporte público - Mostrar transporte público Crear o editar POI Agregar o editar Favorito Agregar 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 Mapillary Un 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 Notes Täname sind tagasiside eest Sõlme või teed ei leidunud. Otsingutulemused puuduvad\? @@ -601,8 +599,6 @@ Välju Sisene peatuses Nupp valitud radade kaardil kuvamiseks või peitmiseks. - Peida rajad - Kuva rajad Palun määra esmalt sihtkoht Luba ühistransport OsmAnd Live muudatustele. OsmAnd Live ühistransport @@ -989,11 +985,7 @@ Teekonna koostamisel eelista katteta teid pinnatud teedele. OSM muudatused Nupp kõrgusjoonte kuvamiseks või peitmiseks kaardil. - Kuva kõrgusjooned - Peida kõrgusjooned Nupp künkavarjutuste kuvamiseks või peitmiseks kaardil. - Kuva künkavarjutus - Peida künkavarjutus Kõnesünteesi mootorit ei saa käivitada. Ekspordi profiil OsmAnd profiil: %1$s @@ -3123,8 +3115,6 @@ Koht Dubleerimise vältimiseks nimetati kiirtegevus ümber %1$s. Kiirtegevuse nime duplikaat - Kuva lemmikud - Peida lemmikud Kuva %1$s Peida %1$s Lisa kategooria @@ -3435,8 +3425,6 @@ Teekonna ümberarvutus, kui kaugus teekonnast praegusesse asukohta on suurem valitud väärtusest. %1$s %2$s-st Nõlvad - Peida maastik - Kuva maastik Nupp maastikukihi kuvamiseks või peitmiseks kaardil. Kustuta kirjeldus Lisa kirjeldus @@ -3521,8 +3509,6 @@ Valige kaardil olevad Vikipeedia artiklite keeled. Artikli lugemise ajal kasuta ükskõik millist saadaolevat keelt. %1$s / %2$s Otsi huvipunktide tüüpe - Peida ühistranspordi teave - Näita ühistranspordi teavet Nupp, 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 andmeid Nupp, mis näitab või peidab kaardil Mapillary kihti. Eemalda ja taaskäivita Rulluisud 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$s Pantailaren erdian aparkaleku bat gehitzeko botoia. " hona gorde da: " Tokia - Erakutsi gogokoak - Ezkutatu gogokoak Erakutsi %1$s Ezkutatu %1$s Gehitu kategoria bat @@ -2267,8 +2265,6 @@ Area honi dagokio: %1$s x %2$s Handitu bilaketaren erradioa Ez da ezer aurkitu Aldatu bilaketa edo handitu erradioa. - Erakutsi OSM oharrak - Ezkutatu OSM oharrak Mapan OSM oharrak erakutsi edo ezkutatzeko botoia. Distantziaren arabera ordenatuta Bilatu gogokoetan @@ -2880,8 +2876,6 @@ Area honi dagokio: %1$s x %2$s Eskailera Bidea Zehaztu gabea - Ezkutatu lorratzak - Erakutsi lorratzak Gehitu helburua aurretik Aurreko ibilbidea Graduak @@ -3261,11 +3255,7 @@ Area honi dagokio: %1$s x %2$s Hobetsi asfaltatu gabeko bideak ibilbideetan. OSM edizioak Sestra-kurbak mapan erakusteko edo ezkutatzeko botoia. - Erakutsi sestra-kurbak - Ezkutatu sestra-kurbak Erliebe-itzalak mapan erakutsi edo ezkutatzeko botoia. - Erakutsi erliebe-itzalak - Ezkutatu erliebe-itzalak Ezin 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 deskripzioa Ezabatu deskripzioa Mapako terreno geruza erakutsi edo ezkutatzeko botoia. - Erakutsi terrenoa - Ezkutatu terrenoa Maldak Erliebea Gaitu 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 erosketak Maparen sinbologiari gida. Nabigazio profilak - Ezkutatu garraio publikoa - Erakutsi garraio publikoa OsmAnd aztarnaria Jarraitu Pertsonalizatu \"Tiradera\", \"Konfiguratu mapa\" eta \"Laster-menua\" ataletan dauden elementu kopurua. @@ -3667,8 +3653,6 @@ Area honi dagokio: %1$s x %2$s metro Erakutsi edo ezkutatu maparen xehetasun gehigarriak Gauerako mapa - Ezkutatu Mapillary - Erakutsi Mapillary Egina Ezabatu 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 lista Viesti Konfiguroi kartta - Näytä suosikit - Piilota suosikit Näytä %1$s Piilota %1$s Lisää luokka @@ -2000,8 +1998,6 @@ Jos pidät OsmAndista ja OSMsta ja haluat tukea niitä, on tämä täydellinen t Mapillary Käynnistä haku uudelleen Mitään ei löytynyt - Näytä OSM-huomautukset - Piilota OSM-huomautukset Lajiteltu etäisyyden perusteella Etsi suosikeista Piilota zoomaustasosta @@ -2300,10 +2296,6 @@ Jos pidät OsmAndista ja OSMsta ja haluat tukea niitä, on tämä täydellinen t Oletuksena Jälkien tallennuskansio OSM-muokkaukset - Näytä korkeuskäyrät - Piilota korkeuskäyrät - Näytä rinnevarjostus - Piilota rinnevarjostus Vie profiili OsmAnd 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älki Jäljet Valitse seurattava jälki tiedosto - Piilota GPX jäljet - Näytä GPX jäljet Hiihto Hiihto Hiihto @@ -2596,8 +2586,6 @@ Jos pidät OsmAndista ja OSMsta ja haluat tukea niitä, on tämä täydellinen t Palvelu Hätätapaus Liikenne - Näytä julkinen liikenne - Piilota julkinen liikenne Symbolit Korvaa 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 @@ Emplacement Ce 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 favoris Afficher %1$s Masquer %1$s Ajouter 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 zoom Téléchargez la sur-couche \'Ombrage du relief\' pour mieux visualiser le relief. - Afficher les notes OSM - Masquer les notes OSM Bouton pour afficher ou masquer les notes OSM sur la carte. Trier par distance Rechercher dans les favoris @@ -2831,8 +2827,6 @@ Instructions pas à pas Types de route Sortir à - Masquer les traces - Afficher les traces Activer les modifications de transports publics en temps réel avec OsmAnd Live. Transports publics OsmAnd Live Panneau d\'affichage à l\'arrêt @@ -3249,11 +3243,7 @@ Privilégier les routes non pavées pour l\'itinéraire. Modifications OSM Bouton affichant ou masquant les courbes de niveaux sur la carte. - Afficher les courbes de niveaux - Masquer les courbes de niveaux Bouton affichant ou masquant l\'ombrage du relief sur la carte. - Afficher l\'ombrage du relief - Masquer l\'ombrage du relief Impossible 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 relief Pentes - Masquer le terrain - Afficher le terrain Un bouton pour afficher ou masquer la couche terrain sur la carte. Supprimer la description Ajouter 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 publics Bouton pour afficher ou masquer les transports publics sur la carte. Créer ou modifier un PI Emplacements 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 Mapillary Bouton 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$s Duplicidade do nome da acción rápida Un 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 Favoritos Amosar %1$s Agochar %1$s Engadir unha categoría @@ -2226,8 +2224,6 @@ Lon %2$s Reiniciar procura Aumentar o raio de procura Non se atopou ren - Amosar notas do OSM - Agochar notas do OSM Ordenado por distancia Procurar nos Favoritos Estrada @@ -2851,8 +2847,6 @@ Lon %2$s Amosar máis Pistas amosadas Un botón que amosa ou agocha as pistas escollidas no mapa. - Agochar pistas - Amosar pistas %1$d transferencias Engadir orixe e destino Engadir 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 OSM Un botón que amosa ou agocha as curvas de nivel no mapa. - Amosar curvas de nivel - Agochar curvas de nivel Un botón que amosa ou agocha a sombra dos outeiros no mapa. - Amosar sombreados - Agochar sombreados Non é 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$s Pendentes - Agochar terreo - Amosar terreo Un botón que amosa ou agocha a capa do terreo no mapa. Eliminar descrición Engadir descrición @@ -3612,8 +3600,6 @@ Lon %2$s \n Retomar Podes acceder a estas accións premendo no botón “%1$s”. - Agochar transporte público - Amosar transporte público Botón que amosa ou agocha o transporte público no mapa. Crear ou editar PDI Posició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 Mapillary Un botón para amosar ou agochar a capa do Mapillary no mapa. - Amosar o Mapillary Desinstalar radares de velocidade Legal PDI 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 szerepel Gomb, 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ése Kategória hozzáadása @@ -2237,8 +2235,6 @@ Utca kijelölése itt: %1$s Cím megadása - OSM-jegyzetek megjelenítése - OSM-jegyzetek elrejtése Gomb, amely a térképen megjeleníti vagy elrejti az OSM-jegyzeteket. Távolság szerinti sorrendben Keresés a Kedvencekben @@ -2795,8 +2791,6 @@ Úttípusok Szálljon le itt: Gomb, amely a térképen megjeleníti vagy elrejti a nyomvonalakat. - Nyomvonalak elrejtése - Nyomvonalak megjelenítése Először adjon meg egy célpontot Tö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ése Biztos, 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ése Nyomvonal tárolási mappája A 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ól Lejtők - Domborzat elrejtése - Domborzat megjelenítése Váltógomb, amely a térképen megjeleníti vagy elrejti a domborzati réteget. Leírás törlése Leírás hozzáadása @@ -3504,8 +3492,6 @@ Ezekhez a műveletekhez a \"%1$s\" gombra koppintva férhet hozzá. %1$s / %2$s Nem támogatott művelet: %1$s - Tömegközlekedés elrejtése - Tömegközlekedés megjelenítése POI készítése vagy módosítása Parkolá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ése Váltógomb, amely a térképen megjeleníti vagy elrejti a Mapillary réteget. Traffipaxok eltávolítása Jogi 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 pencarian Tidak ada yang ditemukan Ubah kata pencarian atau tingkatkan radius pencarian. - Tampilkan Catatan OSM - Sembunyikan Catatan OSM Mengetuk tombol tindakan akan menampilkan atau menyembunyikan Catatan OSM di peta. Diurutkan menurut jarak Cari 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æti Sýna %1$s Fela %1$s Bæta við flokki @@ -2047,8 +2045,6 @@ Byrja leit aftur Stækka radíus leitar Ekkert fannst - Birta OSM-minnispunkta - Fela OSM-minnispunkta Raðað eftir vegalengd Leita í eftirlætum Viðbót @@ -2848,8 +2844,6 @@ Fara útaf við Fara um borð við stöðvunina Hnappur til að birta eða fela valda ferla á kortinu. - Fela ferla - Birta ferla Virkja breytingar á almenningssamgöngum í OsmAnd Live. Almenningssamgöngur OsmAnd Live Lestu meira á blogginu okkar um hvernig OsmAnd reiknar leiðir. @@ -3264,11 +3258,7 @@ Velja frekar vegi með óbundnu slitlagi við leiðagerð. OSM-breytingar Hnappur til að birta eða fela hæðarlínur á kortinu. - Birta hæðarlínur - Fela hæðarlínur Hnappur til að birta eða fela hæðaskyggingu á kortinu. - Birta hæðaskyggingu - Fela hæðaskyggingu Gat 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æðaskygging Brekkur - 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öngur Nota tímamörk kerfis fyrir skjá Breyta nettengdum gagnagjafa OsmAnd rekjari @@ -3612,7 +3599,6 @@ Halda áfram OsmAnd + Mapillary Bæta við eða breyta eftirlæti - Birta almenningssamgöngur Sjá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élar Halda virku Aðvaranir vegna hraðamyndavéla eru bannaðar með lögum í sumum löndum. - Fela Mapillary - Sýna Mapillary Ví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 duplicato Questo pulsante d’azione mostra o nasconde i preferiti sulla mappa. Questo pulsante azione mostra o nasconde i PDI sulla mappa. - Mostra preferiti - Nascondi preferiti Mostra %1$s Nascondi %1$s Aggiungi una categoria @@ -2248,8 +2246,6 @@ Aumenta il raggio di ricerca Nessun risultato Cambia la ricerca o aumenta il raggio. - Mostra le note OSM - Nascondi le note OSM Toccando il pulsante azione verranno mostrate o nascoste le note OSM sulla mappa. Ordinato per distanza Cerca nei Preferiti @@ -2826,8 +2822,6 @@ Tipi di strade Mostra di più Tracciati visualizzati - Nascondi Tracciati GPX - Mostra Tracciati GPX Modalità %s Evita tipi di trasporto… A piedi @@ -3248,11 +3242,7 @@ Preferisci le strade pavimentate. Modifiche OSM Un controllo per mostrare o nascondere nella mappa le linee isoipse. - Mostra le linee isoipse - Nascondi le linee isoipse Un controllo per mostrare o nascondere nella mappa le ombreggiature dei rilievi. - Mostra l\'ombreggiatura dei rilievi - Nascondi l\'ombreggiatura dei rilievi Impossibile 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 descrizione Elimina descrizione Un bottone per mostrare o nascondere la vista rilievo sulla mappa. - Mostra rilievo - Nascondi rilievo Pendenze Ombreggiatura rilievi Puoi avere maggiori informazioni sulle Pendenze in %1$s. @@ -3507,8 +3495,6 @@ Tutte le lingue Plugin sviluppatore Oggetti - Nascondi i trasporti pubblici - Mostra i trasporti pubblici Il pulsante mostra o nasconde nella mappa i trasporti pubblici. Crea/Modifica PDI Posizione 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 Mapillary Un 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 rasti Pakeiskite paieškos užklausą arba padidinkite paieškos spindulį. - Rodyti OSM Pastabas - Slėpti OSM Pastabas Ieškoti parankiniuose Įskiepis Spalvų 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 Parankinius Rodyti %1$s Slėpti %1$s Navigacija @@ -2618,8 +2614,6 @@ Tai yra puikus būdas paremti OsmAnd ir OSM, jei jie jums patinka. Kelių tipai Rodyti daugiau Paspaudus šį mygtuką žemėlapyje parodomi arba paslepiami GPX pėdsakai - Slėpti GPX pėdsakus - Rodyti GPX pėdsakus Prašome iš pradžių pridėti tikslą Ankstesnis maršrutas Pridėti namus @@ -2726,8 +2720,6 @@ Tai yra puikus būdas paremti OsmAnd ir OSM, jei jie jums patinka. Atkurti Ieškoti gatvės Matuoti 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šinstaliuoti Naktinis žemėlapis metrai - Rodyti Mapillary Ilgio limitas Guolis %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 Vieta Spiež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 izlasi Rādīt %1$s Paslēpt %1$s Pievienot kategoriju @@ -2168,8 +2166,6 @@ Apraksta laukumu: %1$s x %2$s Ieteicamais reljefs: līdzens vai kalnains. Slīpums Berberu - Rādīt OSM piezīmes - Nerādīt OSM piezīmes Nospiežot darbības pogu, tiek rādītas vai slēptas OEM piezīmes uz kartes. Sakārtots pēc distances Meklēt Izlasē @@ -2668,8 +2664,6 @@ No Afganistānas līdz Zimbabvei, no Austrālijas līdz ASV, Argentīna, Brazīl Iziet pie Soliņš 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 trekus Vispirms pievienojiet galapunktu Iespē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 @@ Navigering Kartinnstilling Legg til en kategori - Skjul favoritter Vis %1$s Skjul %1$s - Vis favoritter Sted Legg til favoritt Tale 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-notater Knapp 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å stoppet Knapp for å vise eller skjule valgte spor på kartet. - Skjul spor - Vis spor Skru 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 dekke Foretrekk veier uten fast dekke framfor med fast dekke for ruting. - Vis koter - Skjul koter En knapp for å vise eller skjule relieffskygger på kartet. - Vis relieffskygge - Skjul relieffskygge Kan 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 innstillinger Terreng %1$s av %2$s - Skjul terreng - Vis terreng Slett beskrivelse Legg til beskrivelse Velg gruppe @@ -3444,8 +3432,6 @@ Mål avstand Reising (Wikivoyage og Wikipedia) Navigasjonsprofiler - Skjul offentlig transport - Vis offentlig transport Tilbake til redigering Opprett eller rediger interessepunkt Legg 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ålpunkt Navngi punktet - Skjul Mapillary - Vis Mapillary Peiling %1$s slettet Lydstyrkeknapper 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-duplicaat Een 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 verbergen Categorie toevoegen @@ -2325,8 +2323,6 @@ \n Naam bevat erg veel hoofdletters, toch doorgaan? Zoek in Favorieten - OSM-opmerkingen tonen - OSM-opmerkingen verbergen Knop om OSM-opmerkingen al dan niet te tonen. Gesorteerd op afstand Uw bestemming ligt in een gebied dat particulier eigendom is. Wilt u gebruik van particuliere wegen voor deze route toestaan\? @@ -2857,8 +2853,6 @@ Toon meer Getoonde tracks Een knop om geselecteerde GPX-tracks al dan niet te tonen op de kaart. - GPX-tracks verbergen - GPX-tracks tonen Voeg a.u.b. eerst de Bestemming in Vorige route Thuisadres toevoegen @@ -3125,11 +3119,7 @@ Naast elkaar Kaarten Knop om hoogtelijnen al dan niet te tonen op de kaart. - Hoogtelijnen tonen - Hoogtelijnen verbergen Knop om de reliëfschaduw al dan niet te tonen op de kaart. - Reliëfschaduw tonen - Reliëfschaduw verbergen Track opgeslagen Toon knooppunt van de fietsroutes Hoogtelijnen en reliëfschaduw @@ -3402,8 +3392,6 @@ Kan profiel niet back-uppen. %1$s van %2$s Hellingen - Terrein verbergen - Terrein tonen Een knop om de terreinlaag al dan niet te tonen op de kaart. Beschrijving verwijderen Beschrijving toevoegen @@ -3438,8 +3426,6 @@ Het toepassen van deze wijzigingen wist de cache van deze rasterkaartbron Stel de hoogte van het vaartuig in Stel 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 tonen Een 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$s POI-types zoeken - OV-informatie verbergen - OV-informatie tonen Knop om OV-informatie al dan niet te tonen op de kaart. Favoriet toevoegen / bewerken POI 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 mai Traças vesedoiras De quichar sus lo boton mòstra ò amaga la traça GPS sus la mapa - Amagar la traça GPS - Mostrar la traça GPS Començatz per indicar una destinacion Itinerari precedent Ajustar lo domicile @@ -481,11 +479,7 @@ Preferissi lei rotas sensa quitran. Edicions d\'OSM Un commutador per mostrar o amagar lei corbas de nivèu sus la mapa. - Mostrar lei corbas de nivèu - Amagar lei corbas de nivèu Un commutador per mostrar o amagar l\'ombrejat de relèu de la mapa. - Mostrar l’ombrejat de relèu - Amagar l’ombrejat de relèu Exportar lo perfiu Perfiu d\'OsmAnd: %1$s Lo 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ści Przełącznik wyświetlania lub ukrywania ulubionych miejsc na mapie. Przełącznik wyświetlania lub ukrywania użytecznych miejsc na mapie. - Pokaż Ulubione - Ukryj Ulubione Tworzenie elementów Ta 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 OSM Przybliżony zasięg i jakość mapy: \n • Europa Zachodnia: **** \n • Europa Wschodnia: *** @@ -2843,8 +2839,6 @@ Wyświetl więcej Wyświetlane ślady Przycisk do pokazywania lub ukrywania wybranych śladów na mapie. - Ukryj ślady - Pokaż ślady Proszę najpierw ustalić cel Poprzednia trasa Dowiedz się więcej na naszym blogu, jak OsmAnd wyznacza trasy. @@ -3260,10 +3254,6 @@ Preferuje drogi nieutwardzone. Zmiany OSM Przełącza wyświetlenie poziomic na mapie. - Wyświetl poziomice - Ukryj poziomice - Wyświetl cieniowanie terenu - Ukryj cieniowanie terenu Przycisk do pokazywania lub ukrywania cieniowania terenu na mapie. Nie można uruchomić mechanizmu zamiany tekstu na mowę. Wspólne @@ -3478,8 +3468,6 @@ Dodaj opis Usuń opis Przycisk do wyświetlania lub ukrywania warstwy terenu na mapie. - Pokaż teren - Ukryj teren Nachylenie Włą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 \n Powrót do edycji - Ukryj transport publiczny - Pokaż transport publiczny Utwórz lub edytuj użyteczne miejsce Dodaj lub edytuj ulubione miejsce Przycisk 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ść statku Ustaw szerokość statku, by unikać wąskich mostów - Ukryj Mapillary - Pokaż Mapillary Wprowadź 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 busca Nada encontrado Modifique o texto da pesquisa ou aumente o raio de busca. - Mostrar Anotações do OSM - Ocultar notas OSM Botão para mostrar ou ocultar notas do OSM no mapa. Classificado por distância Pesquisar Favoritos @@ -2456,8 +2454,6 @@ Nome de ação rápida duplicado Uma alternância para mostrar ou ocultar os pontos Favoritos no mapa. Alternar para mostrar ou ocultar POIs no mapa. - Mostrar Favoritos - Ocultar favoritos Mostrar %1$s Ocultar %1$s Adicionar uma categoria @@ -2839,8 +2835,6 @@ Desembarque em Embarque na parada Um botão para mostrar ou ocultar as trilhas selecionadas no mapa. - Ocultar trilhas - Mostrar trilhas Habilitar o transporte público para alterações do OsmAnd Live. Transporte público OsmAnd Live Não pavimentado @@ -3253,11 +3247,7 @@ Prefira não pavimentada sobre estradas pavimentadas para o roteamento. Edições OSM Botão que mostra ou oculta linhas de contorno no mapa. - Mostrar curvas de nível - Ocultar linhas de contorno Um botão para mostrar ou ocultar sombras de relevo. - Mostrar sombras de relevo - Ocultar sombras de relevo Nã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$s Encostas - Ocultar terreno - Mostrar terreno Um botão para mostrar ou ocultar a camada do terreno no mapa. Excluir descrição Adicionar 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úblico Botão que mostra ou oculta o transporte público no mapa. Criar ou editar POI Posiçõ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 Mapillary Uma alternância para mostrar ou ocultar a camada Mapillary no mapa. Desinstalar radares de velocidade Legal 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 pesquisa Nada encontrado Altere a pesquisa ou aumente o raio dela. - Mostrar anotações OSM - Ocultar anotações do OSM Botão para mostrar ou ocultar anotações OSM no mapa. Ordenar por distância Pesquisar em Favoritos @@ -2724,8 +2722,6 @@ Nome de ação rápida duplicado Uma alternância para mostrar ou ocultar os pontos favoritos no mapa. Uma alternância para mostrar ou ocultar PIs no mapa. - Mostrar Favoritos - Esconder favoritos Mostrar %1$s Esconder %1$s Adicionar uma categoria @@ -2892,7 +2888,6 @@ Mostrar mais Trilhos mostrados Um botão para mostrar ou ocultar trilhos selecionados no mapa. - Ocultar trilhos Sem elétricos Evita elétricos Sem autocarros @@ -2909,7 +2904,6 @@ Paralelos Seixos Caminho para cavaleiros - Mostrar trilhos Por favor defina primeiro o destino Rota anterior Adicionar casa @@ -3280,11 +3274,7 @@ Aspeto do perfil Edições OSM Botão que mostra ou oculta curvas de nível no mapa. - Mostrar curvas de nível - Ocultar curvas de nível Um botão para mostrar ou ocultar sombras de relevo. - Mostrar sombras de relevo - Ocultar sombras de relevo Nã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$s Pistas - Ocultar terreno - Mostrar terreno Um botão para mostrar ou esconder a camada do terreno no mapa. Apagar descrição Adicionar descrição @@ -3584,8 +3572,6 @@ Lombardo Cor customizada Combinar 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úblico Botão que mostra ou oculta o transporte público no mapa. Criar ou editar um POI Posições de estacionamento @@ -3650,7 +3636,6 @@ Go-cart Os alertas de radares de velocidade em alguns países são proibidos por lei. Manter ativo - Ocultar Mapillary Forneça um nome para o ponto A aplicação dessas alterações limpará os dados em cache dessa origem de bloco Este aparelho não possui câmeras de velocidade. @@ -3673,7 +3658,6 @@ %1$s apagado Uma alternância para mostrar ou ocultar a camada Mapillary no mapa. Definir altura da embarcação - Mostrar Mapillary Motocicleta enduro Patins em linha Desativado. 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ăutare Nimic găsit Modifică criteriile de căutare sau mărește aria de căutare. - Arată notele OSM - Ascunde notele OSM Atingâ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ți Afișați mai multe Trasee afișate - Ascundeți traseele GPX - Afișați traseele GPX Selectați destinația mai întâi Ruta anterioară Adăugați acasă @@ -2379,11 +2375,7 @@ Prefer drumurile nepavate. Editare OSM Comută pentru a afișa sau ascunde liniile de contur pe hartă. - Afişează conturul liniilor - Ascunde conturul liniilor Comută pentru a arăta sau ascunde umbrele de pe hartă. - Arata si umbrele - Ascunde afisarea umbrelor Motorul text-to-speech nu porneste. Exportă profilul Profil osmand exportat %1$s @@ -2821,8 +2813,6 @@ tone metrii Adăugare surse online - Ascundere Mapillary - Afișare Mapillary O 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èdia Unu 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 preferidos Ammustra %1$s Cua %1$s Annanghe una categoria @@ -2387,8 +2385,6 @@ Còmpora e installa s\'estensione \'Curvas de Livellu\' pro ammustrare sas àreas verticales graduadas. Chirca in sos preferidos Ordinados pro distàntzia - Ammustra sas notas OSM - Cua sas notas OSM Unu butone pro ammustrare o cuare sas Notas OSM in sa mapa. Torra a incumintzare sa chirca Ismànnia su raju de chirca @@ -2842,8 +2838,6 @@ Essi in Àrtzia in sa firmada Unu butone pro ammustrare o cuare sas rastas ischertadas in sa mapa. - Istichi sas rastas - Ammustra sas rastas Abì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 OSM Butone chi ammustrat o cuat sas curvas de livellu in sa mapa. - Ammustra sas curvas de livellu - Cua sas curvas de livellu Unu butone pro ammustrare o cuare sas umbraduras de sos rilievos in sa mapa. - Ammustra sas umbraduras de sos rilievos - Cua sas umbraduras de sos rilievos Allughidura 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$s Pistas - Cua su terrinu - Ammustra su terrinu Unu butone pro ammustrare o cuare s\'istratu de su terrinu in sa mapa. Iscantzella sa descritzione Annanghe una descritzione @@ -3603,8 +3591,6 @@ \n Sighi Podes atzèdere a custas atziones incarchende su butone \"%1$s\". - Cua sos trasportos pùblicos - Ammustra sos trasportos pùblicos Butone pro ammustrare o cuare sos trasportos pùblicos in sa mapa. Crea o modìfica unu PDI Logos 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 Mapillary Unu butone pro ammustrare o cuare s\'istratu de Mapillary in sa mapa. Disinstalla sos autovelox Legale 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 akcie Prepí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é body Zobraziť %1$s Skryť %1$s Pridať kategóriu @@ -2385,8 +2383,6 @@ Stiahnite mapu \"Vrstevnice\" pre tento región. Zoradené podľa vzdialenosti Hľadať v Obľúbených bodoch - Zobraziť OSM poznámky - Skryť OSM poznámky Tlač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 na Nastúpte na zastávke Tlač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ý bod Pridať východzí bod @@ -3268,11 +3262,7 @@ Vymazať %1$s\? Úpravy OSM Tlačidlo pre zobrazenie alebo skrytie vrstevníc na mape. - Zobraziť vrstevnice - Skryť vrstevnice Tlačidlo pre zobrazenie alebo skrytie tieňovaných svahov na mape. - Zobraziť tieňované svahy - Skryť tieňované svahy Nepodarilo 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$s Sklony svahov - Skryť terén - Zobraziť terén Tlačidlo pre zobrazenie alebo skrytie vrstvy terénu na mape. Vymazať popis Pridať popis @@ -3599,8 +3587,6 @@ \n • Opravy chýb pre jazyky písané sprava doľava \n \n - Skryť verejnú dopravu - Zobraziť verejnú dopravu Tlačidlo na zobrazenie alebo skrytie verejnej dopravy na mape. Vytvoriť alebo upraviť bod záujmu Parkovacie 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ívne V niektorých krajinách je varovanie pred rýchlostnými radarmi zakázané zákonom. - Skryť Mapillary - Zobraziť Mapillary Prepí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 dejanja Mesto - Pokaži priljubljene - Skrij priljubljene Pokaži %1$s Skrij %1$s Dodaj kategorijo @@ -2256,8 +2254,6 @@ Povečaj območje iskanja Ni zadetkov Poskusite zamenjati iskalni niz ali pa povečajte obseg iskanja. - Pokaži Opombe OSM - Skrij Opombe OSM Razvrščeno po razdalji Iskanje med priljubljenimi Vstavek @@ -2871,8 +2867,6 @@ Zamenjaj Pokaži več Prikazane sledi - Skrij sledi GPX - Pokaži sledi GPX Najprej je treba dodati cilj Predhodna pot Dodaj 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 mapillary Dodaj spletni vir Odstrani in ponovno zaženi Uporabi 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 favoriter Visa %1$s Dölj %1$s Lägg till en kategori @@ -2123,8 +2121,6 @@ Vänligen tillhandahåll fullständig kod Välj stad Välj postnummer Autozoomning på/av - Visa OSM-anteckningar - Dölj OSM-anteckningar Ett tryck på denna åtgärdsknapp visar eller döljer OSM-anteckningar på kartan. Starta om sökningen Utö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üşük Su İşlem Adı - OSM notlarını göster - OSM notlarını gizle OSM 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ürleri Takas Daha fazla görüntüle - Yolları Gizle - Yolları Göster Ev ekle Iş ekle İş @@ -2962,8 +2958,6 @@ " kaydedildi " Yer Hızlı eylem adı yinelenen - Sık Kullanılanları göster - Sık Kullanılanları gizle %1$s göster %1$s gizle Kategori ekle @@ -3261,11 +3255,7 @@ Yönlendirme için asfaltsız yolları asfaltlılara tercih et. OSM düzenlemeleri Eş yükselti eğrilerini haritada gösterme veya gizleme düğmesi. - Eş yükselti eğrilerini göster - Eş yükselti eğrilerini gizle Haritada tepe gölgelerini göstermek veya gizlemek için bir düğme. - Tepe gölgesini göster - Tepe gölgesini gizle Metinden 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$s Yamaçlar - Araziyi gizle - Araziyi göster Haritada arazi katmanını göstermek veya gizlemek için bir düğme. Açıklamayı sil Açıklama ekle @@ -3606,8 +3594,6 @@ \n Devam ettir Bu eylemlere “%1$s” düğmesine dokunarak erişebilirsiniz. - Toplu taşıma araçlarını gizle - Toplu taşıma araçlarını göster Haritada toplu taşıma araçlarını gösteren veya gizleyen düğme. POI oluştur veya düzenle Park 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öster Harita üzerinde Mapillary katmanını göstermek veya gizlemek için bir geçiş. Hız kameralarını kaldır Yasal 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/hide Copy POI name The recording will be continued. Select category or add new one Distance by tap A toggle to show or hide the Coordinates widget on the map. - Show Coordinates widget - Hide Coordinates widget Routing could avoid strong uphills. Application restart required to apply some settings. On pause @@ -342,8 +340,6 @@ Length limit Specify vehicle length to be permitted on routes. A toggle to show or hide the Mapillary layer on the map. - Show Mapillary - Hide Mapillary Set vessel width to avoid narrow bridges Set 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 positions Create or edit POI Button 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 description Delete description A button to show or hide terrain layer on the map. - Show terrain - Hide terrain Slopes %1$s of %2$s The 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 edits Button showing or hiding contour lines on the map. - Show contour lines - Hide contour lines A button to show or hide hillshades on the map. - Show hillshade - Hide hillshade You can apply this change to all or only the selected profile. Shared Prefer unpaved roads @@ -1113,8 +1101,6 @@ Show more Displayed tracks A button to show or hide selected tracks on the map. - Hide Tracks - Show Tracks Please set the destination first Previous route Add home @@ -1524,8 +1510,6 @@ Increase search radius Nothing found Change the search or increase its radius. - Show OSM notes - Hide OSM notes Button to show or hide OSM notes on the map. Sorted by distance Search in Favorites @@ -4007,8 +3991,6 @@ Quick action name duplicate A toggle to show or hide the Favorite points on the map. A toggle to show or hide POIs on the map. - Show Favorites - Hide Favorites Show %1$s Hide %1$s Add 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 centre Geodesist + 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 centre Geodesist - Local ref + Local ref