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/59] 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/59] 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 0d29c84a6e499dc1fa472647852f222a713e895e Mon Sep 17 00:00:00 2001 From: nazar-kutz Date: Sun, 28 Feb 2021 22:15:49 +0200 Subject: [PATCH 03/59] divide "getView()" method into smaller methods --- .../plus/search/QuickSearchListAdapter.java | 570 ++++++++++-------- 1 file changed, 304 insertions(+), 266 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/search/QuickSearchListAdapter.java b/OsmAnd/src/net/osmand/plus/search/QuickSearchListAdapter.java index 9251e555b0..e7016a34ae 100644 --- a/OsmAnd/src/net/osmand/plus/search/QuickSearchListAdapter.java +++ b/OsmAnd/src/net/osmand/plus/search/QuickSearchListAdapter.java @@ -10,12 +10,10 @@ import android.widget.ArrayAdapter; import android.widget.CheckBox; import android.widget.ImageView; import android.widget.LinearLayout; -import android.widget.ListView; import android.widget.TextView; import androidx.annotation.NonNull; import androidx.annotation.Nullable; -import androidx.appcompat.content.res.AppCompatResources; import androidx.appcompat.view.ContextThemeWrapper; import androidx.core.content.ContextCompat; import androidx.core.view.ViewCompat; @@ -33,7 +31,6 @@ import net.osmand.plus.R; import net.osmand.plus.UiUtilities.UpdateLocationViewCache; import net.osmand.plus.chooseplan.ChoosePlanDialogFragment; import net.osmand.plus.search.listitems.QuickSearchBannerListItem; -import net.osmand.plus.search.listitems.QuickSearchFreeBannerListItem; import net.osmand.plus.mapcontextmenu.MenuController; import net.osmand.plus.search.listitems.QuickSearchHeaderListItem; import net.osmand.plus.search.listitems.QuickSearchListItem; @@ -42,6 +39,7 @@ import net.osmand.plus.search.listitems.QuickSearchMoreListItem; import net.osmand.plus.search.listitems.QuickSearchSelectAllListItem; import net.osmand.search.SearchUICore; import net.osmand.search.core.SearchPhrase; +import net.osmand.search.core.SearchResult; import net.osmand.search.core.SearchWord; import net.osmand.util.Algorithms; import net.osmand.util.OpeningHoursParser; @@ -209,143 +207,299 @@ public class QuickSearchListAdapter extends ArrayAdapter { public View getView(final int position, View convertView, @NonNull ViewGroup parent) { final QuickSearchListItem listItem = getItem(position); QuickSearchListItemType type = listItem.getType(); + LinearLayout view; if (type == QuickSearchListItemType.BANNER) { - final QuickSearchBannerListItem banner = (QuickSearchBannerListItem) listItem; - if (convertView == null) { - view = (LinearLayout) inflater.inflate(R.layout.search_banner_list_item, null); - } else { - view = (LinearLayout) convertView; - } - - ((TextView) view.findViewById(R.id.empty_search_description)).setText(R.string.nothing_found_descr); - - SearchUICore searchUICore = app.getSearchUICore().getCore(); - SearchPhrase searchPhrase = searchUICore.getPhrase(); - - String textTitle; - int minimalSearchRadius = searchUICore.getMinimalSearchRadius(searchPhrase); - if (searchUICore.isSearchMoreAvailable(searchPhrase) && minimalSearchRadius != Integer.MAX_VALUE) { - double rd = OsmAndFormatter.calculateRoundedDist(minimalSearchRadius, app); - textTitle = app.getString(R.string.nothing_found_in_radius) + " " - + OsmAndFormatter.getFormattedDistance((float) rd, app, false); - } else { - textTitle = app.getString(R.string.search_nothing_found); - } - ((TextView) view.findViewById(R.id.empty_search_title)).setText(textTitle); - - ViewGroup buttonContainer = view.findViewById(R.id.buttons_container); - if (buttonContainer != null) { - buttonContainer.removeAllViews(); - for (ButtonItem button : banner.getButtonItems()) { - View v = inflater.inflate(R.layout.search_banner_button_list_item, null); - TextView title = v.findViewById(R.id.title); - title.setText(button.getTitle()); - ImageView icon = v.findViewById(R.id.icon); - if (button.getIconId() != INVALID_ID) { - icon.setImageResource(button.getIconId()); - icon.setVisibility(View.VISIBLE); - } else { - icon.setVisibility(View.GONE); - } - v.setOnClickListener(button.getListener()); - buttonContainer.addView(v); - } - } + view = bindBannerItem(convertView, listItem); } else if (type == QuickSearchListItemType.FREE_VERSION_BANNER) { - if (convertView == null) { - view = (LinearLayout) inflater.inflate( - R.layout.read_wikipedia_ofline_banner, null); - } else { - view = (LinearLayout) convertView; - } - - View btnGet = view.findViewById(R.id.btn_get); - if (btnGet != null) { - btnGet.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - ChoosePlanDialogFragment.showWikipediaInstance( - activity.getSupportFragmentManager()); - } - }); - } + view = bindFreeVersionBannerItem(convertView); } else if (type == QuickSearchListItemType.SEARCH_MORE) { - if (convertView == null) { - view = (LinearLayout) inflater.inflate(R.layout.search_more_list_item, null); - } else { - view = (LinearLayout) convertView; - } - - if (listItem.getSpannableName() != null) { - ((TextView) view.findViewById(R.id.title)).setText(listItem.getSpannableName()); - } else { - ((TextView) view.findViewById(R.id.title)).setText(listItem.getName()); - } - - final QuickSearchMoreListItem searchMoreItem = (QuickSearchMoreListItem) listItem; - int emptyDescId = searchMoreItem.isSearchMoreAvailable() ? R.string.nothing_found_descr : R.string.modify_the_search_query; - ((TextView) view.findViewById(R.id.empty_search_description)).setText(emptyDescId); - - boolean emptySearchVisible = searchMoreItem.isEmptySearch() && !searchMoreItem.isInterruptedSearch(); - boolean moreDividerVisible = emptySearchVisible && searchMoreItem.isSearchMoreAvailable(); - view.findViewById(R.id.empty_search).setVisibility(emptySearchVisible ? View.VISIBLE : View.GONE); - view.findViewById(R.id.more_divider).setVisibility(moreDividerVisible ? View.VISIBLE : View.GONE); - SearchUICore searchUICore = app.getSearchUICore().getCore(); - SearchPhrase searchPhrase = searchUICore.getPhrase(); - - String textTitle; - int minimalSearchRadius = searchUICore.getMinimalSearchRadius(searchPhrase); - if (searchUICore.isSearchMoreAvailable(searchPhrase) && minimalSearchRadius != Integer.MAX_VALUE) { - double rd = OsmAndFormatter.calculateRoundedDist(minimalSearchRadius, app); - textTitle = app.getString(R.string.nothing_found_in_radius) + " " - + OsmAndFormatter.getFormattedDistance((float) rd, app, false); - } else { - textTitle = app.getString(R.string.search_nothing_found); - } - ((TextView) view.findViewById(R.id.empty_search_title)).setText(textTitle); - View primaryButton = view.findViewById(R.id.primary_button); - - ((TextView) view.findViewById(R.id.title)).setText(getIncreaseSearchButtonTitle(app, searchPhrase)); - - primaryButton.setVisibility(searchMoreItem.isSearchMoreAvailable() ? View.VISIBLE : View.GONE); - primaryButton.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View view) { - ((QuickSearchMoreListItem) listItem).onPrimaryButtonClick(); - } - }); - - View secondaryButton = view.findViewById(R.id.secondary_button); - secondaryButton.setVisibility(searchMoreItem.isSecondaryButtonVisible() ? - View.VISIBLE : View.GONE); - secondaryButton.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View view) { - searchMoreItem.onSecondaryButtonClick(); - } - }); + view = bindSearchMoreItem(convertView, listItem); } else if (type == QuickSearchListItemType.BUTTON) { - if (convertView == null) { - view = (LinearLayout) inflater.inflate(R.layout.search_custom_list_item, null); - } else { - view = (LinearLayout) convertView; - } - ((ImageView) view.findViewById(R.id.imageView)).setImageDrawable(listItem.getIcon()); - if (listItem.getSpannableName() != null) { - ((TextView) view.findViewById(R.id.title)).setText(listItem.getSpannableName()); - } else { - ((TextView) view.findViewById(R.id.title)).setText(listItem.getName()); - } + view = bindButtonItem(convertView, listItem); } else if (type == QuickSearchListItemType.SELECT_ALL) { - if (convertView == null) { - view = (LinearLayout) inflater.inflate(R.layout.select_all_list_item, null); - } else { - view = (LinearLayout) convertView; + view = bindSelectAllItem(position, convertView); + } else if (type == QuickSearchListItemType.HEADER) { + view = bindHeaderItem(convertView, listItem); + } else if (type == QuickSearchListItemType.TOP_SHADOW) { + return bindTopShadowItem(convertView); + } else if (type == QuickSearchListItemType.BOTTOM_SHADOW) { + return bindBottomShadowItem(convertView); + } else { + view = bindSearchResultItem(position, convertView, listItem); + } + + setupBackground(view); + setupDivider(position, view, listItem); + ViewCompat.setAccessibilityDelegate(view, accessibilityAssistant); + return view; + } + + private LinearLayout bindBannerItem(@Nullable View convertView, + @NonNull QuickSearchListItem listItem) { + QuickSearchBannerListItem banner = (QuickSearchBannerListItem) listItem; + LinearLayout view = getLinearLayout(convertView, R.layout.search_banner_list_item); + ((TextView) view.findViewById(R.id.empty_search_description)).setText(R.string.nothing_found_descr); + + SearchUICore searchUICore = app.getSearchUICore().getCore(); + SearchPhrase searchPhrase = searchUICore.getPhrase(); + + String textTitle; + int minimalSearchRadius = searchUICore.getMinimalSearchRadius(searchPhrase); + if (searchUICore.isSearchMoreAvailable(searchPhrase) && minimalSearchRadius != Integer.MAX_VALUE) { + double rd = OsmAndFormatter.calculateRoundedDist(minimalSearchRadius, app); + textTitle = app.getString(R.string.nothing_found_in_radius) + " " + + OsmAndFormatter.getFormattedDistance((float) rd, app, false); + } else { + textTitle = app.getString(R.string.search_nothing_found); + } + ((TextView) view.findViewById(R.id.empty_search_title)).setText(textTitle); + + ViewGroup buttonContainer = view.findViewById(R.id.buttons_container); + if (buttonContainer != null) { + buttonContainer.removeAllViews(); + for (ButtonItem button : banner.getButtonItems()) { + View v = inflater.inflate(R.layout.search_banner_button_list_item, null); + TextView title = v.findViewById(R.id.title); + title.setText(button.getTitle()); + ImageView icon = v.findViewById(R.id.icon); + if (button.getIconId() != INVALID_ID) { + icon.setImageResource(button.getIconId()); + icon.setVisibility(View.VISIBLE); + } else { + icon.setVisibility(View.GONE); + } + v.setOnClickListener(button.getListener()); + buttonContainer.addView(v); } - final CheckBox ch = (CheckBox) view.findViewById(R.id.toggle_item); + } + return view; + } + + private LinearLayout bindFreeVersionBannerItem(@Nullable View convertView) { + LinearLayout view = getLinearLayout(convertView, R.layout.read_wikipedia_ofline_banner); + View btnGet = view.findViewById(R.id.btn_get); + if (btnGet != null) { + btnGet.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + ChoosePlanDialogFragment.showWikipediaInstance( + activity.getSupportFragmentManager()); + } + }); + } + return view; + } + + private LinearLayout bindSearchMoreItem(@Nullable View convertView, + @NonNull final QuickSearchListItem listItem) { + LinearLayout view = getLinearLayout(convertView, R.layout.search_more_list_item); + + if (listItem.getSpannableName() != null) { + ((TextView) view.findViewById(R.id.title)).setText(listItem.getSpannableName()); + } else { + ((TextView) view.findViewById(R.id.title)).setText(listItem.getName()); + } + + final QuickSearchMoreListItem searchMoreItem = (QuickSearchMoreListItem) listItem; + int emptyDescId = searchMoreItem.isSearchMoreAvailable() ? R.string.nothing_found_descr : R.string.modify_the_search_query; + ((TextView) view.findViewById(R.id.empty_search_description)).setText(emptyDescId); + + boolean emptySearchVisible = searchMoreItem.isEmptySearch() && !searchMoreItem.isInterruptedSearch(); + boolean moreDividerVisible = emptySearchVisible && searchMoreItem.isSearchMoreAvailable(); + view.findViewById(R.id.empty_search).setVisibility(emptySearchVisible ? View.VISIBLE : View.GONE); + view.findViewById(R.id.more_divider).setVisibility(moreDividerVisible ? View.VISIBLE : View.GONE); + SearchUICore searchUICore = app.getSearchUICore().getCore(); + SearchPhrase searchPhrase = searchUICore.getPhrase(); + + String textTitle; + int minimalSearchRadius = searchUICore.getMinimalSearchRadius(searchPhrase); + if (searchUICore.isSearchMoreAvailable(searchPhrase) && minimalSearchRadius != Integer.MAX_VALUE) { + double rd = OsmAndFormatter.calculateRoundedDist(minimalSearchRadius, app); + textTitle = app.getString(R.string.nothing_found_in_radius) + " " + + OsmAndFormatter.getFormattedDistance((float) rd, app, false); + } else { + textTitle = app.getString(R.string.search_nothing_found); + } + ((TextView) view.findViewById(R.id.empty_search_title)).setText(textTitle); + View primaryButton = view.findViewById(R.id.primary_button); + + ((TextView) view.findViewById(R.id.title)).setText(getIncreaseSearchButtonTitle(app, searchPhrase)); + + primaryButton.setVisibility(searchMoreItem.isSearchMoreAvailable() ? View.VISIBLE : View.GONE); + primaryButton.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + ((QuickSearchMoreListItem) listItem).onPrimaryButtonClick(); + } + }); + + View secondaryButton = view.findViewById(R.id.secondary_button); + secondaryButton.setVisibility(searchMoreItem.isSecondaryButtonVisible() ? + View.VISIBLE : View.GONE); + secondaryButton.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + searchMoreItem.onSecondaryButtonClick(); + } + }); + return view; + } + + private LinearLayout bindButtonItem(@Nullable View convertView, + @NonNull QuickSearchListItem listItem) { + LinearLayout view = getLinearLayout(convertView, R.layout.search_custom_list_item); + ((ImageView) view.findViewById(R.id.imageView)).setImageDrawable(listItem.getIcon()); + if (listItem.getSpannableName() != null) { + ((TextView) view.findViewById(R.id.title)).setText(listItem.getSpannableName()); + } else { + ((TextView) view.findViewById(R.id.title)).setText(listItem.getName()); + } + return view; + } + + private LinearLayout bindSelectAllItem(final int position, + @Nullable View convertView) { + LinearLayout view = getLinearLayout(convertView, R.layout.select_all_list_item); + final CheckBox ch = (CheckBox) view.findViewById(R.id.toggle_item); + ch.setVisibility(View.VISIBLE); + ch.setChecked(selectAll); + ch.setOnClickListener(new View.OnClickListener() { + + @Override + public void onClick(View v) { + toggleCheckbox(position, ch); + } + }); + return view; + } + + private LinearLayout bindHeaderItem(@Nullable View convertView, + @NonNull QuickSearchListItem listItem) { + LinearLayout view = getLinearLayout(convertView, R.layout.search_header_list_item); + view.findViewById(R.id.top_divider) + .setVisibility(((QuickSearchHeaderListItem)listItem).isShowTopDivider() ? View.VISIBLE : View.GONE); + if (listItem.getSpannableName() != null) { + ((TextView) view.findViewById(R.id.title)).setText(listItem.getSpannableName()); + } else { + ((TextView) view.findViewById(R.id.title)).setText(listItem.getName()); + } + return view; + } + + private LinearLayout bindTopShadowItem(@Nullable View convertView) { + return getLinearLayout(convertView, R.layout.list_shadow_header); + } + + private LinearLayout bindBottomShadowItem(@Nullable View convertView) { + return getLinearLayout(convertView, R.layout.list_shadow_footer); + } + + private LinearLayout bindSearchResultItem(int position, + @Nullable View convertView, + @NonNull QuickSearchListItem listItem) { + LinearLayout view = getLinearLayout(convertView, R.layout.search_list_item); + setupCheckBox(position, view, listItem); + + ImageView imageView = (ImageView) view.findViewById(R.id.imageView); + TextView title = (TextView) view.findViewById(R.id.title); + TextView subtitle = (TextView) view.findViewById(R.id.subtitle); + + imageView.setImageDrawable(listItem.getIcon()); + String name = listItem.getName(); + if (listItem.getSpannableName() != null) { + title.setText(listItem.getSpannableName()); + } else { + title.setText(name); + } + + String desc = listItem.getTypeName(); + Object searchResultObject = listItem.getSearchResult().object; + if (searchResultObject instanceof AbstractPoiType) { + AbstractPoiType abstractPoiType = (AbstractPoiType) searchResultObject; + String synonyms[] = abstractPoiType.getSynonyms().split(";"); + QuickSearchHelper searchHelper = app.getSearchUICore(); + SearchUICore searchUICore = searchHelper.getCore(); + String searchPhrase = searchUICore.getPhrase().getText(true); + SearchPhrase.NameStringMatcher nm = new SearchPhrase.NameStringMatcher(searchPhrase, + CollatorStringMatcher.StringMatcherMode.CHECK_STARTS_FROM_SPACE); + + if (!searchPhrase.isEmpty() && !nm.matches(abstractPoiType.getTranslation())) { + if (nm.matches(abstractPoiType.getEnTranslation())) { + desc = listItem.getTypeName() + " (" + abstractPoiType.getEnTranslation() + ")"; + } else { + for (String syn : synonyms) { + if (nm.matches(syn)) { + desc = listItem.getTypeName() + " (" + syn + ")"; + break; + } + } + } + } + } + + boolean hasDesc = false; + if (!Algorithms.isEmpty(desc) && !desc.equals(name)) { + subtitle.setText(desc); + subtitle.setVisibility(View.VISIBLE); + hasDesc = true; + } else { + subtitle.setVisibility(View.GONE); + } + + Drawable typeIcon = listItem.getTypeIcon(); + ImageView group = (ImageView) view.findViewById(R.id.type_name_icon); + if (typeIcon != null && hasDesc) { + group.setImageDrawable(typeIcon); + group.setVisibility(View.VISIBLE); + } else { + group.setVisibility(View.GONE); + } + + LinearLayout timeLayout = (LinearLayout) view.findViewById(R.id.time_layout); + TextView timeText = (TextView) view.findViewById(R.id.time); + ImageView timeIcon = (ImageView) view.findViewById(R.id.time_icon); + if (listItem.getSearchResult().object instanceof Amenity + && ((Amenity) listItem.getSearchResult().object).getOpeningHours() != null) { + Amenity amenity = (Amenity) listItem.getSearchResult().object; + OpeningHoursParser.OpeningHours rs = OpeningHoursParser.parseOpenedHours(amenity.getOpeningHours()); + if (rs != null && rs.getInfo() != null) { + int colorOpen = R.color.ctx_menu_amenity_opened_text_color; + int colorClosed = R.color.ctx_menu_amenity_closed_text_color; + SpannableString openHours = MenuController.getSpannableOpeningHours( + rs.getInfo(), + ContextCompat.getColor(app, colorOpen), + ContextCompat.getColor(app, colorClosed)); + int colorId = rs.isOpenedForTime(Calendar.getInstance()) ? colorOpen : colorClosed; + timeLayout.setVisibility(View.VISIBLE); + timeIcon.setImageDrawable(app.getUIUtilities().getIcon(R.drawable.ic_action_opening_hour_16, colorId)); + timeText.setText(openHours); + } else { + timeLayout.setVisibility(View.GONE); + } + } else { + timeLayout.setVisibility(View.GONE); + } + + updateCompassVisibility(view, listItem); + + return view; + } + + private LinearLayout getLinearLayout(@Nullable View convertView, int layoutId) { + if (convertView == null) { + convertView = inflater.inflate(layoutId, null); + } + return (LinearLayout) convertView; + } + + private void setupCheckBox(final int position, + @NonNull View rootView, + @NonNull QuickSearchListItem listItem) { + final CheckBox ch = (CheckBox) rootView.findViewById(R.id.toggle_item); + if (selectionMode) { ch.setVisibility(View.VISIBLE); - ch.setChecked(selectAll); + ch.setChecked(selectedItems.contains(listItem)); ch.setOnClickListener(new View.OnClickListener() { @Override @@ -353,139 +507,21 @@ public class QuickSearchListAdapter extends ArrayAdapter { toggleCheckbox(position, ch); } }); - } else if (type == QuickSearchListItemType.HEADER) { - if (convertView == null) { - view = (LinearLayout) inflater.inflate(R.layout.search_header_list_item, null); - } else { - view = (LinearLayout) convertView; - } - view.findViewById(R.id.top_divider) - .setVisibility(((QuickSearchHeaderListItem)listItem).isShowTopDivider() ? View.VISIBLE : View.GONE); - if (listItem.getSpannableName() != null) { - ((TextView) view.findViewById(R.id.title)).setText(listItem.getSpannableName()); - } else { - ((TextView) view.findViewById(R.id.title)).setText(listItem.getName()); - } - } else if (type == QuickSearchListItemType.TOP_SHADOW) { - if (convertView == null) { - view = (LinearLayout) inflater.inflate(R.layout.list_shadow_header, null); - } else { - view = (LinearLayout) convertView; - } - return view; - } else if (type == QuickSearchListItemType.BOTTOM_SHADOW) { - if (convertView == null) { - view = (LinearLayout) inflater.inflate(R.layout.list_shadow_footer, null); - } else { - view = (LinearLayout) convertView; - } - return view; } else { - if (convertView == null) { - view = (LinearLayout) inflater.inflate(R.layout.search_list_item, null); - } else { - view = (LinearLayout) convertView; - } - - final CheckBox ch = (CheckBox) view.findViewById(R.id.toggle_item); - if (selectionMode) { - ch.setVisibility(View.VISIBLE); - ch.setChecked(selectedItems.contains(listItem)); - ch.setOnClickListener(new View.OnClickListener() { - - @Override - public void onClick(View v) { - toggleCheckbox(position, ch); - } - }); - } else { - ch.setVisibility(View.GONE); - } - - ImageView imageView = (ImageView) view.findViewById(R.id.imageView); - TextView title = (TextView) view.findViewById(R.id.title); - TextView subtitle = (TextView) view.findViewById(R.id.subtitle); - - imageView.setImageDrawable(listItem.getIcon()); - String name = listItem.getName(); - if (listItem.getSpannableName() != null) { - title.setText(listItem.getSpannableName()); - } else { - title.setText(name); - } - - String desc = listItem.getTypeName(); - Object searchResultObject = listItem.getSearchResult().object; - if (searchResultObject instanceof AbstractPoiType) { - AbstractPoiType abstractPoiType = (AbstractPoiType) searchResultObject; - String synonyms[] = abstractPoiType.getSynonyms().split(";"); - QuickSearchHelper searchHelper = app.getSearchUICore(); - SearchUICore searchUICore = searchHelper.getCore(); - String searchPhrase = searchUICore.getPhrase().getText(true); - SearchPhrase.NameStringMatcher nm = new SearchPhrase.NameStringMatcher(searchPhrase, - CollatorStringMatcher.StringMatcherMode.CHECK_STARTS_FROM_SPACE); - - if (!searchPhrase.isEmpty() && !nm.matches(abstractPoiType.getTranslation())) { - if (nm.matches(abstractPoiType.getEnTranslation())) { - desc = listItem.getTypeName() + " (" + abstractPoiType.getEnTranslation() + ")"; - } else { - for (String syn : synonyms) { - if (nm.matches(syn)) { - desc = listItem.getTypeName() + " (" + syn + ")"; - break; - } - } - } - } - } - - boolean hasDesc = false; - if (!Algorithms.isEmpty(desc) && !desc.equals(name)) { - subtitle.setText(desc); - subtitle.setVisibility(View.VISIBLE); - hasDesc = true; - } else { - subtitle.setVisibility(View.GONE); - } - - Drawable typeIcon = listItem.getTypeIcon(); - ImageView group = (ImageView) view.findViewById(R.id.type_name_icon); - if (typeIcon != null && hasDesc) { - group.setImageDrawable(typeIcon); - group.setVisibility(View.VISIBLE); - } else { - group.setVisibility(View.GONE); - } - - LinearLayout timeLayout = (LinearLayout) view.findViewById(R.id.time_layout); - TextView timeText = (TextView) view.findViewById(R.id.time); - ImageView timeIcon = (ImageView) view.findViewById(R.id.time_icon); - if (listItem.getSearchResult().object instanceof Amenity - && ((Amenity) listItem.getSearchResult().object).getOpeningHours() != null) { - Amenity amenity = (Amenity) listItem.getSearchResult().object; - OpeningHoursParser.OpeningHours rs = OpeningHoursParser.parseOpenedHours(amenity.getOpeningHours()); - if (rs != null && rs.getInfo() != null) { - int colorOpen = R.color.ctx_menu_amenity_opened_text_color; - int colorClosed = R.color.ctx_menu_amenity_closed_text_color; - SpannableString openHours = MenuController.getSpannableOpeningHours( - rs.getInfo(), - ContextCompat.getColor(app, colorOpen), - ContextCompat.getColor(app, colorClosed)); - int colorId = rs.isOpenedForTime(Calendar.getInstance()) ? colorOpen : colorClosed; - timeLayout.setVisibility(View.VISIBLE); - timeIcon.setImageDrawable(app.getUIUtilities().getIcon(R.drawable.ic_action_opening_hour_16, colorId)); - timeText.setText(openHours); - } else { - timeLayout.setVisibility(View.GONE); - } - } else { - timeLayout.setVisibility(View.GONE); - } - - updateCompassVisibility(view, listItem); + ch.setVisibility(View.GONE); } - view.setBackgroundColor(app.getResources().getColor( - app.getSettings().isLightContent() ? R.color.list_background_color_light : R.color.list_background_color_dark)); + } + + private void setupBackground(View view) { + int bgColorResId = isNightMode() ? + R.color.list_background_color_dark : + R.color.list_background_color_light; + view.setBackgroundColor(app.getResources().getColor(bgColorResId)); + } + + private void setupDivider(final int position, + @NonNull View view, + @NonNull QuickSearchListItem listItem) { View divider = view.findViewById(R.id.divider); if (divider != null) { if (position == getCount() - 1 || getItem(position + 1).getType() == QuickSearchListItemType.HEADER @@ -494,7 +530,7 @@ public class QuickSearchListAdapter extends ArrayAdapter { } else { divider.setVisibility(View.VISIBLE); if (getItem(position + 1).getType() == QuickSearchListItemType.SEARCH_MORE - || type == QuickSearchListItemType.SELECT_ALL) { + || listItem.getType() == QuickSearchListItemType.SELECT_ALL) { LinearLayout.LayoutParams p = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, dp1); p.setMargins(0, 0, 0 ,0); divider.setLayoutParams(p); @@ -505,8 +541,6 @@ public class QuickSearchListAdapter extends ArrayAdapter { } } } - ViewCompat.setAccessibilityDelegate(view, accessibilityAssistant); - return view; } public static String getIncreaseSearchButtonTitle(OsmandApplication app, SearchPhrase searchPhrase) { @@ -576,4 +610,8 @@ public class QuickSearchListAdapter extends ArrayAdapter { LatLon toloc = listItem.getSearchResult().location; app.getUIUtilities().updateLocationView(updateLocationViewCache, direction, distanceText, toloc); } + + private boolean isNightMode() { + return !app.getSettings().isLightContent(); + } } From a4e7edc6bd32e68728119950cd422240b12ce283 Mon Sep 17 00:00:00 2001 From: nazar-kutz Date: Sun, 28 Feb 2021 22:24:14 +0200 Subject: [PATCH 04/59] add visible gpx track to search history --- .../net/osmand/search/core/ObjectType.java | 2 +- OsmAnd/res/layout/search_gpx_list_item.xml | 166 ++++++++++++++++++ .../src/net/osmand/data/PointDescription.java | 5 + .../net/osmand/plus/GpxSelectionHelper.java | 46 ++++- .../net/osmand/plus/helpers/GpxUiHelper.java | 49 +++++- .../plus/helpers/SearchHistoryHelper.java | 6 + .../search/QuickSearchDialogFragment.java | 18 +- .../osmand/plus/search/QuickSearchHelper.java | 10 ++ .../plus/search/QuickSearchListAdapter.java | 15 ++ .../plus/search/QuickSearchListFragment.java | 21 +++ .../QuickSearchGpxTrackListItem.java | 16 ++ .../search/listitems/QuickSearchListItem.java | 2 + .../listitems/QuickSearchListItemType.java | 1 + 13 files changed, 341 insertions(+), 16 deletions(-) create mode 100644 OsmAnd/res/layout/search_gpx_list_item.xml create mode 100644 OsmAnd/src/net/osmand/plus/search/listitems/QuickSearchGpxTrackListItem.java diff --git a/OsmAnd-java/src/main/java/net/osmand/search/core/ObjectType.java b/OsmAnd-java/src/main/java/net/osmand/search/core/ObjectType.java index c14d5cff07..df81a9ce18 100644 --- a/OsmAnd-java/src/main/java/net/osmand/search/core/ObjectType.java +++ b/OsmAnd-java/src/main/java/net/osmand/search/core/ObjectType.java @@ -8,7 +8,7 @@ public enum ObjectType { // LOCATION LOCATION(true), PARTIAL_LOCATION(false), // UI OBJECTS - FAVORITE(true), FAVORITE_GROUP(false), WPT(true), RECENT_OBJ(true), + FAVORITE(true), FAVORITE_GROUP(false), WPT(true), RECENT_OBJ(true), GPX_TRACK(false), // ONLINE SEARCH ONLINE_SEARCH(true), diff --git a/OsmAnd/res/layout/search_gpx_list_item.xml b/OsmAnd/res/layout/search_gpx_list_item.xml new file mode 100644 index 0000000000..090513c7be --- /dev/null +++ b/OsmAnd/res/layout/search_gpx_list_item.xml @@ -0,0 +1,166 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/data/PointDescription.java b/OsmAnd/src/net/osmand/data/PointDescription.java index 28c5e12519..41c46d0dcf 100644 --- a/OsmAnd/src/net/osmand/data/PointDescription.java +++ b/OsmAnd/src/net/osmand/data/PointDescription.java @@ -47,6 +47,7 @@ public class PointDescription { public static final String POINT_TYPE_OSM_BUG = "bug"; public static final String POINT_TYPE_WORLD_REGION = "world_region"; public static final String POINT_TYPE_GPX_ITEM = "gpx_item"; + public static final String POINT_TYPE_GPX_FILE = "gpx_file"; public static final String POINT_TYPE_WORLD_REGION_SHOW_ON_MAP = "world_region_show_on_map"; public static final String POINT_TYPE_BLOCKED_ROAD = "blocked_road"; public static final String POINT_TYPE_TRANSPORT_ROUTE = "transport_route"; @@ -297,6 +298,10 @@ public class PointDescription { return POINT_TYPE_GPX.equals(type); } + public boolean isGpxFile() { + return POINT_TYPE_GPX_FILE.equals(type); + } + @Override public int hashCode() { final int prime = 31; diff --git a/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java b/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java index 69c159bed0..72aa50552e 100644 --- a/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java +++ b/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java @@ -27,6 +27,7 @@ import net.osmand.plus.activities.SavingTrackHelper; import net.osmand.plus.helpers.GpxUiHelper; import net.osmand.plus.helpers.GpxUiHelper.GPXDataSetAxisType; import net.osmand.plus.helpers.GpxUiHelper.GPXDataSetType; +import net.osmand.plus.helpers.SearchHistoryHelper; import net.osmand.plus.helpers.enums.MetricsConstants; import net.osmand.plus.mapmarkers.MapMarkersGroup; import net.osmand.plus.mapmarkers.MapMarkersHelper; @@ -581,7 +582,7 @@ public class GpxSelectionHelper { } else if (obj.has(BACKUP)) { selectedGpxFilesBackUp.put(gpx, gpx.modifiedTime); } else { - SelectedGpxFile file = selectGpxFile(gpx, true, false, true, selectedByUser, false); + SelectedGpxFile file = selectGpxFile(gpx, true, false, true, selectedByUser, false, false); if (obj.has(HIDDEN_GROUPS)) { readHiddenGroups(file, obj.getString(HIDDEN_GROUPS)); } @@ -684,7 +685,13 @@ public class GpxSelectionHelper { app.getSettings().SELECTED_GPX.set(ar.toString()); } - private SelectedGpxFile selectGpxFileImpl(GPXFile gpx, GpxDataItem dataItem, boolean show, boolean notShowNavigationDialog, boolean syncGroup, boolean selectedByUser) { + private SelectedGpxFile selectGpxFileImpl(GPXFile gpx, + GpxDataItem dataItem, + boolean show, + boolean notShowNavigationDialog, + boolean syncGroup, + boolean selectedByUser, + boolean addToHistory) { boolean displayed; SelectedGpxFile sf; if (gpx != null && gpx.showCurrentTrack) { @@ -724,6 +731,12 @@ public class GpxSelectionHelper { if (sf != null) { sf.splitProcessed = false; } + if (show && selectedByUser && addToHistory) { + String path = gpx.path; + String rootGpxDir = app.getAppPath(IndexConstants.GPX_INDEX_DIR).getAbsolutePath() + '/'; + String fileName = path.replace(rootGpxDir, ""); + SearchHistoryHelper.getInstance(app).addGpxFileToHistory(fileName); + } return sf; } @@ -749,18 +762,39 @@ public class GpxSelectionHelper { return selectGpxFile(gpx, show, notShowNavigationDialog, true, true, true); } - public SelectedGpxFile selectGpxFile(GPXFile gpx, GpxDataItem dataItem, boolean show, boolean notShowNavigationDialog, boolean syncGroup, boolean selectedByUser) { - SelectedGpxFile sf = selectGpxFileImpl(gpx, dataItem, show, notShowNavigationDialog, syncGroup, selectedByUser); + public SelectedGpxFile selectGpxFile(GPXFile gpx, + GpxDataItem dataItem, + boolean show, + boolean notShowNavigationDialog, + boolean syncGroup, + boolean selectedByUser, + boolean addToHistory) { + SelectedGpxFile sf = selectGpxFileImpl(gpx, dataItem, show, notShowNavigationDialog, syncGroup, selectedByUser, addToHistory); saveCurrentSelections(); return sf; } - public SelectedGpxFile selectGpxFile(GPXFile gpx, boolean show, boolean notShowNavigationDialog, boolean syncGroup, boolean selectedByUser, boolean canAddToMarkers) { + public SelectedGpxFile selectGpxFile(GPXFile gpx, + boolean show, + boolean notShowNavigationDialog, + boolean syncGroup, + boolean selectedByUser, + boolean canAddToMarkers) { + return selectGpxFile(gpx, show, notShowNavigationDialog, syncGroup, selectedByUser, canAddToMarkers, true); + } + + public SelectedGpxFile selectGpxFile(GPXFile gpx, + boolean show, + boolean notShowNavigationDialog, + boolean syncGroup, + boolean selectedByUser, + boolean canAddToMarkers, + boolean addToHistory) { GpxDataItem dataItem = app.getGpxDbHelper().getItem(new File(gpx.path)); if (canAddToMarkers && show && dataItem != null && dataItem.isShowAsMarkers()) { app.getMapMarkersHelper().addOrEnableGroup(gpx); } - return selectGpxFile(gpx, dataItem, show, notShowNavigationDialog, syncGroup, selectedByUser); + return selectGpxFile(gpx, dataItem, show, notShowNavigationDialog, syncGroup, selectedByUser, addToHistory); } public void clearPoints(GPXFile gpxFile) { diff --git a/OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java b/OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java index c2f3d831b8..a4cdd3e264 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java @@ -93,7 +93,6 @@ import net.osmand.plus.activities.ActivityResultListener; import net.osmand.plus.activities.ActivityResultListener.OnActivityResultListener; import net.osmand.plus.activities.MapActivity; import net.osmand.plus.activities.PluginsFragment; -import net.osmand.plus.dialogs.ConfigureMapMenu; import net.osmand.plus.dialogs.GpxAppearanceAdapter; import net.osmand.plus.dialogs.GpxAppearanceAdapter.AppearanceListItem; import net.osmand.plus.helpers.enums.MetricsConstants; @@ -751,13 +750,32 @@ public class GpxUiHelper { gpxDbHelper.updateShowStartFinish(item, showStartFinish); } - public static void updateGpxInfoView(View v, String itemTitle, GPXInfo info, GpxDataItem dataItem, boolean currentlyRecordingTrack, OsmandApplication app) { + public static void updateGpxInfoView(OsmandApplication app, + View v, + String itemTitle, + Drawable iconDrawable, + GPXInfo info) { + GpxDataItem dataItem = getDataItem(app, info); + updateGpxInfoView(v, itemTitle, info, dataItem, false, app); + if (iconDrawable != null) { + ImageView icon = (ImageView) v.findViewById(R.id.icon); + icon.setImageDrawable(iconDrawable); + icon.setVisibility(View.VISIBLE); + } + } + + public static void updateGpxInfoView(View v, + String itemTitle, + GPXInfo info, + GpxDataItem dataItem, + boolean currentlyRecordingTrack, + OsmandApplication app) { TextView viewName = ((TextView) v.findViewById(R.id.name)); viewName.setText(itemTitle.replace("/", " • ").trim()); + viewName.setTypeface(Typeface.DEFAULT, Typeface.NORMAL); ImageView icon = (ImageView) v.findViewById(R.id.icon); icon.setVisibility(View.GONE); //icon.setImageDrawable(app.getIconsCache().getThemedIcon(R.drawable.ic_action_polygom_dark)); - viewName.setTypeface(Typeface.DEFAULT, Typeface.NORMAL); GPXTrackAnalysis analysis = null; if (currentlyRecordingTrack) { @@ -809,9 +827,19 @@ public class GpxUiHelper { } TextView descr = ((TextView) v.findViewById(R.id.description)); - descr.setVisibility(View.GONE); + if (descr != null) { + descr.setVisibility(View.GONE); + } - v.findViewById(R.id.check_item).setVisibility(View.GONE); + View checkbox = v.findViewById(R.id.check_item); + if (checkbox != null) { + checkbox.setVisibility(View.GONE); + } + } + + private static GpxDataItem getDataItem(OsmandApplication app, GPXInfo info) { + return app.getGpxDbHelper().getItem( + new File(app.getAppPath(IndexConstants.GPX_INDEX_DIR), info.getFileName())); } @TargetApi(Build.VERSION_CODES.KITKAT) @@ -884,6 +912,17 @@ public class GpxUiHelper { return list; } + @Nullable + public static GPXInfo getGpxInfoByFileName(@NonNull OsmandApplication app, @NonNull String fileName) { + final File dir = app.getAppPath(IndexConstants.GPX_INDEX_DIR); + List infoList = getSortedGPXFilesInfo(dir, null, false); + for (GPXInfo info : infoList) { + if (Algorithms.objectEquals(info.fileName, fileName)) { + return info; + } + } + return null; + } public static List getSortedGPXFilesInfo(File dir, final List selectedGpxList, boolean absolutePath) { final List list = new ArrayList<>(); diff --git a/OsmAnd/src/net/osmand/plus/helpers/SearchHistoryHelper.java b/OsmAnd/src/net/osmand/plus/helpers/SearchHistoryHelper.java index 693227f434..e2fe995b4b 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/SearchHistoryHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/SearchHistoryHelper.java @@ -16,6 +16,8 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import static net.osmand.data.PointDescription.POINT_TYPE_GPX_FILE; + public class SearchHistoryHelper { private static final int HISTORY_LIMIT = 1500; @@ -40,6 +42,10 @@ public class SearchHistoryHelper { return instance; } + public void addGpxFileToHistory(String fileName) { + addNewItemToHistory(0, 0, new PointDescription(POINT_TYPE_GPX_FILE, fileName)); + } + public void addNewItemToHistory(double latitude, double longitude, PointDescription pointDescription) { addNewItemToHistory(new HistoryEntry(latitude, longitude, pointDescription)); } diff --git a/OsmAnd/src/net/osmand/plus/search/QuickSearchDialogFragment.java b/OsmAnd/src/net/osmand/plus/search/QuickSearchDialogFragment.java index 9badea394e..a9ddd6bcc3 100644 --- a/OsmAnd/src/net/osmand/plus/search/QuickSearchDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/search/QuickSearchDialogFragment.java @@ -90,6 +90,7 @@ import net.osmand.plus.poi.RearrangePoiFiltersFragment; import net.osmand.plus.resources.RegionAddressRepository; import net.osmand.plus.search.QuickSearchHelper.SearchHistoryAPI; import net.osmand.plus.search.listitems.QuickSearchButtonListItem; +import net.osmand.plus.search.listitems.QuickSearchGpxTrackListItem; import net.osmand.plus.search.listitems.QuickSearchHeaderListItem; import net.osmand.plus.search.listitems.QuickSearchListItem; import net.osmand.plus.search.listitems.QuickSearchMoreListItem; @@ -117,6 +118,7 @@ import java.util.List; import static net.osmand.plus.search.SendSearchQueryBottomSheet.MISSING_SEARCH_LOCATION_KEY; import static net.osmand.plus.search.SendSearchQueryBottomSheet.MISSING_SEARCH_QUERY_KEY; +import static net.osmand.search.core.ObjectType.GPX_TRACK; import static net.osmand.search.core.ObjectType.POI_TYPE; import static net.osmand.search.core.ObjectType.SEARCH_STARTED; import static net.osmand.search.core.SearchCoreFactory.SEARCH_AMENITY_TYPE_PRIORITY; @@ -1232,7 +1234,7 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC if (res != null) { List rows = new ArrayList<>(); for (SearchResult sr : res.getCurrentSearchResults()) { - rows.add(new QuickSearchListItem(app, sr)); + addListItem(rows, sr); } rows.add(new QuickSearchButtonListItem(app, R.drawable.ic_world_globe_dark, app.getString(R.string.search_online_address), new OnClickListener() { @@ -1499,7 +1501,7 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC int limit = 15; for (SearchResult sr : res.getCurrentSearchResults()) { if (limit > 0) { - rows.add(new QuickSearchListItem(app, sr)); + addListItem(rows, sr); } limit--; } @@ -1539,7 +1541,7 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC List rows = new ArrayList<>(); if (res != null) { for (SearchResult sr : res.getCurrentSearchResults()) { - rows.add(new QuickSearchListItem(app, sr)); + addListItem(rows, sr); } } historySearchFragment.updateListAdapter(rows, false); @@ -1550,6 +1552,14 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC } } + private void addListItem(List rows, SearchResult sr) { + if (sr.objectType == GPX_TRACK) { + rows.add(new QuickSearchGpxTrackListItem(app, sr)); + } else { + rows.add(new QuickSearchListItem(app, sr)); + } + } + private void restoreSearch() { if (addressSearch) { startAddressSearch(); @@ -2051,7 +2061,7 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC List rows = new ArrayList<>(); if (res != null && res.getCurrentSearchResults().size() > 0) { for (final SearchResult sr : res.getCurrentSearchResults()) { - rows.add(new QuickSearchListItem(app, sr)); + addListItem(rows, sr); } updateSendEmptySearchBottomBar(false); } diff --git a/OsmAnd/src/net/osmand/plus/search/QuickSearchHelper.java b/OsmAnd/src/net/osmand/plus/search/QuickSearchHelper.java index 1213f550c1..2fd06c4f6e 100644 --- a/OsmAnd/src/net/osmand/plus/search/QuickSearchHelper.java +++ b/OsmAnd/src/net/osmand/plus/search/QuickSearchHelper.java @@ -23,6 +23,8 @@ import net.osmand.plus.OsmAndFormatter; import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; import net.osmand.plus.activities.MapActivity; +import net.osmand.plus.helpers.GpxUiHelper; +import net.osmand.plus.helpers.GpxUiHelper.GPXInfo; import net.osmand.plus.helpers.SearchHistoryHelper; import net.osmand.plus.helpers.SearchHistoryHelper.HistoryEntry; import net.osmand.plus.poi.NominatimPoiFilter; @@ -457,6 +459,14 @@ public class QuickSearchHelper implements ResourceListener { sr.objectType = ObjectType.POI_TYPE; publish = true; } + } else if (pd.isGpxFile()) { + GPXInfo gpxInfo = GpxUiHelper.getGpxInfoByFileName(app, pd.getName()); + if (gpxInfo != null) { + sr.localeName = gpxInfo.getFileName(); + sr.object = gpxInfo; + sr.objectType = ObjectType.GPX_TRACK; + publish = true; + } } else { sr.localeName = pd.getName(); sr.object = point; diff --git a/OsmAnd/src/net/osmand/plus/search/QuickSearchListAdapter.java b/OsmAnd/src/net/osmand/plus/search/QuickSearchListAdapter.java index e7016a34ae..f1332a18e5 100644 --- a/OsmAnd/src/net/osmand/plus/search/QuickSearchListAdapter.java +++ b/OsmAnd/src/net/osmand/plus/search/QuickSearchListAdapter.java @@ -30,6 +30,8 @@ import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; import net.osmand.plus.UiUtilities.UpdateLocationViewCache; import net.osmand.plus.chooseplan.ChoosePlanDialogFragment; +import net.osmand.plus.helpers.GpxUiHelper; +import net.osmand.plus.helpers.GpxUiHelper.GPXInfo; import net.osmand.plus.search.listitems.QuickSearchBannerListItem; import net.osmand.plus.mapcontextmenu.MenuController; import net.osmand.plus.search.listitems.QuickSearchHeaderListItem; @@ -225,6 +227,8 @@ public class QuickSearchListAdapter extends ArrayAdapter { return bindTopShadowItem(convertView); } else if (type == QuickSearchListItemType.BOTTOM_SHADOW) { return bindBottomShadowItem(convertView); + } else if (type == QuickSearchListItemType.GPX_TRACK) { + view = bindGpxTrackItem(position, convertView, listItem); } else { view = bindSearchResultItem(position, convertView, listItem); } @@ -395,6 +399,17 @@ public class QuickSearchListAdapter extends ArrayAdapter { return getLinearLayout(convertView, R.layout.list_shadow_footer); } + private LinearLayout bindGpxTrackItem(int position, + @Nullable View convertView, + @NonNull QuickSearchListItem listItem) { + LinearLayout view = getLinearLayout(convertView, R.layout.search_gpx_list_item); + SearchResult sr = listItem.getSearchResult(); + GPXInfo gpxInfo = (GPXInfo) sr.object; + setupCheckBox(position, view, listItem); + GpxUiHelper.updateGpxInfoView(app, view, sr.localeName, listItem.getIcon(), gpxInfo); + return view; + } + private LinearLayout bindSearchResultItem(int position, @Nullable View convertView, @NonNull QuickSearchListItem listItem) { diff --git a/OsmAnd/src/net/osmand/plus/search/QuickSearchListFragment.java b/OsmAnd/src/net/osmand/plus/search/QuickSearchListFragment.java index f667595650..b0522989b9 100644 --- a/OsmAnd/src/net/osmand/plus/search/QuickSearchListFragment.java +++ b/OsmAnd/src/net/osmand/plus/search/QuickSearchListFragment.java @@ -11,6 +11,7 @@ import android.widget.ArrayAdapter; import android.widget.ListView; import net.osmand.GPXUtilities; +import net.osmand.IndexConstants; import net.osmand.data.Amenity; import net.osmand.data.City; import net.osmand.data.FavouritePoint; @@ -23,6 +24,8 @@ import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; import net.osmand.plus.activities.MapActivity; import net.osmand.plus.base.OsmAndListFragment; +import net.osmand.plus.helpers.GpxUiHelper.GPXInfo; +import net.osmand.plus.helpers.SearchHistoryHelper; import net.osmand.plus.helpers.SearchHistoryHelper.HistoryEntry; import net.osmand.plus.search.QuickSearchDialogFragment.QuickSearchType; import net.osmand.plus.search.listitems.QuickSearchBottomShadowListItem; @@ -30,10 +33,12 @@ import net.osmand.plus.search.listitems.QuickSearchButtonListItem; import net.osmand.plus.search.listitems.QuickSearchListItem; import net.osmand.plus.search.listitems.QuickSearchListItemType; import net.osmand.plus.search.listitems.QuickSearchTopShadowListItem; +import net.osmand.plus.track.TrackMenuFragment; import net.osmand.search.core.ObjectType; import net.osmand.search.core.SearchResult; import net.osmand.util.Algorithms; +import java.io.File; import java.util.ArrayList; import java.util.List; @@ -104,6 +109,11 @@ public abstract class QuickSearchListFragment extends OsmAndListFragment { } dialogFragment.completeQueryWithObject(sr); } + } else if (item.getType() == QuickSearchListItemType.GPX_TRACK) { + SearchResult sr = item.getSearchResult(); + if (sr.objectType == ObjectType.GPX_TRACK) { + showTrackMenuFragment((GPXInfo) sr.object); + } } } } @@ -292,6 +302,17 @@ public abstract class QuickSearchListFragment extends OsmAndListFragment { } } + private void showTrackMenuFragment(GPXInfo gpxInfo) { + OsmandApplication app = getMyApplication(); + MapActivity mapActivity = getMapActivity(); + String fileName = gpxInfo.getFileName(); + SearchHistoryHelper.getInstance(app).addGpxFileToHistory(fileName); + File file = new File(app.getAppPath(IndexConstants.GPX_INDEX_DIR), fileName); + String path = file.getAbsolutePath(); + TrackMenuFragment.showInstance(mapActivity, path, false, null, null); + dialogFragment.dismiss(); + } + public MapActivity getMapActivity() { return (MapActivity) getActivity(); } diff --git a/OsmAnd/src/net/osmand/plus/search/listitems/QuickSearchGpxTrackListItem.java b/OsmAnd/src/net/osmand/plus/search/listitems/QuickSearchGpxTrackListItem.java new file mode 100644 index 0000000000..35eb6c2a69 --- /dev/null +++ b/OsmAnd/src/net/osmand/plus/search/listitems/QuickSearchGpxTrackListItem.java @@ -0,0 +1,16 @@ +package net.osmand.plus.search.listitems; + +import net.osmand.plus.OsmandApplication; +import net.osmand.search.core.SearchResult; + +public class QuickSearchGpxTrackListItem extends QuickSearchListItem { + + public QuickSearchGpxTrackListItem(OsmandApplication app, SearchResult searchResult) { + super(app, searchResult); + } + + @Override + public QuickSearchListItemType getType() { + return QuickSearchListItemType.GPX_TRACK; + } +} diff --git a/OsmAnd/src/net/osmand/plus/search/listitems/QuickSearchListItem.java b/OsmAnd/src/net/osmand/plus/search/listitems/QuickSearchListItem.java index 204c31de88..d1ffab835c 100644 --- a/OsmAnd/src/net/osmand/plus/search/listitems/QuickSearchListItem.java +++ b/OsmAnd/src/net/osmand/plus/search/listitems/QuickSearchListItem.java @@ -382,6 +382,8 @@ public class QuickSearchListItem { case WPT: WptPt wpt = (WptPt) searchResult.object; return PointImageDrawable.getFromWpt(app, wpt.getColor(), false, wpt); + case GPX_TRACK: + return getIcon(app, R.drawable.ic_action_polygom_dark); case UNKNOWN_NAME_FILTER: break; } diff --git a/OsmAnd/src/net/osmand/plus/search/listitems/QuickSearchListItemType.java b/OsmAnd/src/net/osmand/plus/search/listitems/QuickSearchListItemType.java index 3c6dcf4527..db0ebf5f9a 100644 --- a/OsmAnd/src/net/osmand/plus/search/listitems/QuickSearchListItemType.java +++ b/OsmAnd/src/net/osmand/plus/search/listitems/QuickSearchListItemType.java @@ -2,6 +2,7 @@ package net.osmand.plus.search.listitems; public enum QuickSearchListItemType { SEARCH_RESULT, + GPX_TRACK, HEADER, BUTTON, SEARCH_MORE, 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 05/59] 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 8ceab0c5c3c80d944e005c1342bd2ff5fca865b7 Mon Sep 17 00:00:00 2001 From: nazar-kutz Date: Mon, 1 Mar 2021 18:45:37 +0200 Subject: [PATCH 06/59] Add visible GPX to history - refactoring --- .../net/osmand/plus/GpxSelectionHelper.java | 4 +- .../net/osmand/plus/helpers/GpxUiHelper.java | 45 ++++++++++++++----- .../plus/helpers/SearchHistoryHelper.java | 15 +++++-- .../search/QuickSearchDialogFragment.java | 3 +- .../osmand/plus/search/QuickSearchHelper.java | 1 + .../plus/search/QuickSearchListAdapter.java | 3 +- .../plus/search/QuickSearchListFragment.java | 7 ++- .../osmand/plus/track/TrackMenuFragment.java | 4 ++ 8 files changed, 61 insertions(+), 21 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java b/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java index 72aa50552e..83ed3214c3 100644 --- a/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java +++ b/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java @@ -27,6 +27,7 @@ import net.osmand.plus.activities.SavingTrackHelper; import net.osmand.plus.helpers.GpxUiHelper; import net.osmand.plus.helpers.GpxUiHelper.GPXDataSetAxisType; import net.osmand.plus.helpers.GpxUiHelper.GPXDataSetType; +import net.osmand.plus.helpers.GpxUiHelper.GPXInfo; import net.osmand.plus.helpers.SearchHistoryHelper; import net.osmand.plus.helpers.enums.MetricsConstants; import net.osmand.plus.mapmarkers.MapMarkersGroup; @@ -735,7 +736,8 @@ public class GpxSelectionHelper { String path = gpx.path; String rootGpxDir = app.getAppPath(IndexConstants.GPX_INDEX_DIR).getAbsolutePath() + '/'; String fileName = path.replace(rootGpxDir, ""); - SearchHistoryHelper.getInstance(app).addGpxFileToHistory(fileName); + GPXInfo gpxInfo = GpxUiHelper.getGpxInfoByFileName(app, fileName); + SearchHistoryHelper.getInstance(app).addNewItemToHistory(gpxInfo); } return sf; } diff --git a/OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java b/OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java index a4cdd3e264..1d49394ea0 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java @@ -750,12 +750,33 @@ public class GpxUiHelper { gpxDbHelper.updateShowStartFinish(item, showStartFinish); } - public static void updateGpxInfoView(OsmandApplication app, - View v, - String itemTitle, - Drawable iconDrawable, - GPXInfo info) { - GpxDataItem dataItem = getDataItem(app, info); + public static void updateGpxInfoView(final @NonNull OsmandApplication app, + final @NonNull View v, + final @NonNull String itemTitle, + final @Nullable Drawable iconDrawable, + final @NonNull GPXInfo info) { + GpxDataItem item = getDataItem(app, info, new GpxDataItemCallback() { + @Override + public boolean isCancelled() { + return false; + } + + @Override + public void onGpxDataItemReady(GpxDataItem item) { + updateGpxInfoView(app, v, itemTitle, iconDrawable, info, item); + } + }); + if (item != null) { + updateGpxInfoView(app, v, itemTitle, iconDrawable, info, item); + } + } + + private static void updateGpxInfoView(@NonNull OsmandApplication app, + @NonNull View v, + @NonNull String itemTitle, + @Nullable Drawable iconDrawable, + @NonNull GPXInfo info, + @NonNull GpxDataItem dataItem) { updateGpxInfoView(v, itemTitle, info, dataItem, false, app); if (iconDrawable != null) { ImageView icon = (ImageView) v.findViewById(R.id.icon); @@ -837,9 +858,13 @@ public class GpxUiHelper { } } - private static GpxDataItem getDataItem(OsmandApplication app, GPXInfo info) { - return app.getGpxDbHelper().getItem( - new File(app.getAppPath(IndexConstants.GPX_INDEX_DIR), info.getFileName())); + private static GpxDataItem getDataItem(@NonNull OsmandApplication app, + @NonNull GPXInfo info, + @Nullable GpxDataItemCallback callback) { + File dir = app.getAppPath(IndexConstants.GPX_INDEX_DIR); + String fileName = info.getFileName(); + File file = new File(dir, fileName); + return app.getGpxDbHelper().getItem(file, callback); } @TargetApi(Build.VERSION_CODES.KITKAT) @@ -917,7 +942,7 @@ public class GpxUiHelper { final File dir = app.getAppPath(IndexConstants.GPX_INDEX_DIR); List infoList = getSortedGPXFilesInfo(dir, null, false); for (GPXInfo info : infoList) { - if (Algorithms.objectEquals(info.fileName, fileName)) { + if (Algorithms.objectEquals(info.getFileName(), fileName)) { return info; } } diff --git a/OsmAnd/src/net/osmand/plus/helpers/SearchHistoryHelper.java b/OsmAnd/src/net/osmand/plus/helpers/SearchHistoryHelper.java index e2fe995b4b..b71b83316f 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/SearchHistoryHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/SearchHistoryHelper.java @@ -6,6 +6,7 @@ import net.osmand.osm.AbstractPoiType; import net.osmand.plus.OsmandApplication; import net.osmand.plus.api.SQLiteAPI.SQLiteConnection; import net.osmand.plus.api.SQLiteAPI.SQLiteCursor; +import net.osmand.plus.helpers.GpxUiHelper.GPXInfo; import net.osmand.plus.poi.PoiUIFilter; import net.osmand.util.Algorithms; @@ -42,10 +43,6 @@ public class SearchHistoryHelper { return instance; } - public void addGpxFileToHistory(String fileName) { - addNewItemToHistory(0, 0, new PointDescription(POINT_TYPE_GPX_FILE, fileName)); - } - public void addNewItemToHistory(double latitude, double longitude, PointDescription pointDescription) { addNewItemToHistory(new HistoryEntry(latitude, longitude, pointDescription)); } @@ -59,6 +56,10 @@ public class SearchHistoryHelper { context.getPoiFilters().markHistory(filter.getFilterId(), true); } + public void addNewItemToHistory(GPXInfo gpxInfo) { + addNewItemToHistory(new HistoryEntry(0, 0, createPointDescription(gpxInfo))); + } + public List getHistoryEntries(boolean onlyPoints) { if (loadedEntries == null) { checkLoadedEntries(); @@ -81,6 +82,10 @@ public class SearchHistoryHelper { return new PointDescription(PointDescription.POINT_TYPE_CUSTOM_POI_FILTER, filter.getFilterId()); } + private PointDescription createPointDescription(GPXInfo gpxInfo) { + return new PointDescription(PointDescription.POINT_TYPE_GPX_FILE, gpxInfo.getFileName()); + } + public void remove(Object item) { PointDescription pd = null; if (item instanceof HistoryEntry) { @@ -89,6 +94,8 @@ public class SearchHistoryHelper { pd = createPointDescription((AbstractPoiType) item); } else if (item instanceof PoiUIFilter) { pd = createPointDescription((PoiUIFilter) item); + } else if (item instanceof GPXInfo) { + pd = createPointDescription((GPXInfo) item); } if (pd != null) { remove(pd); diff --git a/OsmAnd/src/net/osmand/plus/search/QuickSearchDialogFragment.java b/OsmAnd/src/net/osmand/plus/search/QuickSearchDialogFragment.java index a9ddd6bcc3..c53d0c9b4c 100644 --- a/OsmAnd/src/net/osmand/plus/search/QuickSearchDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/search/QuickSearchDialogFragment.java @@ -515,7 +515,8 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC List historyEntries = new ArrayList(); List selectedItems = historySearchFragment.getListAdapter().getSelectedItems(); for (QuickSearchListItem searchListItem : selectedItems) { - Object object = searchListItem.getSearchResult().object; + SearchResult sr = searchListItem.getSearchResult(); + Object object = sr.objectType == GPX_TRACK ? sr.relatedObject : sr.object; if (object instanceof HistoryEntry) { historyEntries.add((HistoryEntry) object); } diff --git a/OsmAnd/src/net/osmand/plus/search/QuickSearchHelper.java b/OsmAnd/src/net/osmand/plus/search/QuickSearchHelper.java index 2fd06c4f6e..060fc01338 100644 --- a/OsmAnd/src/net/osmand/plus/search/QuickSearchHelper.java +++ b/OsmAnd/src/net/osmand/plus/search/QuickSearchHelper.java @@ -465,6 +465,7 @@ public class QuickSearchHelper implements ResourceListener { sr.localeName = gpxInfo.getFileName(); sr.object = gpxInfo; sr.objectType = ObjectType.GPX_TRACK; + sr.relatedObject = point; publish = true; } } else { diff --git a/OsmAnd/src/net/osmand/plus/search/QuickSearchListAdapter.java b/OsmAnd/src/net/osmand/plus/search/QuickSearchListAdapter.java index f1332a18e5..f7c028f186 100644 --- a/OsmAnd/src/net/osmand/plus/search/QuickSearchListAdapter.java +++ b/OsmAnd/src/net/osmand/plus/search/QuickSearchListAdapter.java @@ -579,7 +579,8 @@ public class QuickSearchListAdapter extends ArrayAdapter { selectedItems.clear(); for (int i = 0; i < getCount(); i++) { QuickSearchListItemType t = getItem(i).getType(); - if (t == QuickSearchListItemType.SEARCH_RESULT) { + if (t == QuickSearchListItemType.SEARCH_RESULT + || t == QuickSearchListItemType.GPX_TRACK) { selectedItems.add(getItem(i)); } } diff --git a/OsmAnd/src/net/osmand/plus/search/QuickSearchListFragment.java b/OsmAnd/src/net/osmand/plus/search/QuickSearchListFragment.java index b0522989b9..e371a334d1 100644 --- a/OsmAnd/src/net/osmand/plus/search/QuickSearchListFragment.java +++ b/OsmAnd/src/net/osmand/plus/search/QuickSearchListFragment.java @@ -305,11 +305,10 @@ public abstract class QuickSearchListFragment extends OsmAndListFragment { private void showTrackMenuFragment(GPXInfo gpxInfo) { OsmandApplication app = getMyApplication(); MapActivity mapActivity = getMapActivity(); - String fileName = gpxInfo.getFileName(); - SearchHistoryHelper.getInstance(app).addGpxFileToHistory(fileName); - File file = new File(app.getAppPath(IndexConstants.GPX_INDEX_DIR), fileName); + SearchHistoryHelper.getInstance(app).addNewItemToHistory(gpxInfo); + File file = new File(app.getAppPath(IndexConstants.GPX_INDEX_DIR), gpxInfo.getFileName()); String path = file.getAbsolutePath(); - TrackMenuFragment.showInstance(mapActivity, path, false, null, null); + TrackMenuFragment.showInstance(mapActivity, path, false, null, QuickSearchDialogFragment.TAG); dialogFragment.dismiss(); } diff --git a/OsmAnd/src/net/osmand/plus/track/TrackMenuFragment.java b/OsmAnd/src/net/osmand/plus/track/TrackMenuFragment.java index b72d4803fe..9cdbf2e6a7 100644 --- a/OsmAnd/src/net/osmand/plus/track/TrackMenuFragment.java +++ b/OsmAnd/src/net/osmand/plus/track/TrackMenuFragment.java @@ -59,6 +59,7 @@ import net.osmand.plus.R; import net.osmand.plus.UiUtilities; import net.osmand.plus.UiUtilities.UpdateLocationViewCache; import net.osmand.plus.activities.MapActivity; +import net.osmand.plus.activities.MapActivity.ShowQuickSearchMode; import net.osmand.plus.activities.MapActivityActions; import net.osmand.plus.base.ContextMenuFragment; import net.osmand.plus.base.ContextMenuScrollFragment; @@ -82,6 +83,7 @@ import net.osmand.plus.osmedit.OsmEditingPlugin; 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.search.QuickSearchDialogFragment; import net.osmand.plus.track.SaveGpxAsyncTask.SaveGpxListener; import net.osmand.plus.track.TrackSelectSegmentBottomSheet.OnSegmentSelectedListener; import net.osmand.plus.views.AddGpxPointBottomSheetHelper.NewGpxPoint; @@ -270,6 +272,8 @@ public class TrackMenuFragment extends ContextMenuScrollFragment implements Card if (contextMenu.isActive() && contextMenu.getPointDescription() != null && contextMenu.getPointDescription().isGpxPoint()) { contextMenu.show(); + } else if (Algorithms.objectEquals(returnScreenName, QuickSearchDialogFragment.TAG)) { + mapActivity.showQuickSearch(ShowQuickSearchMode.CURRENT, false); } else { mapActivity.launchPrevActivityIntent(); } 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 07/59] 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 605034783ef79337d065f6baa7f9ff1e4c434cdd Mon Sep 17 00:00:00 2001 From: Kseniia Date: Mon, 1 Mar 2021 22:40:43 +0200 Subject: [PATCH 08/59] Add minor stop 10281 --- .../binary/BinaryMapRouteReaderAdapter.java | 36 +++++---- .../net/osmand/binary/RouteDataObject.java | 12 +++ .../osmand/router/RouteResultPreparation.java | 77 ++++++++++++++++++- 3 files changed, 108 insertions(+), 17 deletions(-) diff --git a/OsmAnd-java/src/main/java/net/osmand/binary/BinaryMapRouteReaderAdapter.java b/OsmAnd-java/src/main/java/net/osmand/binary/BinaryMapRouteReaderAdapter.java index 8431df7244..57b87dcc8c 100644 --- a/OsmAnd-java/src/main/java/net/osmand/binary/BinaryMapRouteReaderAdapter.java +++ b/OsmAnd-java/src/main/java/net/osmand/binary/BinaryMapRouteReaderAdapter.java @@ -1,25 +1,9 @@ package net.osmand.binary; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Calendar; -import java.util.Collections; -import java.util.Comparator; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; - -import org.apache.commons.logging.Log; - import com.google.protobuf.CodedInputStream; import com.google.protobuf.InvalidProtocolBufferException; import com.google.protobuf.WireFormat; -import gnu.trove.iterator.TLongObjectIterator; -import gnu.trove.list.array.TIntArrayList; -import gnu.trove.list.array.TLongArrayList; -import gnu.trove.map.hash.TIntObjectHashMap; -import gnu.trove.map.hash.TLongObjectHashMap; import net.osmand.PlatformUtil; import net.osmand.ResultMatcher; import net.osmand.binary.BinaryMapIndexReader.SearchRequest; @@ -34,6 +18,23 @@ import net.osmand.util.Algorithms; import net.osmand.util.MapUtils; import net.osmand.util.OpeningHoursParser; +import org.apache.commons.logging.Log; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Collections; +import java.util.Comparator; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +import gnu.trove.iterator.TLongObjectIterator; +import gnu.trove.list.array.TIntArrayList; +import gnu.trove.list.array.TLongArrayList; +import gnu.trove.map.hash.TIntObjectHashMap; +import gnu.trove.map.hash.TLongObjectHashMap; + public class BinaryMapRouteReaderAdapter { protected static final Log LOG = PlatformUtil.getLog(BinaryMapRouteReaderAdapter.class); private static final int SHIFT_COORDINATES = 4; @@ -303,6 +304,7 @@ public class BinaryMapRouteReaderAdapter { public int directionTrafficSignalsBackward = -1; public int trafficSignals = -1; public int stopSign = -1; + public int stopMinor = -1; public int giveWaySign = -1; int nameTypeRule = -1; @@ -363,6 +365,8 @@ public class BinaryMapRouteReaderAdapter { destinationRefTypeRule = id; } else if (tags.equals("highway") && val.equals("traffic_signals")){ trafficSignals = id; + } else if (tags.equals("stop") && val.equals("minor")) { + stopMinor = id; } else if (tags.equals("highway") && val.equals("stop")){ stopSign = id; } else if (tags.equals("highway") && val.equals("give_way")){ diff --git a/OsmAnd-java/src/main/java/net/osmand/binary/RouteDataObject.java b/OsmAnd-java/src/main/java/net/osmand/binary/RouteDataObject.java index bc81ca667e..61d282e5e4 100644 --- a/OsmAnd-java/src/main/java/net/osmand/binary/RouteDataObject.java +++ b/OsmAnd-java/src/main/java/net/osmand/binary/RouteDataObject.java @@ -8,6 +8,7 @@ import net.osmand.util.Algorithms; import net.osmand.util.MapUtils; import net.osmand.util.TransliterationHelper; +import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.logging.Log; import java.text.MessageFormat; @@ -499,6 +500,17 @@ public class RouteDataObject { } return pointTypes[ind]; } + + public void removePointType(int ind, int type) { + if (pointTypes != null || ind < pointTypes.length) { + int[] typesArr = pointTypes[ind]; + for (int t : typesArr) { + if (t == type) { + pointTypes[ind] = ArrayUtils.removeElement(typesArr, t); + } + } + } + } public int[] getTypes() { return types; 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 26d984b2da..417f4f3511 100644 --- a/OsmAnd-java/src/main/java/net/osmand/router/RouteResultPreparation.java +++ b/OsmAnd-java/src/main/java/net/osmand/router/RouteResultPreparation.java @@ -176,11 +176,86 @@ public class RouteResultPreparation { combineWayPointsForAreaRouting(ctx, result); validateAllPointsConnected(result); splitRoadsAndAttachRoadSegments(ctx, result, recalculation); + for (int i = 0; i < result.size(); i++) { + prepareStopSign(result.get(i)); + } calculateTimeSpeed(ctx, result); - prepareTurnResults(ctx, result); return result; } + + public RouteSegmentResult prepareStopSign(RouteSegmentResult seg) { + int start = seg.getStartPointIndex(); + int end = seg.getEndPointIndex(); + List stops = new ArrayList<>(); + + for (int i = start; i > end; i--) { + int[] pointTypes = seg.getObject().getPointTypes(i); + if (pointTypes != null) { + for (int j = 0; j < pointTypes.length; j++) { + if (pointTypes[j] == seg.getObject().region.stopMinor) { + stops.add(i); + } + } + } + } + + for (int stop : stops) { + List attachedRoutes = seg.getAttachedRoutes(stop); + for (RouteSegmentResult attached : attachedRoutes) { + int attStopPriority = highwayStopPriority(attached.getObject().getHighway()); + int segStopPriority = highwayStopPriority(seg.getObject().getHighway()); + if (segStopPriority > attStopPriority) { + seg.getObject().removePointType(stop, seg.getObject().region.stopSign); + } + } + } + + return seg; + } + + private int highwayStopPriority(String highway) { + if (highway.endsWith("trunk")) { + return 13; + } + if (highway.endsWith("trunk_link")) { + return 12; + } + if (highway.endsWith("primary")) { + return 11; + } + if (highway.endsWith("primary_link")) { + return 10; + } + if (highway.endsWith("secondary")) { + return 9; + } + if (highway.endsWith("secondary_link")) { + return 8; + } + if (highway.endsWith("tertiary")) { + return 7; + } + if (highway.endsWith("tertiary_link")) { + return 6; + } + if (highway.endsWith("residential")) { + return 5; + } + if (highway.endsWith("living_street")) { + return 4; + } + if (highway.endsWith("track")) { + return 3; + } + if (highway.endsWith("footway")) { + return 2; + } + if (highway.endsWith("path")) { + return 1; + } + return 0; + } public void prepareTurnResults(RoutingContext ctx, List result) { for (int i = 0; i < result.size(); i ++) { From e15dece046e0172300b03a9043b373886d683974 Mon Sep 17 00:00:00 2001 From: Kseniia Date: Tue, 2 Mar 2021 11:17:30 +0200 Subject: [PATCH 09/59] Add minor stop 10281 --- OsmAnd-java/build.gradle | 1 + .../osmand/router/RouteResultPreparation.java | 51 ++----------------- 2 files changed, 5 insertions(+), 47 deletions(-) diff --git a/OsmAnd-java/build.gradle b/OsmAnd-java/build.gradle index d461ea8aff..d4e77b9d85 100644 --- a/OsmAnd-java/build.gradle +++ b/OsmAnd-java/build.gradle @@ -112,6 +112,7 @@ dependencies { implementation group: 'org.json', name: 'json', version: '20171018' implementation 'it.unibo.alice.tuprolog:tuprolog:3.2.1' implementation 'org.apache.commons:commons-compress:1.17' + implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.0' implementation 'com.moparisthebest:junidecode:0.1.1' implementation 'com.vividsolutions:jts-core:1.14.0' implementation 'com.google.openlocationcode:openlocationcode:1.0.4' 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 417f4f3511..d79bbc53da 100644 --- a/OsmAnd-java/src/main/java/net/osmand/router/RouteResultPreparation.java +++ b/OsmAnd-java/src/main/java/net/osmand/router/RouteResultPreparation.java @@ -203,59 +203,16 @@ public class RouteResultPreparation { for (int stop : stops) { List attachedRoutes = seg.getAttachedRoutes(stop); for (RouteSegmentResult attached : attachedRoutes) { - int attStopPriority = highwayStopPriority(attached.getObject().getHighway()); - int segStopPriority = highwayStopPriority(seg.getObject().getHighway()); - if (segStopPriority > attStopPriority) { + int attStopPriority = highwaySpeakPriority(attached.getObject().getHighway()); + int segStopPriority = highwaySpeakPriority(seg.getObject().getHighway()); + if (segStopPriority < attStopPriority) { seg.getObject().removePointType(stop, seg.getObject().region.stopSign); + break; } } } - return seg; } - - private int highwayStopPriority(String highway) { - if (highway.endsWith("trunk")) { - return 13; - } - if (highway.endsWith("trunk_link")) { - return 12; - } - if (highway.endsWith("primary")) { - return 11; - } - if (highway.endsWith("primary_link")) { - return 10; - } - if (highway.endsWith("secondary")) { - return 9; - } - if (highway.endsWith("secondary_link")) { - return 8; - } - if (highway.endsWith("tertiary")) { - return 7; - } - if (highway.endsWith("tertiary_link")) { - return 6; - } - if (highway.endsWith("residential")) { - return 5; - } - if (highway.endsWith("living_street")) { - return 4; - } - if (highway.endsWith("track")) { - return 3; - } - if (highway.endsWith("footway")) { - return 2; - } - if (highway.endsWith("path")) { - return 1; - } - return 0; - } public void prepareTurnResults(RoutingContext ctx, List result) { for (int i = 0; i < result.size(); i ++) { From d942a4f683cb6fe5d90a8d5b167d4be5d64d0dd9 Mon Sep 17 00:00:00 2001 From: nazar-kutz Date: Tue, 2 Mar 2021 18:06:25 +0200 Subject: [PATCH 10/59] Make GPX track search result like other search results --- .../net/osmand/search/core/ObjectType.java | 2 +- .../search/SearchHistoryFragment.java | 6 ++- .../search/QuickSearchDialogFragment.java | 20 +++------- .../osmand/plus/search/QuickSearchHelper.java | 6 +-- .../plus/search/QuickSearchListAdapter.java | 37 +++++++++++++------ .../plus/search/QuickSearchListFragment.java | 9 ++--- .../QuickSearchGpxTrackListItem.java | 16 -------- .../search/listitems/QuickSearchListItem.java | 2 - .../listitems/QuickSearchListItemType.java | 1 - 9 files changed, 41 insertions(+), 58 deletions(-) delete mode 100644 OsmAnd/src/net/osmand/plus/search/listitems/QuickSearchGpxTrackListItem.java diff --git a/OsmAnd-java/src/main/java/net/osmand/search/core/ObjectType.java b/OsmAnd-java/src/main/java/net/osmand/search/core/ObjectType.java index df81a9ce18..c14d5cff07 100644 --- a/OsmAnd-java/src/main/java/net/osmand/search/core/ObjectType.java +++ b/OsmAnd-java/src/main/java/net/osmand/search/core/ObjectType.java @@ -8,7 +8,7 @@ public enum ObjectType { // LOCATION LOCATION(true), PARTIAL_LOCATION(false), // UI OBJECTS - FAVORITE(true), FAVORITE_GROUP(false), WPT(true), RECENT_OBJ(true), GPX_TRACK(false), + FAVORITE(true), FAVORITE_GROUP(false), WPT(true), RECENT_OBJ(true), // ONLINE SEARCH ONLINE_SEARCH(true), diff --git a/OsmAnd/src/net/osmand/plus/activities/search/SearchHistoryFragment.java b/OsmAnd/src/net/osmand/plus/activities/search/SearchHistoryFragment.java index 536ef96541..234f9ec1af 100644 --- a/OsmAnd/src/net/osmand/plus/activities/search/SearchHistoryFragment.java +++ b/OsmAnd/src/net/osmand/plus/activities/search/SearchHistoryFragment.java @@ -303,9 +303,11 @@ public class SearchHistoryFragment extends OsmAndListFragment implements SearchA iconId = R.drawable.ic_type_audio; } else if (pd.isVideoNote()) { iconId = R.drawable.ic_type_video; - }else if (pd.isPhotoNote()) { + } else if (pd.isPhotoNote()) { iconId = R.drawable.ic_type_img; - } else { + } else if (pd.isGpxFile()) { + iconId = R.drawable.ic_action_polygom_dark; + } else { iconId = R.drawable.ic_action_street_name; } return iconId; diff --git a/OsmAnd/src/net/osmand/plus/search/QuickSearchDialogFragment.java b/OsmAnd/src/net/osmand/plus/search/QuickSearchDialogFragment.java index c53d0c9b4c..463db3a6f7 100644 --- a/OsmAnd/src/net/osmand/plus/search/QuickSearchDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/search/QuickSearchDialogFragment.java @@ -90,7 +90,6 @@ import net.osmand.plus.poi.RearrangePoiFiltersFragment; import net.osmand.plus.resources.RegionAddressRepository; import net.osmand.plus.search.QuickSearchHelper.SearchHistoryAPI; import net.osmand.plus.search.listitems.QuickSearchButtonListItem; -import net.osmand.plus.search.listitems.QuickSearchGpxTrackListItem; import net.osmand.plus.search.listitems.QuickSearchHeaderListItem; import net.osmand.plus.search.listitems.QuickSearchListItem; import net.osmand.plus.search.listitems.QuickSearchMoreListItem; @@ -118,7 +117,6 @@ import java.util.List; import static net.osmand.plus.search.SendSearchQueryBottomSheet.MISSING_SEARCH_LOCATION_KEY; import static net.osmand.plus.search.SendSearchQueryBottomSheet.MISSING_SEARCH_QUERY_KEY; -import static net.osmand.search.core.ObjectType.GPX_TRACK; import static net.osmand.search.core.ObjectType.POI_TYPE; import static net.osmand.search.core.ObjectType.SEARCH_STARTED; import static net.osmand.search.core.SearchCoreFactory.SEARCH_AMENITY_TYPE_PRIORITY; @@ -516,7 +514,7 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC List selectedItems = historySearchFragment.getListAdapter().getSelectedItems(); for (QuickSearchListItem searchListItem : selectedItems) { SearchResult sr = searchListItem.getSearchResult(); - Object object = sr.objectType == GPX_TRACK ? sr.relatedObject : sr.object; + Object object = sr.object; if (object instanceof HistoryEntry) { historyEntries.add((HistoryEntry) object); } @@ -1235,7 +1233,7 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC if (res != null) { List rows = new ArrayList<>(); for (SearchResult sr : res.getCurrentSearchResults()) { - addListItem(rows, sr); + rows.add(new QuickSearchListItem(app, sr)); } rows.add(new QuickSearchButtonListItem(app, R.drawable.ic_world_globe_dark, app.getString(R.string.search_online_address), new OnClickListener() { @@ -1502,7 +1500,7 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC int limit = 15; for (SearchResult sr : res.getCurrentSearchResults()) { if (limit > 0) { - addListItem(rows, sr); + rows.add(new QuickSearchListItem(app, sr)); } limit--; } @@ -1542,7 +1540,7 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC List rows = new ArrayList<>(); if (res != null) { for (SearchResult sr : res.getCurrentSearchResults()) { - addListItem(rows, sr); + rows.add(new QuickSearchListItem(app, sr)); } } historySearchFragment.updateListAdapter(rows, false); @@ -1553,14 +1551,6 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC } } - private void addListItem(List rows, SearchResult sr) { - if (sr.objectType == GPX_TRACK) { - rows.add(new QuickSearchGpxTrackListItem(app, sr)); - } else { - rows.add(new QuickSearchListItem(app, sr)); - } - } - private void restoreSearch() { if (addressSearch) { startAddressSearch(); @@ -2062,7 +2052,7 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC List rows = new ArrayList<>(); if (res != null && res.getCurrentSearchResults().size() > 0) { for (final SearchResult sr : res.getCurrentSearchResults()) { - addListItem(rows, sr); + rows.add(new QuickSearchListItem(app, sr)); } updateSendEmptySearchBottomBar(false); } diff --git a/OsmAnd/src/net/osmand/plus/search/QuickSearchHelper.java b/OsmAnd/src/net/osmand/plus/search/QuickSearchHelper.java index 060fc01338..7a47446fa6 100644 --- a/OsmAnd/src/net/osmand/plus/search/QuickSearchHelper.java +++ b/OsmAnd/src/net/osmand/plus/search/QuickSearchHelper.java @@ -463,9 +463,9 @@ public class QuickSearchHelper implements ResourceListener { GPXInfo gpxInfo = GpxUiHelper.getGpxInfoByFileName(app, pd.getName()); if (gpxInfo != null) { sr.localeName = gpxInfo.getFileName(); - sr.object = gpxInfo; - sr.objectType = ObjectType.GPX_TRACK; - sr.relatedObject = point; + sr.object = point; + sr.objectType = ObjectType.RECENT_OBJ; + sr.relatedObject = gpxInfo; publish = true; } } else { diff --git a/OsmAnd/src/net/osmand/plus/search/QuickSearchListAdapter.java b/OsmAnd/src/net/osmand/plus/search/QuickSearchListAdapter.java index f7c028f186..64593b5492 100644 --- a/OsmAnd/src/net/osmand/plus/search/QuickSearchListAdapter.java +++ b/OsmAnd/src/net/osmand/plus/search/QuickSearchListAdapter.java @@ -227,8 +227,6 @@ public class QuickSearchListAdapter extends ArrayAdapter { return bindTopShadowItem(convertView); } else if (type == QuickSearchListItemType.BOTTOM_SHADOW) { return bindBottomShadowItem(convertView); - } else if (type == QuickSearchListItemType.GPX_TRACK) { - view = bindGpxTrackItem(position, convertView, listItem); } else { view = bindSearchResultItem(position, convertView, listItem); } @@ -399,20 +397,31 @@ public class QuickSearchListAdapter extends ArrayAdapter { return getLinearLayout(convertView, R.layout.list_shadow_footer); } - private LinearLayout bindGpxTrackItem(int position, - @Nullable View convertView, - @NonNull QuickSearchListItem listItem) { + private LinearLayout bindSearchResultItem(int position, + @Nullable View convertView, + @NonNull QuickSearchListItem listItem) { + SearchResult sr = listItem.getSearchResult(); + if (sr != null && sr.relatedObject instanceof GPXInfo) { + return bindGpxTrack(position, convertView, listItem, (GPXInfo) sr.relatedObject); + } else { + return bindSearchResult(position, convertView, listItem); + } + } + + private LinearLayout bindGpxTrack(int position, + @Nullable View convertView, + @NonNull QuickSearchListItem listItem, + @NonNull GPXInfo gpxInfo) { LinearLayout view = getLinearLayout(convertView, R.layout.search_gpx_list_item); SearchResult sr = listItem.getSearchResult(); - GPXInfo gpxInfo = (GPXInfo) sr.object; setupCheckBox(position, view, listItem); GpxUiHelper.updateGpxInfoView(app, view, sr.localeName, listItem.getIcon(), gpxInfo); return view; } - private LinearLayout bindSearchResultItem(int position, - @Nullable View convertView, - @NonNull QuickSearchListItem listItem) { + private LinearLayout bindSearchResult(int position, + @Nullable View convertView, + @NonNull QuickSearchListItem listItem) { LinearLayout view = getLinearLayout(convertView, R.layout.search_list_item); setupCheckBox(position, view, listItem); @@ -502,12 +511,17 @@ public class QuickSearchListAdapter extends ArrayAdapter { } private LinearLayout getLinearLayout(@Nullable View convertView, int layoutId) { - if (convertView == null) { + if (convertView == null || isLayoutIdChanged(convertView, layoutId)) { convertView = inflater.inflate(layoutId, null); + convertView.setTag(layoutId); } return (LinearLayout) convertView; } + private boolean isLayoutIdChanged(@NonNull View view, int layoutId) { + return !Algorithms.objectEquals(view.getTag(), layoutId); + } + private void setupCheckBox(final int position, @NonNull View rootView, @NonNull QuickSearchListItem listItem) { @@ -579,8 +593,7 @@ public class QuickSearchListAdapter extends ArrayAdapter { selectedItems.clear(); for (int i = 0; i < getCount(); i++) { QuickSearchListItemType t = getItem(i).getType(); - if (t == QuickSearchListItemType.SEARCH_RESULT - || t == QuickSearchListItemType.GPX_TRACK) { + if (t == QuickSearchListItemType.SEARCH_RESULT) { selectedItems.add(getItem(i)); } } diff --git a/OsmAnd/src/net/osmand/plus/search/QuickSearchListFragment.java b/OsmAnd/src/net/osmand/plus/search/QuickSearchListFragment.java index e371a334d1..c9635e7dac 100644 --- a/OsmAnd/src/net/osmand/plus/search/QuickSearchListFragment.java +++ b/OsmAnd/src/net/osmand/plus/search/QuickSearchListFragment.java @@ -109,11 +109,6 @@ public abstract class QuickSearchListFragment extends OsmAndListFragment { } dialogFragment.completeQueryWithObject(sr); } - } else if (item.getType() == QuickSearchListItemType.GPX_TRACK) { - SearchResult sr = item.getSearchResult(); - if (sr.objectType == ObjectType.GPX_TRACK) { - showTrackMenuFragment((GPXInfo) sr.object); - } } } } @@ -175,7 +170,9 @@ public abstract class QuickSearchListFragment extends OsmAndListFragment { public void showResult(SearchResult searchResult) { showResult = false; - if (searchResult.location != null) { + if (searchResult.relatedObject instanceof GPXInfo) { + showTrackMenuFragment((GPXInfo) searchResult.relatedObject); + } else if (searchResult.location != null) { OsmandApplication app = getMyApplication(); String lang = searchResult.requiredSearchPhrase.getSettings().getLang(); boolean transliterate = searchResult.requiredSearchPhrase.getSettings().isTransliterate(); diff --git a/OsmAnd/src/net/osmand/plus/search/listitems/QuickSearchGpxTrackListItem.java b/OsmAnd/src/net/osmand/plus/search/listitems/QuickSearchGpxTrackListItem.java deleted file mode 100644 index 35eb6c2a69..0000000000 --- a/OsmAnd/src/net/osmand/plus/search/listitems/QuickSearchGpxTrackListItem.java +++ /dev/null @@ -1,16 +0,0 @@ -package net.osmand.plus.search.listitems; - -import net.osmand.plus.OsmandApplication; -import net.osmand.search.core.SearchResult; - -public class QuickSearchGpxTrackListItem extends QuickSearchListItem { - - public QuickSearchGpxTrackListItem(OsmandApplication app, SearchResult searchResult) { - super(app, searchResult); - } - - @Override - public QuickSearchListItemType getType() { - return QuickSearchListItemType.GPX_TRACK; - } -} diff --git a/OsmAnd/src/net/osmand/plus/search/listitems/QuickSearchListItem.java b/OsmAnd/src/net/osmand/plus/search/listitems/QuickSearchListItem.java index d1ffab835c..204c31de88 100644 --- a/OsmAnd/src/net/osmand/plus/search/listitems/QuickSearchListItem.java +++ b/OsmAnd/src/net/osmand/plus/search/listitems/QuickSearchListItem.java @@ -382,8 +382,6 @@ public class QuickSearchListItem { case WPT: WptPt wpt = (WptPt) searchResult.object; return PointImageDrawable.getFromWpt(app, wpt.getColor(), false, wpt); - case GPX_TRACK: - return getIcon(app, R.drawable.ic_action_polygom_dark); case UNKNOWN_NAME_FILTER: break; } diff --git a/OsmAnd/src/net/osmand/plus/search/listitems/QuickSearchListItemType.java b/OsmAnd/src/net/osmand/plus/search/listitems/QuickSearchListItemType.java index db0ebf5f9a..3c6dcf4527 100644 --- a/OsmAnd/src/net/osmand/plus/search/listitems/QuickSearchListItemType.java +++ b/OsmAnd/src/net/osmand/plus/search/listitems/QuickSearchListItemType.java @@ -2,7 +2,6 @@ package net.osmand.plus.search.listitems; public enum QuickSearchListItemType { SEARCH_RESULT, - GPX_TRACK, HEADER, BUTTON, SEARCH_MORE, From 70062a98dfd88625808608b7d6a127dcb777a5d1 Mon Sep 17 00:00:00 2001 From: cepprice Date: Wed, 3 Mar 2021 14:07:38 +0500 Subject: [PATCH 11/59] Fix minor UI inconsistency --- OsmAnd/res/values-de/strings.xml | 2 +- OsmAnd/res/values/strings.xml | 2 +- .../src/net/osmand/plus/activities/MapActivityActions.java | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/OsmAnd/res/values-de/strings.xml b/OsmAnd/res/values-de/strings.xml index 931f8aaa37..9711652ceb 100644 --- a/OsmAnd/res/values-de/strings.xml +++ b/OsmAnd/res/values-de/strings.xml @@ -1204,7 +1204,7 @@ Daten als GPX-Datei speichern oder Wegpunkte als Favoriten importieren? Tracks Favoriten - Meine Orte + Meine orte %1$s wird geladen … Aktuelle Zeit " diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index ed1259ed1f..c3a56907c6 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -2278,7 +2278,7 @@ Add Add to \'Favorites\' My Position - My Places + My places Favorites Tracks Currently recording track diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java index bfc5077b2e..2e2e820df0 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java @@ -441,7 +441,7 @@ public class MapActivityActions implements DialogProvider { } adapter.addItem(itemBuilder - .setTitleId(R.string.plan_a_route, mapActivity) + .setTitleId(R.string.plan_route, mapActivity) .setId(MAP_CONTEXT_MENU_MEASURE_DISTANCE) .setIcon(R.drawable.ic_action_ruler) .setOrder(MEASURE_DISTANCE_ITEM_ORDER) @@ -489,7 +489,7 @@ public class MapActivityActions implements DialogProvider { // new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, // REQUEST_LOCATION_FOR_DIRECTIONS_NAVIGATION_PERMISSION); //} - } else if (standardId == R.string.plan_a_route) { + } else if (standardId == R.string.plan_route) { mapActivity.getContextMenu().close(); MeasurementToolFragment.showInstance(mapActivity.getSupportFragmentManager(), new LatLon(latitude, longitude)); } else if (standardId == R.string.avoid_road) { @@ -963,7 +963,7 @@ public class MapActivityActions implements DialogProvider { } }).createItem()); - optionsMenuHelper.addItem(new ItemBuilder().setTitleId(R.string.plan_a_route, mapActivity) + optionsMenuHelper.addItem(new ItemBuilder().setTitleId(R.string.plan_route, mapActivity) .setId(DRAWER_MEASURE_DISTANCE_ID) .setIcon(R.drawable.ic_action_plan_route) .setListener(new ItemClickListener() { From 58569b1cc5355ce74da8fdb8e338ff2d7be82946 Mon Sep 17 00:00:00 2001 From: androiddevkotlin <64539346+androiddevkotlin@users.noreply.github.com> Date: Wed, 3 Mar 2021 13:52:44 +0200 Subject: [PATCH 12/59] Add a new section in the quick action list "Configure screen" https://github.com/osmandapp/OsmAnd/issues/10196 --- .../src/net/osmand/plus/quickaction/QuickActionRegistry.java | 3 +++ OsmAnd/src/net/osmand/plus/quickaction/QuickActionType.java | 1 + .../quickaction/actions/ShowHideCoordinatesWidgetAction.java | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/quickaction/QuickActionRegistry.java b/OsmAnd/src/net/osmand/plus/quickaction/QuickActionRegistry.java index 9ea226366a..f1d4bac7e5 100644 --- a/OsmAnd/src/net/osmand/plus/quickaction/QuickActionRegistry.java +++ b/OsmAnd/src/net/osmand/plus/quickaction/QuickActionRegistry.java @@ -66,6 +66,8 @@ public class QuickActionRegistry { nameRes(R.string.quick_action_add_configure_map).category(QuickActionType.CONFIGURE_MAP); public static final QuickActionType TYPE_NAVIGATION = new QuickActionType(0, ""). nameRes(R.string.quick_action_add_navigation).category(QuickActionType.NAVIGATION); + public static final QuickActionType TYPE_CONFIGURE_SCREEN = new QuickActionType(0, ""). + nameRes(R.string.map_widget_config).category(QuickActionType.CONFIGURE_SCREEN); private final OsmandSettings settings; @@ -248,6 +250,7 @@ public class QuickActionRegistry { filterQuickActions(TYPE_ADD_ITEMS, result); filterQuickActions(TYPE_CONFIGURE_MAP, result); filterQuickActions(TYPE_NAVIGATION, result); + filterQuickActions(TYPE_CONFIGURE_SCREEN, result); return result; } diff --git a/OsmAnd/src/net/osmand/plus/quickaction/QuickActionType.java b/OsmAnd/src/net/osmand/plus/quickaction/QuickActionType.java index 4e201d06e0..d58085966d 100644 --- a/OsmAnd/src/net/osmand/plus/quickaction/QuickActionType.java +++ b/OsmAnd/src/net/osmand/plus/quickaction/QuickActionType.java @@ -10,6 +10,7 @@ public class QuickActionType { public static final int CREATE_CATEGORY = 0; public static final int CONFIGURE_MAP = 1; public static final int NAVIGATION = 2; + public static final int CONFIGURE_SCREEN = 3; private final int id; private final String stringId; diff --git a/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHideCoordinatesWidgetAction.java b/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHideCoordinatesWidgetAction.java index d0f0728c19..68df60511b 100644 --- a/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHideCoordinatesWidgetAction.java +++ b/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHideCoordinatesWidgetAction.java @@ -16,7 +16,7 @@ public class ShowHideCoordinatesWidgetAction extends QuickAction { "coordinates.showhide", ShowHideCoordinatesWidgetAction.class) .nameRes(R.string.quick_action_showhide_coordinates_widget) .iconRes(R.drawable.ic_action_coordinates_widget).nonEditable() - .category(QuickActionType.CONFIGURE_MAP); + .category(QuickActionType.CONFIGURE_SCREEN); public ShowHideCoordinatesWidgetAction() { super(TYPE); From cfd7dfef6b5da1e2f7692af20c9482bba87e55e8 Mon Sep 17 00:00:00 2001 From: cepprice Date: Wed, 3 Mar 2021 19:49:51 +0500 Subject: [PATCH 13/59] 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 2316c10487be12c1b4f7f5e166f28d67d5dcc593 Mon Sep 17 00:00:00 2001 From: androiddevkotlin <64539346+androiddevkotlin@users.noreply.github.com> Date: Wed, 3 Mar 2021 18:54:21 +0200 Subject: [PATCH 14/59] Naming of "Show/hide ... " is very inconsistent - make a unique expression to clean up it https://github.com/osmandapp/OsmAnd/issues/10196 --- OsmAnd/res/values-ar/strings.xml | 9 --------- OsmAnd/res/values-az/strings.xml | 4 ---- OsmAnd/res/values-b+ast/strings.xml | 3 --- OsmAnd/res/values-b+be+Latn/strings.xml | 4 ---- OsmAnd/res/values-b+hsb/strings.xml | 5 ----- OsmAnd/res/values-b+kab/strings.xml | 1 - OsmAnd/res/values-be/strings.xml | 9 --------- OsmAnd/res/values-bg/strings.xml | 1 - OsmAnd/res/values-ca/strings.xml | 9 --------- OsmAnd/res/values-cs/strings.xml | 9 --------- OsmAnd/res/values-da/strings.xml | 9 --------- OsmAnd/res/values-de/strings.xml | 9 --------- OsmAnd/res/values-el/strings.xml | 9 --------- OsmAnd/res/values-en-rGB/strings.xml | 1 - OsmAnd/res/values-eo/strings.xml | 9 --------- OsmAnd/res/values-es-rAR/strings.xml | 9 --------- OsmAnd/res/values-es-rUS/strings.xml | 9 --------- OsmAnd/res/values-es/strings.xml | 9 --------- OsmAnd/res/values-et/strings.xml | 9 --------- OsmAnd/res/values-eu/strings.xml | 9 --------- OsmAnd/res/values-fa/strings.xml | 9 --------- OsmAnd/res/values-fi/strings.xml | 6 ------ OsmAnd/res/values-fr/strings.xml | 9 --------- OsmAnd/res/values-gl/strings.xml | 9 --------- OsmAnd/res/values-hu/strings.xml | 9 --------- OsmAnd/res/values-hy/strings.xml | 5 ----- OsmAnd/res/values-id/strings.xml | 1 - OsmAnd/res/values-is/strings.xml | 9 --------- OsmAnd/res/values-it/strings.xml | 9 --------- OsmAnd/res/values-iw/strings.xml | 9 --------- OsmAnd/res/values-ja/strings.xml | 9 --------- OsmAnd/res/values-ka/strings.xml | 8 -------- OsmAnd/res/values-kn/strings.xml | 2 -- OsmAnd/res/values-lt/strings.xml | 5 ----- OsmAnd/res/values-lv/strings.xml | 4 ---- OsmAnd/res/values-ml/strings.xml | 4 ---- OsmAnd/res/values-nb/strings.xml | 9 --------- OsmAnd/res/values-nl/strings.xml | 9 --------- OsmAnd/res/values-oc/strings.xml | 3 --- OsmAnd/res/values-pl/strings.xml | 9 --------- OsmAnd/res/values-pt-rBR/strings.xml | 9 --------- OsmAnd/res/values-pt/strings.xml | 9 --------- OsmAnd/res/values-ro/strings.xml | 5 ----- OsmAnd/res/values-ru/strings.xml | 9 --------- OsmAnd/res/values-sc/strings.xml | 9 --------- OsmAnd/res/values-sk/strings.xml | 9 --------- OsmAnd/res/values-sl/strings.xml | 5 ----- OsmAnd/res/values-sr/strings.xml | 9 --------- OsmAnd/res/values-sv/strings.xml | 3 --- OsmAnd/res/values-tr/strings.xml | 9 --------- OsmAnd/res/values-uk/strings.xml | 9 --------- OsmAnd/res/values-zh-rCN/strings.xml | 9 --------- OsmAnd/res/values-zh-rTW/strings.xml | 9 --------- OsmAnd/res/values/strings.xml | 11 +---------- .../net/osmand/plus/osmedit/ShowHideOSMBugAction.java | 8 ++++---- .../osmand/plus/quickaction/AddQuickActionDialog.java | 10 +++++++++- .../net/osmand/plus/quickaction/QuickActionType.java | 10 ++++++++++ .../actions/ShowHideCoordinatesWidgetAction.java | 3 ++- .../quickaction/actions/ShowHideFavoritesAction.java | 10 +++++----- .../quickaction/actions/ShowHideGpxTracksAction.java | 8 ++++---- .../quickaction/actions/ShowHideMapillaryAction.java | 3 ++- .../plus/quickaction/actions/ShowHidePoiAction.java | 9 +++++---- .../actions/ShowHideTransportLinesAction.java | 3 ++- .../osmand/plus/srtmplugin/ContourLinesAction.java | 9 ++++----- .../src/net/osmand/plus/srtmplugin/TerrainAction.java | 4 ++-- 65 files changed, 50 insertions(+), 414 deletions(-) diff --git a/OsmAnd/res/values-ar/strings.xml b/OsmAnd/res/values-ar/strings.xml index e374f5a869..ad8e8a22a1 100644 --- a/OsmAnd/res/values-ar/strings.xml +++ b/OsmAnd/res/values-ar/strings.xml @@ -2123,10 +2123,8 @@ عرض مربع الحوار مؤقتاً " حفظ إلى " مكان - عرض/إخفاء المفضلة عرض المفضلة إخفاء المفضلة - عرض/إخفاء نقاط الاهتمام عرض %1$s إخفاء %1$s إضافة فئة @@ -2241,7 +2239,6 @@ \n • إضافة POI ورفعها مباشرة إلى الموقع (أو في وقت لاحق إن كنت غير متصل بالشبكة) \n عدل طلب البحث أو زد النطاق. - عرض/إخفاء ملاحظات OSM إظهار ملاحظات OSM إخفاء ملاحظات OSM مرتبة حسب المسافة @@ -2880,7 +2877,6 @@ تبديل اعرض المزيد المسارات على الخريطة - إظهار/إخفاء مسارات GPX إظهار أو إخفاء مسارات GPX المحددة على الخريطة. إخفاء المسارات عرض المسارات @@ -3072,11 +3068,9 @@ لإظهار أو إخفاء الخطوط الكنتورية على الخريطة. إظهار الخطوط الكنتورية إخفاء الخطوط الكنتورية - إظهار/إخفاء الخطوط الكنتورية لإظهار وإخفاء التضاريس على الخريطة. إظهار التضاريس إخفاء التضاريس - إظهار/إخفاء التضاريس لا يمكن بدء تشغيل أداة تحويل النص إلى كلام. تصدير الوضع وضع أوسماند: %1$s @@ -3559,7 +3553,6 @@ زر لإظهار طبقة التضاريس أو إخفائها على الخريطة. إظهار التضاريس إخفاء التضاريس - إظهارأو إخفاء التضاريس المنحدرات التضاريس تمكين لعرض المنحدرات أو خريطة التضاريس. يمكنك قراءة المزيد عن أنواع الخرائط هذه على موقعنا. @@ -3682,7 +3675,6 @@ يمكنك الوصول إلى هذه الإجراءات عن طريق النقر على زر \"%1$s\". إخفاء وسائل النقل العام إظهار وسائل النقل العام - إظهارأو إخفاء وسائل النقل العام زر لإظهار أو إخفاء وسائل النقل العام على الخريطة. إنشاء أو تعديل نقطة الأهتمام POI مكان الموقف @@ -3750,7 +3742,6 @@ ضبط ارتفاع السفينة يمكنك ضبط ارتفاع الحاوية لتجنب الجسور المنخفضة. ضع في اعتبارك أنه إذا كان الجسر متحركاً ، فسوف نستخدم ارتفاعه في الحالة المفتوحة. تحديد عرض السفينة لتجنب الجسور الضيقة - إظهار/إخفاء مابيلاري إخفاء مابيلاري إظهار مابيلاري إظهار أو إخفاء طبقة مابيلاري على الخريطة. diff --git a/OsmAnd/res/values-az/strings.xml b/OsmAnd/res/values-az/strings.xml index e800999147..78625eeb5d 100644 --- a/OsmAnd/res/values-az/strings.xml +++ b/OsmAnd/res/values-az/strings.xml @@ -741,10 +741,8 @@ Favorit əlavə et " burda saxlandı: " Yer - Favoritləri göstər/gizlət Favoritləri göstər Favoritləri gizlət - POI-ni göstər/gizlət %1$s-i göstər %1$s-i gizlət Kateqoriya əlavə et @@ -754,7 +752,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 və ya gizlət 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. @@ -2152,7 +2149,6 @@ Sil ton metr - Mapillary-ni göstər/gizlət Mapillary-ni gizlət Mapillary-ni göstər %1$s silindi diff --git a/OsmAnd/res/values-b+ast/strings.xml b/OsmAnd/res/values-b+ast/strings.xml index f1815fc169..787572e21b 100644 --- a/OsmAnd/res/values-b+ast/strings.xml +++ b/OsmAnd/res/values-b+ast/strings.xml @@ -539,7 +539,6 @@ Aumentar el radiu de gueta Nun s\'alcontró nada Modifica la consulta o aumenta\'l radiu de gueta. - Alternar notes d\'OSM Tocar esti botón d\'aición amuesa/anubre nel mapa les notes d\'OSM. Plugin Esquema de colores @@ -1114,7 +1113,6 @@ Mou nocherniegu Tocar esti botón d\'aición amuesa/anubre nel mapa los puntos favoritos. Tocar esti botón d\'aición amuesa/anubre nel mapa los PdI. - Amosar/anubrir Favoritos Navegación Esti mensaxe inclúise nel campu de comentarios. Esbilla una estaya opcional. @@ -1308,7 +1306,6 @@ Anovar too (%1$sMB) Camudar l\'estilu del mapa Cambiar al mou día/nueche - Amosar/anubrir PdI Creación d\'elementos Configuración del mapa Puntu 1 diff --git a/OsmAnd/res/values-b+be+Latn/strings.xml b/OsmAnd/res/values-b+be+Latn/strings.xml index 5ae3b5317a..3d0cfd1262 100644 --- a/OsmAnd/res/values-b+be+Latn/strings.xml +++ b/OsmAnd/res/values-b+be+Latn/strings.xml @@ -2017,7 +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ć/schavać OSM-natatki Pakazać OSM-natatki Schavać OSM-natatki Nacisk na hetuju knopku pakaža ci schavaje OSM-natatki na mapie. @@ -2156,10 +2155,8 @@ 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ć/schavać upadabanyja Pakazać upadabanyja Schavać upadabanyja - Pakazać/schavać POI Pakazać %1$s Schavać %1$s Dadać katehoryu @@ -2823,7 +2820,6 @@ Praparcyjnaj pamiacі %4$s MB (Abmiežavańnie Android %5$s MB, Dalvik %6$s MB). Pamianiać Pakazać boĺš Adliustroŭvajemyja sliady - Pakazać/schavać GPX-sliady Nacisk na knopku dziejannia pakaža ci schavaje abranyja GPX-sliady na mapie Schavać GPX-sliady Pakazać GPX-sliady diff --git a/OsmAnd/res/values-b+hsb/strings.xml b/OsmAnd/res/values-b+hsb/strings.xml index 242e4465ce..1268fbb09f 100644 --- a/OsmAnd/res/values-b+hsb/strings.xml +++ b/OsmAnd/res/values-b+hsb/strings.xml @@ -912,7 +912,6 @@ Pytanski radius powjetšić Žadyn pytanski wuslědk Změń pytanje abo powjetš jeho radius. - OSM-noticy pokazać/schować OSM-noticy pokazać OSM-noticy schować Sortěrowane po zdalenosći @@ -1021,10 +1020,8 @@ Předchadny dypk dodać Přichodny dypk dodać Nawigaciju zahajić/přetorhnyć - Fawority pokazać/schować Fawority pokazać Fawority schować - POI pokazać/schować %1$s pokazać %1$s schować Kategoriju dodać @@ -1583,10 +1580,8 @@ Změny na OSM Pokazaj wysokostne linije Schowaj wysokostne linije - Wysokostne linije pokazać/schować Pokazaj relief Schowaj relief - Relief pokazać/schować 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 89deec4af6..86cf7e67d3 100644 --- a/OsmAnd/res/values-b+kab/strings.xml +++ b/OsmAnd/res/values-b+kab/strings.xml @@ -1254,7 +1254,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 - Sken/ffer akal Ffer akal Sken akal Taqeffalt i uskan neɣ tuffra n tissi n wakal n tkarḍa. diff --git a/OsmAnd/res/values-be/strings.xml b/OsmAnd/res/values-be/strings.xml index 1f45267fa8..66488f8900 100644 --- a/OsmAnd/res/values-be/strings.xml +++ b/OsmAnd/res/values-be/strings.xml @@ -2137,10 +2137,8 @@ Выдаліць дзеянне Сапраўды выдаліць дзеянне \"%s\"\? Месца - Паказаць/схаваць улюбёныя мясціны Паказаць улюбёныя мясціны Схаваць улюбёныя мясціны - Паказаць/схаваць POI Паказаць %1$s Схаваць %1$s Дадаць катэгорыю @@ -2310,7 +2308,6 @@ Павялічыць радыус пошуку Нічога не знойдзена Змяніць пошукавы запыт альбо павялічыць радыус пошуку. - Паказаць/схаваць OSM-нататкі Паказаць OSM-нататкі Схаваць OSM-нататкі Кнопка для паказу / хавання OSM-нататак на мапе. @@ -2892,7 +2889,6 @@ Памяняць Паказаць больш Адлюстроўваемыя сляды - Паказаць/схаваць сляды Кнопка для адлюстравання/хавання абраных слядоў на мапе. Схаваць сляды Паказаць сляды @@ -3316,11 +3312,9 @@ Кнопка для адлюстравання/хавання контурных ліній на мапе. Паказаць контурныя лініі Схаваць контурныя лініі - Паказаць/схаваць контурныя лініі Кнопка для адлюстравання/хавання зацянення рэльефу на мапе. Паказаць зацяненне рэльефу Схаваць зацяненне рэльефу - Паказаць/схаваць зацяненне рэльефу Немагчыма запусціць механізм пераўтварэння тэксту ў гаворку. Экспарт профілю Профіль OsmAnd: %1$s @@ -3437,7 +3431,6 @@ Дадаць профіль %1$s з %2$s Схілы - Паказаць ці схаваць рэльеф Схаваць рэльеф Паказаць рэльеф Выдаліць апісанне @@ -3515,11 +3508,9 @@ Змяніць профіль праграмы Аглядная мапа свету (падрабязная) Схаваць грамадскі транспарт - Паказаць ці схаваць грамадскі транспарт Пералічыць маршрут у выпадку адхілення Выдаліць Вызначце шырыню судна, каб пазбягаць вузкіх мастоў - Паказаць/схаваць Mapillary Схаваць Mapillary Паказаць Mapillary Пераключальнік для паказу альбо хавання пласта Mapillary. diff --git a/OsmAnd/res/values-bg/strings.xml b/OsmAnd/res/values-bg/strings.xml index 868d2d9386..384039cf20 100644 --- a/OsmAnd/res/values-bg/strings.xml +++ b/OsmAnd/res/values-bg/strings.xml @@ -2063,7 +2063,6 @@ Маршрутът ще бъде преизчислен, ако разстоянието от маршрута до текущото местоположение е повече от избраната стойност. %1$s от %2$s Склонове - Показване/скриване на терена Скриване на терена Показване на терена Бутон за показване или скриване на терена върху картата. diff --git a/OsmAnd/res/values-ca/strings.xml b/OsmAnd/res/values-ca/strings.xml index 5bcd59d0b8..cc2aa8afe2 100644 --- a/OsmAnd/res/values-ca/strings.xml +++ b/OsmAnd/res/values-ca/strings.xml @@ -2113,10 +2113,8 @@ 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/amaga Preferits Mostra Preferits Amaga Preferits - Mostra/amaga PDI Mostra %1$s Amaga %1$s Afegeix una categoria @@ -2382,7 +2380,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 o amaga notes OSM Mostra notes OSM Amaga notes OSM Botó que mostra o amaga notes OSM al mapa. @@ -2839,7 +2836,6 @@ Totes les cruïlles Tipus de carretera Sortida a - Mostra/amaga traces Un botó per mostrar o amagar les traces seleccionades al mapa. Amaga les traces Mostra les traces @@ -3215,11 +3211,9 @@ Botó per a mostrar o amagar les corbes de nivell en el mapa. Mostra les corbes de nivell Amaga les corbes de nivell - Mostra/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 - Mostra/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ó. @@ -3463,7 +3457,6 @@ Un botó per mostrar o amagar la capa de terreny al mapa. Mostra el terreny Amaga el terreny - Mostra o amaga el relleu Ombrejat del relleu Llegenda Nivells de zoom @@ -3560,7 +3553,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 - Mostra/amaga Mapil·lary Amaga Mapillary Mostra Mapillary Un commutador per mostrar o amagar la capa de Mapillary al mapa. @@ -3637,7 +3629,6 @@ Compres OsmAnd Perfils de navegació Amaga el transport públic - Mostra o amaga el transport públic Botó que mostra o oculta el transport públic al mapa. Crea o edita PDI Posicions d’aparcament diff --git a/OsmAnd/res/values-cs/strings.xml b/OsmAnd/res/values-cs/strings.xml index 94db359827..aca529b3ac 100644 --- a/OsmAnd/res/values-cs/strings.xml +++ b/OsmAnd/res/values-cs/strings.xml @@ -2117,10 +2117,8 @@ 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/skrýt Oblíbená místa Zobrazit oblíbená místa Skrýt Oblíbená místa - Zobrazit/skrýt POI Zobrazit %1$s Skrýt %1$s Přidat kategorii @@ -2276,7 +2274,6 @@ Zvětšit okruh hledání Nic nalezeno Změňte vyhledávací dotaz nebo zvětšete okruh hledání. - Zobrazit nebo skrýt OSM poznámky Oprávnění Nepodařilo se naimportovat soubor. Prosím zkontrolujte, zda má OsmAnd oprávnění ke čtení souboru. Vzdálenost opravená @@ -2843,7 +2840,6 @@ Typy silnic Výjezd na Vyměnit - Zobrazit/skrýt stopy Tlačítko pro zobrazení nebo skrytí vybraných stop na mapě. Skrýt stopy Zobrazit stopy @@ -3255,7 +3251,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 - Zobrazit nebo skrýt terén Skrýt terén Zobrazit terén Tlačítko pro zobrazení nebo skrytí vrstvy terénu na mapě. @@ -3459,7 +3454,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 - Zobrazit/skrýt Mapillary Skrýt Mapillary Zobrazit Mapillary Přepínač pro zobrazení nebo skrytí mapové vrstvy Mapillary. @@ -3641,7 +3635,6 @@ Úvodní panel Skrýt veřejnou dopravu Zobrazit veřejnou dopravu - Zobrazit nebo skrýt veřejnou dopravu Tlačítko pro zobrazení nebo skrytí veřejné dopravy na mapě. Vytvořit nebo upravit bod zájmu Parkovací místa @@ -3758,11 +3751,9 @@ \n \n Tuto změnu můžete aplikovat na všechny profily nebo jen na vybraný profil. - Zobrazit/skrýt stínování svahů Skrýt stínování svahů Zobrazit stínování svahů Tlačítko pro zobrazení nebo skrytí stínování svahů na mapě. - Zobrazit/skrýt vrstevnice Skrýt vrstevnice Zobrazit vrstevnice Tlačítko pro zobrazení nebo skrytí vrstevnic na mapě. diff --git a/OsmAnd/res/values-da/strings.xml b/OsmAnd/res/values-da/strings.xml index c176ef70df..04f3d2785b 100644 --- a/OsmAnd/res/values-da/strings.xml +++ b/OsmAnd/res/values-da/strings.xml @@ -2123,10 +2123,8 @@ 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/skjul Favoritter Vis Favoritter Skjul Favoritter - Vis/skjul intetessepunkt (IP) Vis %1$s Skjul %1$s Tilføj en kategori @@ -2394,7 +2392,6 @@ Skjul fra zoom-niveau Sorteret efter afstand Søg i Favoritter - Vis eller skjul OSM-noter Vis OSM-noter Skjul OSM-noter Knap til at vise eller skjule OSM-noter på kortet. @@ -2849,7 +2846,6 @@ Vejtyper Stå af ved Stig på ved stoppested - Vis/skjul GPX spor En knap til at vise eller skjule valgte GPX-spor på kortet. Skjul GPX spor Vis GPX spor @@ -3269,11 +3265,9 @@ Knap der viser eller skjuler højdekurver på kortet. Vis højdekurver Skjul højdekurver - Vis/skjul højdekurver En knap der viser eller skjuler reliefskygger på kortet. Vis reliefskygger Skjul reliefskygger - Vis/skjul reliefskygger Hvid Tekst-til-tale-programmet kan ikke startes. Simuler positionen ved hjælp af et optaget GPX-spor. @@ -3436,7 +3430,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 - Vis/skjul terræn Skjul terræn Vis terræn En knap der viser eller skjuler terrænlag på kortet. @@ -3562,7 +3555,6 @@ OsmAnd køb Skjul offentlig transport Vis offentlig transport - Vis/skjul offentlig transport En knap til at vise eller skjule offentlig transport på kortet. Opret/rediger IP Parkeringsplads @@ -3606,7 +3598,6 @@ Vis eller skjul yderligere kort-detaljer Natkort Tilføj onlinekilde - Vis/skjul Mapillary Skjul Mapillary Vis Mapillary Slet næste destinationspunkt diff --git a/OsmAnd/res/values-de/strings.xml b/OsmAnd/res/values-de/strings.xml index 9711652ceb..1997595e68 100644 --- a/OsmAnd/res/values-de/strings.xml +++ b/OsmAnd/res/values-de/strings.xml @@ -2111,11 +2111,9 @@ Aktionsname Eine Schaltfläche zum Hinzufügen einer Kartenmarkierung in der Bildschirmmitte. Ort - Favoriten ein-/ausblenden Eine Schaltfläche, um eine Audio-Notiz in der Bildschirmmitte einzufügen. Eine Schaltfläche, um eine Video-Notiz in der Bildschirmmitte einzufügen. Eine Schaltfläche, um eine Foto-Notiz in der Bildschirmmitte einzufügen. - POI ein-/ausblenden %1$s anzeigen %1$s ausblenden Kategorie hinzufügen @@ -2386,7 +2384,6 @@ Privatzugang erlauben Zugang zu Privatgrund erlauben. Farbschema - OSM-Hinweise ein- oder ausblenden OSM-Hinweise einblenden OSM-Hinweise ausblenden Schaltfläche zum Ein- oder Ausblenden von OSM-Hinweisen auf der Karte. @@ -2853,7 +2850,6 @@ Von %1$s Schritt für Schritt Straßentypen - Tracks ein-/ausblenden Eine Schaltfläche zum Ein- oder Ausblenden ausgewählter Tracks auf der Karte. Tracks ausblenden Tracks einblenden @@ -3273,11 +3269,9 @@ Schaltfläche zum Ein- und Ausblenden von Höhenlinien auf der Karte. Höhenlinien anzeigen Höhenlinien ausblenden - Höhenlinien ein-/ausblenden Schaltfläche zum Ein- oder Ausblenden der Reliefdarstellung. Relief anzeigen Relief ausblenden - Relief ein-/ausblenden Text-to-Speech-Engine kann nicht gestartet werden. Simulation Ihrer Position mit einem aufgezeichneten GPX-Track. Profil exportieren @@ -3498,7 +3492,6 @@ Eine Schaltfläche zum Ein- und Ausblenden der Geländeebene auf der Karte. Gelände einblenden Gelände ausblenden - Gelände ein- oder ausblenden Relief Zoomstufen Transparenz @@ -3616,7 +3609,6 @@ Sie können auf diese Aktionen zugreifen, indem Sie auf die Schaltfläche \"%1$s\" tippen. Öffentliche Verkehrsmittel ausblenden Öffentliche Verkehrsmittel anzeigen - Öffentliche Verkehrsmittel anzeigen oder ausblenden Schaltfläche zum Ein- oder Ausblenden der öffentlichen Verkehrsmittel auf der Karte. POI erstellen oder bearbeiten Parkpositionen @@ -3689,7 +3681,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 ein-/ausblenden Mapillary ausblenden Mapillary anzeigen Eine Umschaltfläche zum Ein- oder Ausblenden des Mapillary-Layers auf der Karte. diff --git a/OsmAnd/res/values-el/strings.xml b/OsmAnd/res/values-el/strings.xml index 901ae967d1..9846bd658c 100644 --- a/OsmAnd/res/values-el/strings.xml +++ b/OsmAnd/res/values-el/strings.xml @@ -1532,7 +1532,6 @@ Φωτογραφίες με σύνδεση Προσθήκη φωτογραφιών Δεν βρέθηκε τίποτα - Εμφάνιση ή απόκρυψη σημειώσεων OSM Εμφάνιση σημειώσεων OSM Απόκρυψη σημειώσεων OSM Προς @@ -2635,10 +2634,8 @@ Διπλό όνομα γρήγορης ενέργειας Εναλλαγή εμφάνισης ή απόκρυψης των αγαπημένων σημείων στον χάρτη. Εναλλαγή εμφάνισης ή απόκρυψης ΣΕ στον χάρτη. - Εμφάνιση/απόκρυψη αγαπημένων Εμφάνιση αγαπημένων Απόκρυψη αγαπημένων - Εμφάνιση/απόκρυψη ΣΕ Εμφάνιση %1$s Απόκρυψη %1$s Προσθήκη κατηγορίας @@ -2901,7 +2898,6 @@ Αλλαγή Εμφάνιση περισσοτέρων Εμφανιζόμενα ίχνη - Εμφάνιση/απόκρυψη ιχνών GPX Πλήκτρο εμφάνισης ή απόκρυψης επιλεγμένων ιχνών GPX στον χάρτη. Απόκρυψη ιχνών GPX Εμφάνιση ιχνών GPX @@ -3275,11 +3271,9 @@ Πλήκτρο εμφάνισης ή απόκρυψης ισοϋψών γραμμών στον χάρτη. Εμφάνιση ισοϋψών γραμμών Απόκρυψη ισοϋψών γραμμών - Εμφάνιση/Απόκρυψη ισοϋψών γραμμών Εμφάνιση ή απόκρυψη πλήκτρου σκίασης αναγλύφου στον χάρτη. Εμφάνιση σκίασης ανάγλυφου Απόκρυψη σκίασης ανάγλυφου - Εμφάνιση/Απόκρυψη σκίασης ανάγλυφου Αδυναμία εκκίνησης μηχανής κειμένου σε ομιλία. Προσομοίωση της θέσης σας χρησιμοποιώντας καταγεγραμμένη διαδρομή GPX. Εξαγωγή κατατομής (προφίλ) @@ -3497,7 +3491,6 @@ Μπορείτε να ορίσετε ύψος σκάφους για να αποφύγετε χαμηλές γέφυρες. Σημειώστε ότι εάν η γέφυρα είναι κινητή, θα χρησιμοποιηθεί το ύψος της ανοικτής κατάστασης. Ορίστε ύψος σκάφος για αποφυγή χαμηλών γεφυρών. Σημειώστε ότι εάν η γέφυρα είναι κινητή, θα χρησιμοποιηθεί το ύψος της στην ανοικτή κατάσταση. Ορίστε πλάτος σκάφους για αποφυγή στενών γεφυρών - Εμφάνιση/Απόκρυψη Mapillary Απόκρυψη Mapillary Εμφάνιση Mapillary Εναλλαγή εμφάνισης ή απόκρυψης της στρώσης Mapillary του χάρτη. @@ -3603,7 +3596,6 @@ \n Απόκρυψη δημόσιων συγκοινωνιών Εμφάνιση δημόσιων συγκοινωνιών - Εμφάνιση/απόκρυψη δημόσιων συγκοινωνιών Πλήκτρο εμφάνισης ή απόκρυψης δημόσιων συγκοινωνιών στον χάρτη. Δημιουργία / Επεξεργασία ΣΕ Θέσεις στάθμευσης @@ -3715,7 +3707,6 @@ Η διαδρομή θα επανυπολογιστεί εάν η απόσταση από τη διαδρομή στην τρέχουσα θέση είναι μεγαλύτερη από την επιλεγμένη τιμή. %1$s από %2$s Πλαγιές - Εμφάνιση / απόκρυψη εδάφους Απόκρυψη εδάφους Εμφάνιση εδάφους Ένα πλήκτρο εμφάνισης ή απόκρυψης της στρώσης εδάφους στον χάρτη. diff --git a/OsmAnd/res/values-en-rGB/strings.xml b/OsmAnd/res/values-en-rGB/strings.xml index 97aedb7ad8..1d0a01a412 100644 --- a/OsmAnd/res/values-en-rGB/strings.xml +++ b/OsmAnd/res/values-en-rGB/strings.xml @@ -96,7 +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/hide favourites Show Favourites Hide Favourites Category to save the Favourite in: diff --git a/OsmAnd/res/values-eo/strings.xml b/OsmAnd/res/values-eo/strings.xml index f8442229c2..5eecbe842e 100644 --- a/OsmAnd/res/values-eo/strings.xml +++ b/OsmAnd/res/values-eo/strings.xml @@ -2117,10 +2117,8 @@ 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/kaŝi ŝatatajn Montri ŝatatajn Kaŝi ŝatatajn - Montri/kaŝi interesejojn Montri %1$s Kaŝi %1$s Aldoni kategorion @@ -2386,7 +2384,6 @@ Kaŝi komence de skal‑nivelo Ordigitaj laŭ distanco Serĉi en ŝatataj - Montri aŭ kaŝi OSM-rimarkojn Montri OSM-rimarkojn Kaŝi OSM-rimarkojn Butono por montri/kaŝi OSM‑rimarkojn sur la mapo. @@ -2842,7 +2839,6 @@ Specoj de vojoj Eliru ĉe Atendu ĉe haltejo - Montri/kaŝi spurojn Butono por montri/kaŝi elektitajn spurojn sur la mapo. Kaŝi spurojn Montri spurojn @@ -3263,11 +3259,9 @@ Butono por montri/kaŝi nivelkurbojn sur la mapo. Montri nivelkurbojn Kaŝi nivelkurbojn - Montri/kaŝi nivelkurbojn Butono por montri/kaŝi nivelombrumon (reliefon) sur la mapo. Montri nivelombrumon Kaŝi nivelombrumon - Montri/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 @@ -3493,7 +3487,6 @@ Mapklarigo Nivelombrumo %1$s el %2$s - Montri aŭ kaŝi teren‑formon Kaŝi teren‑formon Montri teren‑formon Butono por montri/kaŝi tavolon de formo de tereno sur la mapo. @@ -3610,7 +3603,6 @@ Vi povas ekigi tiujn agojn per frapeti la butonon “%1$s”. Kaŝi publikan transporton Montri publikan transporton - Montri aŭ kaŝi publikan transporton Butono por montri/kaŝi publikan transporton sur la mapo. Krei aŭ redakti interesejon Aldoni aŭ forigi ŝatatan ejojn @@ -3679,7 +3671,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 - Montri/kaŝi Mapillary Kaŝi Mapillary Montri Mapillary Ŝaltilo por montri aŭ kaŝi tavolon de Mapillary sur la mapo. diff --git a/OsmAnd/res/values-es-rAR/strings.xml b/OsmAnd/res/values-es-rAR/strings.xml index 5ab5e53945..12460550ce 100644 --- a/OsmAnd/res/values-es-rAR/strings.xml +++ b/OsmAnd/res/values-es-rAR/strings.xml @@ -2120,10 +2120,8 @@ 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 u ocultar Favoritos Mostrar Favoritos Ocultar Favoritos - Mostrar u ocultar PDI Mostrar %1$s Ocultar %1$s Añadir una categoría @@ -2388,7 +2386,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 u ocultar notas de OSM Mostrar notas de OSM Ocultar notas de OSM Un botón que muestra u oculta las notas de OSM en el mapa. @@ -2846,7 +2843,6 @@ Tipos de caminos Bajar en Esperar en la parada - Mostrar u ocultar trazas Un botón que muestra u oculta las trazas elegidas en el mapa. Ocultar trazas Mostrar trazas @@ -3267,11 +3263,9 @@ Un botón que muestra u oculta las curvas de nivel en el mapa. Mostrar curvas de nivel Ocultar curvas de nivel - Mostrar u 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 - Mostrar u ocultar el sombreado Imposible iniciar el motor de habla sintetizada. Simular la ubicación usando una traza GPX grabada. Exportar perfil @@ -3495,7 +3489,6 @@ Permite ver el sombreado o el mapa de pendientes. Puedes leer más sobre estos tipos de mapas en nuestro sitio. Sombreado Pendientes - Mostrar u ocultar terreno Ocultar terreno Mostrar terreno Un botón que muestra u oculta la capa del terreno en el mapa. @@ -3614,7 +3607,6 @@ Puedes acceder a estas acciones pulsando el botón «%1$s». Ocultar transporte público Mostrar transporte público - Mostrar u ocultar transporte público Botón que muestra u oculta el transporte público en el mapa. Crear o editar PDI Puestos de estacionamiento @@ -3697,7 +3689,6 @@ Legal Mantener Desinstalar - Mostrar u ocultar Mapillary Ocultar Mapillary Mostrar Mapillary Un botón que alterna la capa de Mapillary en el mapa. diff --git a/OsmAnd/res/values-es-rUS/strings.xml b/OsmAnd/res/values-es-rUS/strings.xml index a231dfc79f..c2f3dbff3b 100644 --- a/OsmAnd/res/values-es-rUS/strings.xml +++ b/OsmAnd/res/values-es-rUS/strings.xml @@ -2120,10 +2120,8 @@ 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 u ocultar Favoritos Mostrar Favoritos Ocultar Favoritos - Mostrar u ocultar PDI Mostrar %1$s Ocultar %1$s Añadir una categoría @@ -2388,7 +2386,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 u ocultar notas de OSM Mostrar notas de OSM Ocultar notas de OSM Un botón que muestra u oculta las notas de OSM en el mapa. @@ -2846,7 +2843,6 @@ Tipos de caminos Bajar en Esperar en la parada - Mostrar u ocultar trazas Un botón que muestra u oculta las trazas elegidas en el mapa. Ocultar trazas Mostrar trazas @@ -3266,11 +3262,9 @@ Un botón que muestra u oculta las curvas de nivel en el mapa. Mostrar curvas de nivel Ocultar curvas de nivel - Mostrar u 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 - Mostrar u ocultar el sombreado Imposible iniciar el motor de habla sintetizada. Simular la ubicación usando una traza GPX grabada. Exportar perfil @@ -3496,7 +3490,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 - Mostrar u ocultar terreno Ocultar terreno Mostrar terreno Un botón que muestra u oculta la capa del terreno en el mapa. @@ -3614,7 +3607,6 @@ Puedes acceder a estas acciones pulsando el botón «%1$s». Ocultar transporte público Mostrar transporte público - Mostrar u ocultar transporte público Botón que muestra u oculta el transporte público en el mapa. Crear o editar PDI Puestos de estacionamiento @@ -3695,7 +3687,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 - Mostrar u ocultar Mapillary Ocultar Mapillary Mostrar Mapillary Un botón que alterna la capa de Mapillary en el mapa. diff --git a/OsmAnd/res/values-es/strings.xml b/OsmAnd/res/values-es/strings.xml index b0b779d318..7028da0a54 100644 --- a/OsmAnd/res/values-es/strings.xml +++ b/OsmAnd/res/values-es/strings.xml @@ -2117,10 +2117,8 @@ 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/ocultar Favoritos Mostrar Favoritos Ocultar Favoritos - Mostrar/ocultar PDI Mostrar %1$s Ocultar %1$s Añadir una categoría @@ -2382,7 +2380,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 u ocultar notas de OSM Mostrar notas de OSM Ocultar notas de OSM Botón para mostrar u ocultar las notas de OSM en el mapa. @@ -2843,7 +2840,6 @@ Tipos de caminos Bajarse en Esperar en la parada - Mostrar/ocultar trazas Un botón que muestra u oculta las trazas elegidas en el mapa. Ocultar trazas Mostrar trazas @@ -3260,11 +3256,9 @@ Un botón que muestra u oculta las curvas de nivel en el mapa. Mostrar curvas de nivel Ocultar curvas de nivel - Mostrar/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 - Mostrar/ocultar el sombreado Imposible iniciar el motor de habla sintetizada. Exportar perfil Perfil de OsmAnd: %1$s @@ -3464,7 +3458,6 @@ Recalcular ruta en caso de desvío %1$s de %2$s Cuestas - Mostrar o esconder terreno Esconder terreno Mostrar terreno Un botón para mostrar o esconder una capa de terreno en el mapa. @@ -3513,7 +3506,6 @@ Marcadores de mapa Favoritos Perfiles de navegación - Mostrar u ocultar transporte público Ocultar transporte público Mostrar transporte público Crear o editar POI @@ -3692,7 +3684,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 - Mostrar/ocultar Mapillary Ocultar Mapillary Mostrar Mapillary Un conmutador para mostrar u ocultar la capa de Mapillary en el mapa. diff --git a/OsmAnd/res/values-et/strings.xml b/OsmAnd/res/values-et/strings.xml index 7061f624dc..e4c166344e 100644 --- a/OsmAnd/res/values-et/strings.xml +++ b/OsmAnd/res/values-et/strings.xml @@ -162,7 +162,6 @@ Paigalda Mapillary piltide lisamiseks sellesse asukohta kaardil. Siin puuduvad fotod. Taaskäivita otsing - Lülita OSM märkmed sisse või välja Näita OSM märkmed Peida OSM Notes Täname sind tagasiside eest @@ -601,7 +600,6 @@ Pöörangupõhine Välju Sisene peatuses - Kuva/peida rajad Nupp valitud radade kaardil kuvamiseks või peitmiseks. Peida rajad Kuva rajad @@ -993,11 +991,9 @@ Nupp kõrgusjoonte kuvamiseks või peitmiseks kaardil. Kuva kõrgusjooned Peida kõrgusjooned - Kuva/peida kõrgusjooned Nupp künkavarjutuste kuvamiseks või peitmiseks kaardil. Kuva künkavarjutus Peida künkavarjutus - Kuva/peida künkavarjutus Kõnesünteesi mootorit ei saa käivitada. Ekspordi profiil OsmAnd profiil: %1$s @@ -3127,10 +3123,8 @@ Koht Dubleerimise vältimiseks nimetati kiirtegevus ümber %1$s. Kiirtegevuse nime duplikaat - Kuva/peida lemmikud Kuva lemmikud Peida lemmikud - Kuva/peida HP Kuva %1$s Peida %1$s Lisa kategooria @@ -3441,7 +3435,6 @@ Teekonna ümberarvutus, kui kaugus teekonnast praegusesse asukohta on suurem valitud väärtusest. %1$s %2$s-st Nõlvad - Kuva või peida maastik Peida maastik Kuva maastik Nupp maastikukihi kuvamiseks või peitmiseks kaardil. @@ -3530,7 +3523,6 @@ Otsi huvipunktide tüüpe Peida ühistranspordi teave Näita ühistranspordi teavet - Kuva või peida ühistransport Nupp, mis kuvab või peidab ühistranspordiandmed kaardil. Lisa või muuda huvipunkti Öine kaart @@ -3541,7 +3533,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 - Näita või peida Mapillary andmed Peida Mapillary andmed Näita Mapillary andmeid Nupp, mis näitab või peidab kaardil Mapillary kihti. diff --git a/OsmAnd/res/values-eu/strings.xml b/OsmAnd/res/values-eu/strings.xml index 44936b286b..4c5c550856 100644 --- a/OsmAnd/res/values-eu/strings.xml +++ b/OsmAnd/res/values-eu/strings.xml @@ -2125,10 +2125,8 @@ Area honi dagokio: %1$s x %2$s Pantailaren erdian aparkaleku bat gehitzeko botoia. " hona gorde da: " Tokia - Erakutsi/ezkutatu gogokoak Erakutsi gogokoak Ezkutatu gogokoak - Erakutsi/ezkutatu POI Erakutsi %1$s Ezkutatu %1$s Gehitu kategoria bat @@ -2269,7 +2267,6 @@ Area honi dagokio: %1$s x %2$s Handitu bilaketaren erradioa Ez da ezer aurkitu Aldatu bilaketa edo handitu erradioa. - Erakutsi edo ezkutatu OSM oharrak Erakutsi OSM oharrak Ezkutatu OSM oharrak Mapan OSM oharrak erakutsi edo ezkutatzeko botoia. @@ -2846,7 +2843,6 @@ Area honi dagokio: %1$s x %2$s Aldatu Erakutsi gehiago Bistaratutako lorratzak - Erakutsi/ezkutatu lorratzak Gehitu tarteko puntua %1$d transferentzia Gehitu irteera eta helburua @@ -3267,11 +3263,9 @@ Area honi dagokio: %1$s x %2$s Sestra-kurbak mapan erakusteko edo ezkutatzeko botoia. Erakutsi sestra-kurbak Ezkutatu sestra-kurbak - Erakutsi/ezkutatu sestra-kurbak Erliebe-itzalak mapan erakutsi edo ezkutatzeko botoia. Erakutsi erliebe-itzalak Ezkutatu erliebe-itzalak - Erakutsi/ezkutatu erliebe-itzalak Ezin da testu-ahots motorra abiarazi. Simulatu zure posizioa grabatutako GPX lorratz bat erabiliz. Esportatu profila @@ -3491,7 +3485,6 @@ Area honi dagokio: %1$s x %2$s Mapako terreno geruza erakutsi edo ezkutatzeko botoia. Erakutsi terrenoa Ezkutatu terrenoa - Erakutsi edo ezkutatu terrenoa Maldak Erliebea Gaitu erliebea edo malda mapa ikusteko. Mapa mota hauei buruz gehiago irakur dezakezu gure gunean @@ -3555,7 +3548,6 @@ Area honi dagokio: %1$s x %2$s Nabigazio profilak Ezkutatu garraio publikoa Erakutsi garraio publikoa - Erakutsi edo ezkutatu garraio publikoa OsmAnd aztarnaria Jarraitu Pertsonalizatu \"Tiradera\", \"Konfiguratu mapa\" eta \"Laster-menua\" ataletan dauden elementu kopurua. @@ -3675,7 +3667,6 @@ Area honi dagokio: %1$s x %2$s metro Erakutsi edo ezkutatu maparen xehetasun gehigarriak Gauerako mapa - Erakutsi/ezkutatu Mapillary Ezkutatu Mapillary Erakutsi Mapillary Egina diff --git a/OsmAnd/res/values-fa/strings.xml b/OsmAnd/res/values-fa/strings.xml index 6c5174e96c..d7b7728f89 100644 --- a/OsmAnd/res/values-fa/strings.xml +++ b/OsmAnd/res/values-fa/strings.xml @@ -2180,10 +2180,8 @@ نام تکراری برای کنش فوری دکمه‌ای برای پنهان/آشکارکردن علاقه‌مندی‌ها روی نقشه. دکمه‌ای برای پنهان/آشکارکردن POIها روی نقشه. - آشکار/پنهان‌کردن علاقه‌مندی‌ها نشان‌دادن علاقه‌مندی‌ها مخفی‌کردن علاقه‌مندی‌ها - آشکار/پنهان‌کردن POIها نشان‌دادن %1$s پنهان‌کردن %1$s افزودن دسته @@ -2288,7 +2286,6 @@ مقصد شما در ناحیه‌ای با دسترسی خصوصی قرار دارد. دسترسی به جاده‌های خصوصی برای این سفر مجاز شود؟ شروع مجدد جست‌وجو چیزی پیدا نشد - آشکار/پنهان‌کردن یادداشت‌های OSM آشکارکردن یادداشت‌های OSM پنهان‌کردن یادداشت‌های OSM دکمه‌ای برای آشکار/پنهان کردن یادداشت‌های OSM بر روی نقشه. @@ -2866,7 +2863,6 @@ نوع جاده‌ها ایستگاه پیاده‌شدن ایستگاه سوارشدن - آشکار/پنهان کردن ردها دکمه‌ای برای آشکار/پنهان کردن ردهای انتخابی بر روی نقشه. پنهان‌کردن ردها آشکارکردن ردها @@ -3286,11 +3282,9 @@ دکمه‌ای برای آشکار/پنهان کردن منحنی‌های میزان روی نقشه. نشان‌دادن منحنی‌های میزان پنهان‌کردن منحنی‌های میزان - آشکار/پنهان کردن منحنی‌های میزان دکمه‌ای برای آشکار/پنهان کردن سایه‌روشن‌ها روی نقشه. نشان‌دادن سایه‌روشن‌ها پنهان‌کردن سایه‌روشن‌ها - آشکار/پنهان کردن سایه‌روشن‌ها شروع موتور متن به گفتار ناموفق بود. موقعیت خود را با استفاده از یک رد GPX ضبط‌شده شبیه‌سازی کنید. پروفایل OsmAnd:‏ %1$s @@ -3523,7 +3517,6 @@ سایه‌روشن %1$s از %2$s شیب‌ها - آشکار یا پنهان کردن ناهمواری‌ها پنهان‌کردن ناهمواری‌ها نمایش ناهمواری‌ها دکمه‌ای برای آشکار یا پنهان کردن لایهٔ ناهمواری‌ها روی نقشه. @@ -3640,7 +3633,6 @@ برای دسترسی به این کنش‌ها می‌توانید روی دکمهٔ «%1$s» بزنید. مخفی‌کردن حمل‌ونقل عمومی نمایش حمل‌ونقل عمومی - آشکار یا پنهان کردن حمل‌ونقل عمومی دکمه‌ای برای آشکار یا پنهان کردن حمل‌ونقل عمومی روی نقشه. با لمس دکمهٔ عملیاتی بین پروفایل‌های انتخاب‌شده جابه‌جا شوید. افزودن پروفایل @@ -3710,7 +3702,6 @@ می‌توانید ارتفاع کشتی را برای پرهیز از پل‌های کوتاه وارد کنید. به یاد داشته باشید که اگر پل متحرک است، در حالت باز نیز ارتفاع کشتی را در نظر می‌گیریم. ارتفاع کشتی را برای پرهیز از پل‌های کوتاه وارد کنید. به یاد داشته باشید که اگر پل متحرک است، در حالت باز نیز ارتفاع کشتی را در نظر می‌گیریم. عرض کشتی را برای پرهیز از پل های باریک وارد کنید - آشکار/پنهان کردن مپیلاری آشکارکردن مپیلاری پنهان‌کردن مپیلاری دکمه‌ای برای آشکار/پنهان کردن لایهٔ مپیلاری روی نقشه. diff --git a/OsmAnd/res/values-fi/strings.xml b/OsmAnd/res/values-fi/strings.xml index 3801bf19b4..53a392d864 100644 --- a/OsmAnd/res/values-fi/strings.xml +++ b/OsmAnd/res/values-fi/strings.xml @@ -1920,10 +1920,8 @@ Jos pidät OsmAndista ja OSMsta ja haluat tukea niitä, on tämä täydellinen t KP lista Viesti Konfiguroi kartta - Näytä/piilota suosikit Näytä suosikit Piilota suosikit - Näytä/piilota KP:t Näytä %1$s Piilota %1$s Lisää luokka @@ -2002,7 +2000,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ä/piilota OSM-huomautukset Näytä OSM-huomautukset Piilota OSM-huomautukset Lajiteltu etäisyyden perusteella @@ -2275,7 +2272,6 @@ Jos pidät OsmAndista ja OSMsta ja haluat tukea niitä, on tämä täydellinen t Muuta Näytä lisää Näytetyt jäljet - Näytä/piilota GPX jäljet Profiilin asetukset: Määritä profiili Vaihda profiilia @@ -2306,10 +2302,8 @@ Jos pidät OsmAndista ja OSMsta ja haluat tukea niitä, on tämä täydellinen t OSM-muokkaukset Näytä korkeuskäyrät Piilota korkeuskäyrät - Näytä/piilota korkeuskäyrät Näytä rinnevarjostus Piilota rinnevarjostus - Näytä/piilota rinnevarjostus Vie profiili OsmAnd profiili: %1$s \'%1$s\' on jo olemassa. Korvataanko\? diff --git a/OsmAnd/res/values-fr/strings.xml b/OsmAnd/res/values-fr/strings.xml index 7eec7e78e9..009e95320a 100644 --- a/OsmAnd/res/values-fr/strings.xml +++ b/OsmAnd/res/values-fr/strings.xml @@ -2099,10 +2099,8 @@ Emplacement Ce nom existe déjà, l\'action rapide a été renommée en %1$s. Nom d\'action rapide en double - Afficher / masquer les favoris Afficher les favoris Masquer les favoris - Afficher / masquer les points d\'intérêt Afficher %1$s Masquer %1$s Ajouter une catégorie @@ -2305,7 +2303,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 ou masquer les notes OSM Afficher les notes OSM Masquer les notes OSM Bouton pour afficher ou masquer les notes OSM sur la carte. @@ -2834,7 +2831,6 @@ Instructions pas à pas Types de route Sortir à - Afficher / masquer les traces Masquer les traces Afficher les traces Activer les modifications de transports publics en temps réel avec OsmAnd Live. @@ -3255,11 +3251,9 @@ Bouton affichant ou masquant les courbes de niveaux sur la carte. Afficher les courbes de niveaux Masquer les courbes de niveaux - Afficher / 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 - Afficher / 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 @@ -3486,7 +3480,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 - Affiche ou masque le terrain Masquer le terrain Afficher le terrain Un bouton pour afficher ou masquer la couche terrain sur la carte. @@ -3602,7 +3595,6 @@ Vous pouvez accéder à ces actions en appuyant sur le bouton \"%1$s\". Masquer les transports publics Afficher les transports publics - Affiche ou masque les transports publics Bouton pour afficher ou masquer les transports publics sur la carte. Créer ou modifier un PI Emplacements de stationnement @@ -3671,7 +3663,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 - Afficher/masquer Mapillary Masquer Mapillary Afficher Mapillary Bouton pour afficher ou masquer la couche Mapillary sur la carte. diff --git a/OsmAnd/res/values-gl/strings.xml b/OsmAnd/res/values-gl/strings.xml index 31607c9fc5..5f9a1579e7 100644 --- a/OsmAnd/res/values-gl/strings.xml +++ b/OsmAnd/res/values-gl/strings.xml @@ -2087,10 +2087,8 @@ 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/Agochar os Favoritos Amosar Favoritos Agochar os Favoritos - Amosar/Agochar os PDI Amosar %1$s Agochar %1$s Engadir unha categoría @@ -2228,7 +2226,6 @@ Lon %2$s Reiniciar procura Aumentar o raio de procura Non se atopou ren - Amosar ou agochar as notas do OSM Amosar notas do OSM Agochar notas do OSM Ordenado por distancia @@ -2853,7 +2850,6 @@ Lon %2$s Trocar Amosar máis Pistas amosadas - Amosar/agochar pistas Un botón que amosa ou agocha as pistas escollidas no mapa. Agochar pistas Amosar pistas @@ -3273,11 +3269,9 @@ Lon %2$s Un botón que amosa ou agocha as curvas de nivel no mapa. Amosar curvas de nivel Agochar curvas de nivel - Amosar/agochar curvas de nivel Un botón que amosa ou agocha a sombra dos outeiros no mapa. Amosar sombreados Agochar sombreados - Amosar/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 @@ -3552,7 +3546,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 - Amosar ou agochar terreo Agochar terreo Amosar terreo Un botón que amosa ou agocha a capa do terreo no mapa. @@ -3621,7 +3614,6 @@ Lon %2$s Podes acceder a estas accións premendo no botón “%1$s”. Agochar transporte público Amosar transporte público - Amosar ou agochar transporte público Botón que amosa ou agocha o transporte público no mapa. Crear ou editar PDI Posicións de aparcamento @@ -3691,7 +3683,6 @@ 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 - Amosar/agochar o Mapillary Agochar o Mapillary Un botón para amosar ou agochar a capa do Mapillary no mapa. Amosar o Mapillary diff --git a/OsmAnd/res/values-hu/strings.xml b/OsmAnd/res/values-hu/strings.xml index 47a3917779..6c14826ad9 100644 --- a/OsmAnd/res/values-hu/strings.xml +++ b/OsmAnd/res/values-hu/strings.xml @@ -2112,10 +2112,8 @@ 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/elrejtése Kedvencek megjelenítése Kedvencek elrejtése - POI-k megjelenítése/elrejtése %1$s megjelenítése %1$s elrejtése Kategória hozzáadása @@ -2239,7 +2237,6 @@ Utca kijelölése itt: %1$s Cím megadása - OSM-jegyzetek megjelenítése / elrejtése OSM-jegyzetek megjelenítése OSM-jegyzetek elrejtése Gomb, amely a térképen megjeleníti vagy elrejti az OSM-jegyzeteket. @@ -2797,7 +2794,6 @@ Részletes navigáció Úttípusok Szálljon le itt: - Nyomvonalak megjelenítése/elrejtése Gomb, amely a térképen megjeleníti vagy elrejti a nyomvonalakat. Nyomvonalak elrejtése Nyomvonalak megjelenítése @@ -3097,10 +3093,8 @@ Biztos, hogy az összes (%1$d) térképet frissíti\? Szintvonalak megjelenítése Szintvonalak elrejtése - Szintvonalak megjelenítése/elrejtése Domborzatárnyékolás megjelenítése Domborzatárnyékolás elrejtése - Domborzatárnyékolás megjelenítése/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 @@ -3414,7 +3408,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 megjelenítése vagy elrejtése Domborzat elrejtése Domborzat megjelenítése Váltógomb, amely a térképen megjeleníti vagy elrejti a domborzati réteget. @@ -3513,7 +3506,6 @@ Nem támogatott művelet: %1$s Tömegközlekedés elrejtése Tömegközlekedés megjelenítése - Tömegközlekedés megjelenítése vagy elrejtése POI készítése vagy módosítása Parkolási pozíció Kedvenc hozzáadása vagy módosítása @@ -3602,7 +3594,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 megjelenítése/elrejtése Mapillary elrejtése Mapillary megjelenítése Váltógomb, amely a térképen megjeleníti vagy elrejti a Mapillary réteget. diff --git a/OsmAnd/res/values-hy/strings.xml b/OsmAnd/res/values-hy/strings.xml index 4d997b73ce..6e8df0fd50 100644 --- a/OsmAnd/res/values-hy/strings.xml +++ b/OsmAnd/res/values-hy/strings.xml @@ -247,7 +247,6 @@ Ավելացնել որոնման շառավղը Ոչինչ չի գտնվել Փոխել հարցումը կամ ավելացնել որոնման շառավիղը։ - Ցույց տալ/թաքցնել OSM նշումները Ցույց տալ OSM նշումները Թաքցնել OSM նշումները Քարտեզի վրա ցույց տալ կամ թաքցնել OSM նշումները կոճակը: @@ -2484,10 +2483,8 @@ Կրկնօրինակ անուն գտնվեց Սեղմելով գործողության կոճակը ցույց կտա կամ կթաքցնի «Սիրված» կետերը քարտեզի վրա: Սեղմելով գործողության կոճակը ցույց կտա կամ կթաքցնի POI կետերը քարտեզի վրա: - Ցուցադրել/թաքցնել «Սիրված»-ը Ցուցադրել «Սիրված»-ը Թաքցնել «Սիրված»-ը - Ցուցադրել/թաքցնել POI Ցուցադրել %1$s Թաքցնել %1$s Ավելացնել կատեգորիա @@ -2870,7 +2867,6 @@ Պահել ակտիվ Ջնջել Որոշ երկրներում արագության վերահսկողության տեսախցիկների ծանուցումը արգելված է օրենքով ։ - Ցույց տալ/Թաքցնել Mapillary Թաքցնել Ցույց տալ Mapillary Անջատիչ - Mapillary շերտը ցույց տալու կամ թաքցնել ու քարտեզի վրա: @@ -2961,7 +2957,6 @@ Նավիգացիոն պրոֆիլներ Թաքցնել հասարակական տրանսպորտը Ցույց տալ հասարակական տրանսպորտը - Ցույց տալ / թաքցնել հասարակական տրանսպորտը Կոճակ, որը ցույց է տալիս կամ թաքցնում է հասարակական տրանսպորտը քարտեզի վրա: Ստեղծել / Խմբագրել POI Ավելացնել / Խմբագրել Սիրվածն-րը diff --git a/OsmAnd/res/values-id/strings.xml b/OsmAnd/res/values-id/strings.xml index 066b53f1b6..8b558c3b81 100644 --- a/OsmAnd/res/values-id/strings.xml +++ b/OsmAnd/res/values-id/strings.xml @@ -233,7 +233,6 @@ Tingkatkan radius pencarian Tidak ada yang ditemukan Ubah kata pencarian atau tingkatkan radius pencarian. - Tampil/sembunyikan Catatan OSM Tampilkan Catatan OSM Sembunyikan Catatan OSM Mengetuk tombol tindakan akan menampilkan atau menyembunyikan Catatan OSM di peta. diff --git a/OsmAnd/res/values-is/strings.xml b/OsmAnd/res/values-is/strings.xml index baf977ae9c..fa58745492 100644 --- a/OsmAnd/res/values-is/strings.xml +++ b/OsmAnd/res/values-is/strings.xml @@ -1801,10 +1801,8 @@ Forstilling á nafni " vistað í " Staður - Birta/Fela eftirlæti Birta eftirlæti Fela eftirlæti - Birta/Fela merkisstaði Sýna %1$s Fela %1$s Bæta við flokki @@ -2049,7 +2047,6 @@ Byrja leit aftur Stækka radíus leitar Ekkert fannst - Birta/fela OSM-minnispunkta Birta OSM-minnispunkta Fela OSM-minnispunkta Raðað eftir vegalengd @@ -2850,7 +2847,6 @@ Gerðir vega Fara útaf við Fara um borð við stöðvunina - Birta/Fela ferla Hnappur til að birta eða fela valda ferla á kortinu. Fela ferla Birta ferla @@ -3270,11 +3266,9 @@ Hnappur til að birta eða fela hæðarlínur á kortinu. Birta hæðarlínur Fela hæðarlínur - Birta/Fela hæðarlínur Hnappur til að birta eða fela hæðaskyggingu á kortinu. Birta hæðaskyggingu Fela hæðaskyggingu - Birta/Fela hæðaskyggingu Gat ekki ræst talgervil. Herma eftir staðsetningu þinni með áður skráðum GPX-ferli. Flytja út snið @@ -3497,7 +3491,6 @@ Virkja til að sjá hæðaskyggingar eða brekkur á korti. Þú getur lesið meira um þessa eiginleika á vefnum okkar. Hæðaskygging Brekkur - Birta eða fela yfirborð Fela yfirborð Sýna yfirborð Hnappur til að birta eða fela yfirborðslag á kortinu. @@ -3610,7 +3603,6 @@ Þú getur komist í þessar aðgerðir með því að ýta á \"%1$s\"-hnappinn. Áskrift - OsmAnd Live Alltaf - Birta eða fela almenningssamgöngur Endurheimta sjálfgefna röð atriða Óstudd tegund Leiðsagnarleiðbeiningar @@ -3672,7 +3664,6 @@ Merktar hraðamyndavélar Halda virku Aðvaranir vegna hraðamyndavéla eru bannaðar með lögum í sumum löndum. - Sýna/fela Mapillary Fela Mapillary Sýna Mapillary Víxlhnappur til að birta eða fela Mapillary-lagið á kortinu. diff --git a/OsmAnd/res/values-it/strings.xml b/OsmAnd/res/values-it/strings.xml index b0fed91a00..e30bfe222d 100644 --- a/OsmAnd/res/values-it/strings.xml +++ b/OsmAnd/res/values-it/strings.xml @@ -2120,10 +2120,8 @@ 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/nascondi preferiti Mostra preferiti Nascondi preferiti - Mostra/nascondi PDI Mostra %1$s Nascondi %1$s Aggiungi una categoria @@ -2250,7 +2248,6 @@ Aumenta il raggio di ricerca Nessun risultato Cambia la ricerca o aumenta il raggio. - Mostra/nascondi le Note OSM Mostra le note OSM Nascondi le note OSM Toccando il pulsante azione verranno mostrate o nascoste le note OSM sulla mappa. @@ -2829,7 +2826,6 @@ Tipi di strade Mostra di più Tracciati visualizzati - Mostra/nascondi tracce GPX Nascondi Tracciati GPX Mostra Tracciati GPX Modalità %s @@ -3254,11 +3250,9 @@ Un controllo per mostrare o nascondere nella mappa le linee isoipse. Mostra le linee isoipse Nascondi le linee isoipse - Mostra/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 - Mostra/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) @@ -3478,7 +3472,6 @@ Un bottone per mostrare o nascondere la vista rilievo sulla mappa. Mostra rilievo Nascondi rilievo - Mostra/nascondi rilievo Pendenze Ombreggiatura rilievi Puoi avere maggiori informazioni sulle Pendenze in %1$s. @@ -3516,7 +3509,6 @@ Oggetti Nascondi i trasporti pubblici Mostra i trasporti pubblici - Mostra/nascondi i trasporti pubblici Il pulsante mostra o nasconde nella mappa i trasporti pubblici. Crea/Modifica PDI Posizione di parcheggio @@ -3672,7 +3664,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 - Mostra/nascondi Mapillary Nascondi Mapillary Mostra Mapillary Un pulsante per visualizzare nella mappa o nascondere il livello Mapillary . diff --git a/OsmAnd/res/values-iw/strings.xml b/OsmAnd/res/values-iw/strings.xml index a9c6fff921..4899a2373e 100644 --- a/OsmAnd/res/values-iw/strings.xml +++ b/OsmAnd/res/values-iw/strings.xml @@ -1125,7 +1125,6 @@ הגדלת רדיוס החיפוש לא נמצא כלום עריכת החיפוש או הגדלת הטווח. - הצגה או הסתרה של הערות OSM הצגת הערות OSM הסתרת הערות OSM כפתור להצגה או להסתרה של הערות OSM על המפה. @@ -1649,10 +1648,8 @@ מיקום בורר להצגה או הסתרה של הנקודות המועדפות במפה. בורר להצגה או הסתרה של נקודות עניין במפה. - הצגה/הסתרה של מועדפים הצגת מועדפים הסתרת מועדפים - הצגה/הסרה של נקודות עניין הצגת %1$s הסתרת %1$s הוספת קטגוריה @@ -2843,7 +2840,6 @@ פנייה אחר פנייה סוגי כבישים לצאת ב־ - הצגה/הסתרה של מסלולים כפתור להצגה או הסתרה של המסלולים הנבחרים במפה. הסתרת מסלולים הצגת מסלולים @@ -3259,11 +3255,9 @@ כפתור להצגה או להסתרה של קווי מתאר במפה. הצגת קווי מתאר הסתרת קווי מתאר - הצגה/הסתרה של קווי מתאר כפתור להצגה או הסתרה של הצללות במפה. הצגת הצללה הסתרת הצללה - הצגה/הסתרה של הצללה לא ניתן להפעיל מנוע המרת טקסט לדיבור. הדמיית המיקום שלך באמצעות מסלול GPX שהוקלט מראש. ייצוא פרופיל @@ -3470,7 +3464,6 @@ הצללה %1$s מתוך %2$s מדרונות - הצגה או הסתרה של תוואי שטח הסתרת תוואי שטח הצגת תוואי שטח כפתור להצגה או הסתרה של שכבת תוואי שטח על גבי המפה. @@ -3593,7 +3586,6 @@ ניתן לגשת לפעולות האלו על ידי לחיצה על הכפתור „%1$s”. הסתרת תחבורה ציבורית הצגת תחבורה ציבורית - הצגת או הסתרת תחב״צ כפתור להצגה או הסתרה של תחבורה ציבורית על המפה. יצירה או עריכה של נקודת עניין מקומות חנייה @@ -3686,7 +3678,6 @@ ניתן להגדיר את גובה כלי השיט כדי להימנע מגשרים נמוכים. נא לשים לב שאם הגשר נע, אנו נשתמש בגובהו במצב הפתוח. יש להגדיר את גובה כלי השיט כדי להימנע מגשרים נמוכים. נא לשים לב שאם הגשר נע, אנו נשתמש בגובהו במצב הפתוח. הגדרת רוחב כלי השיט כדי להימנע מגשרים צרים - הצגת/הסתרת Mapillary הסתרת Mapillary הצגת Mapillary מפסק להצגה או הסתרה של שכבת Mapillary על גבי המפה. diff --git a/OsmAnd/res/values-ja/strings.xml b/OsmAnd/res/values-ja/strings.xml index a5edb2aaeb..bbde03f05b 100644 --- a/OsmAnd/res/values-ja/strings.xml +++ b/OsmAnd/res/values-ja/strings.xml @@ -2141,10 +2141,8 @@ POIの更新は利用できません クイックアクション名の重複 マップ画面でのお気に入り地点の表示/非表示の切替が出来ます。 マップ画面でのPOIの表示/非表示の切替が出来ます。 - お気に入りの表示/非表示 お気に入りを表示 お気に入りを非表示 - POIの表示/非表示 %1$sを表示 %1$sを非表示 カテゴリーを追加 @@ -2349,7 +2347,6 @@ POIの更新は利用できません  • オプションで速度と標高表示ができます  • 等高線と山陰の表示(要追加プラグイン) " - OSMメモの表示/非表示 OSMメモを表示 OSMメモを非表示 マップ画面でのOSMメモの表示/非表示を切り替えるボタンです。 @@ -2792,7 +2789,6 @@ POIの更新は利用できません 入れ替え さらに表示 マップ上の経路 - GPX経路の表示/非表示 マップ上にある選択したGPX経路の表示/非表示を切り替えるボタンです。 経路の非表示 経路の表示 @@ -3269,11 +3265,9 @@ POIの更新は利用できません マップ上の等高線の表示/非表示を切り替えられるボタンです。 等高線を表示 等高線を非表示 - 等高線を表示/非表示 マップ上の陰影起伏図の表示/非表示を切り替えられるボタンです。 陰影起伏図を表示 陰影起伏図を非表示 - 陰影起伏図の表示/非表示 テキスト読み上げエンジンを起動できません。 プロファイルのエクスポート OsmAndプロファイル:%1$s @@ -3497,7 +3491,6 @@ POIの更新は利用できません ズームレベル 陰影起伏図 勾配 - 地形を表示/非表示 地形を非表示 地形を表示 マップ上の地形レイヤーの表示/非表示を切り替えるボタンです。 @@ -3510,7 +3503,6 @@ POIの更新は利用できません 最小 公共交通機関を非表示 公共交通機関を表示 - 公共交通機関の表示/非表示 マップ内公共交通機関の表示/非表示を切り替えるボタンです。 POIの作成/編集 駐車位置 @@ -3737,7 +3729,6 @@ POIの更新は利用できません 低い橋を避けるために船の高さを調整できます。橋が可動式の場合は、開いた状態の高さが参照されます。 低い橋を避けるために船の高さを設定します。注:橋が可動式の場合は、開いた状態の高さが参照されます。 狭い橋を避けるために船の幅を設定します - Mapillaryの表示切替 Mapillaryを非表示 Mapillaryを表示 マップ上のMapillaryレイヤーの表示/非表示を切り替えるトグルボタンです。 diff --git a/OsmAnd/res/values-ka/strings.xml b/OsmAnd/res/values-ka/strings.xml index 786b5de97c..843bb16d97 100644 --- a/OsmAnd/res/values-ka/strings.xml +++ b/OsmAnd/res/values-ka/strings.xml @@ -1223,7 +1223,6 @@ ახალი პროფილის ჩაწერა %1$s %2$s-დან დაქანებები - რელიეფის ჩვენება/დამალვა რელიეფის დამალვა რელიეფის ჩვენება რელიეფის შრის საჩვენებელი ღილაკი. @@ -1799,7 +1798,6 @@ %1$d გადმოწერა ბილიკების ჩვენება ბილიკების დამალვა - ბილიკების ჩვენება/დამალვა გამოსვლა %1$s-ით ნაჩვენები ბილიკები @@ -1959,10 +1957,8 @@ რუკის გამართვა %1$s-ის დამალვა %1$s-ის ჩვენება - POI-ს ჩვენება/დამალვა რჩეულების დამალვა რჩეულების ჩვენება - რჩეულების ჩვენება/დამალვა მოქმედების წაშლა მოქმედების დამატება რჩეულის დამატება @@ -2220,7 +2216,6 @@ მიმართულების ისრები მოტოციკლი Enduro მოტორიანი სკუტერი - Mapillary-ის ჩვენება/დამალვა Mapillary-ის დამალვა Mapillary-ის ჩვენება წავშალოთ ყველა\? @@ -2287,7 +2282,6 @@ საწყისი წერტილი პროფილის იმპორტი პროფილის ექსპორტი - ბორცვების დამალვა/ჩვენება ბორცვების დამალვა ბორცვების ჩვენება %1$s კბ @@ -2365,7 +2359,6 @@ როგორ გავხსნათ Wikipedia-ს სტატიები\? მოგესალმებით სატესტო ვერსიაში რუკაზე ისრების ჩვენება - OSM-ჩანაწერების ჩვენება ან დამალვა აკრიფეთ ქალაქის სახელი ან მისამართი %1$s-ის რუკაზე ჩვენება მდებარეობა: @@ -2561,7 +2554,6 @@ შეტყობნებები რუკის დიალოგის ფანჯარა OsmAnd-ის პროფილი: %1$s - კონტურული ხაზების ჩვენება/დამალვა კონტურული ხაზების დამალვა კონტურული ხაზების ჩვენება ყველა რუკის განახლება diff --git a/OsmAnd/res/values-kn/strings.xml b/OsmAnd/res/values-kn/strings.xml index 9ecd3c89bb..fcc64923ac 100644 --- a/OsmAnd/res/values-kn/strings.xml +++ b/OsmAnd/res/values-kn/strings.xml @@ -322,11 +322,9 @@ ನಕ್ಷೆಯಲ್ಲಿ ಬಾಹ್ಯರೇಖೆಗಳನ್ನು ತೋರಿಸಲು ಅಥವಾ ಮರೆಮಾಡಲು ಟಾಗಲ್. ಬಾಹ್ಯರೇಖೆ ರೇಖೆಗಳನ್ನು ತೋರಿಸಿ ಬಾಹ್ಯರೇಖೆ ರೇಖೆಗಳನ್ನು ಮರೆಮಾಡಿ - ಬಾಹ್ಯರೇಖೆಗಳನ್ನು ತೋರಿಸಿ / ಮರೆಮಾಡಿ ನಕ್ಷೆಯಲ್ಲಿ \'ಹಿಲ್ಶೇಡ್\' ಅನ್ನು ತೋರಿಸಲು ಅಥವಾ ಮರೆಮಾಡಲು ಟಾಗಲ್ ಮಾಡಿ. ಹಿಲ್ಶೇಡ್ ತೋರಿಸು ಹಿಲ್ಶೇಡ್ ಅನ್ನು ಮರೆಮಾಡಿ - ಹಿಲ್ಶೇಡ್ ಅನ್ನು ತೋರಿಸಿ / ಮರೆಮಾಡಿ text-to-speech ಎಂಜಿನ್ ಅನ್ನು ಪ್ರಾರಂಭಿಸಲು ಸಾಧ್ಯವಿಲ್ಲ ಪ್ರೊಫೈಲನ್ನು ಬೇರೆಡೆಗೆ ರಫ್ತುಮಾಡಿ OsmAnd ಪ್ರೊಫೈಲ್:%1$s diff --git a/OsmAnd/res/values-lt/strings.xml b/OsmAnd/res/values-lt/strings.xml index eb1d4b98bc..c096fe2a30 100644 --- a/OsmAnd/res/values-lt/strings.xml +++ b/OsmAnd/res/values-lt/strings.xml @@ -2048,7 +2048,6 @@ Tai yra puikus būdas paremti OsmAnd ir OSM, jei jie jums patinka. Pridėti veiksmą Ištrinti veiksmą Vieta - Rodyti/slėpti LV Pridėti kategoriją Pranešimas Žemėlapio stiliai @@ -2069,7 +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/slėpti OSM Pastabas Rodyti OSM Pastabas Slėpti OSM Pastabas Ieškoti parankiniuose @@ -2141,7 +2139,6 @@ Tai yra puikus būdas paremti OsmAnd ir OSM, jei jie jums patinka. Rodyti parankinių dialogą Rodyti tarpinį dialogo langą " įrašytas į " - Rodyti/slėpti parankinius Rodyti Parankinius Slėpti Parankinius Rodyti %1$s @@ -2620,7 +2617,6 @@ Tai yra puikus būdas paremti OsmAnd ir OSM, jei jie jums patinka. Dienos metas Kelių tipai Rodyti daugiau - Rodyti/slėpti GPX pėdsakus Paspaudus šį mygtuką žemėlapyje parodomi arba paslepiami GPX pėdsakai Slėpti GPX pėdsakus Rodyti GPX pėdsakus @@ -2730,7 +2726,6 @@ Tai yra puikus būdas paremti OsmAnd ir OSM, jei jie jums patinka. Atkurti Ieškoti gatvės Matuoti atstumą - Rodyti/paslėpti viešąjį transportą Paslėpti viešąjį transportą Rodyti viešąjį transportą Pridėti profilį diff --git a/OsmAnd/res/values-lv/strings.xml b/OsmAnd/res/values-lv/strings.xml index 7120ce1b02..2d59b4fb2a 100644 --- a/OsmAnd/res/values-lv/strings.xml +++ b/OsmAnd/res/values-lv/strings.xml @@ -2072,10 +2072,8 @@ 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/nerādīt izlasi Rādīt favorītus Nerādīt izlasi - Rādīt/slēpt POI Rādīt %1$s Paslēpt %1$s Pievienot kategoriju @@ -2202,7 +2200,6 @@ Apraksta laukumu: %1$s x %2$s Paplašināt meklēšanas rādiusu Neko neatrada Meklējiet pēc cita vārda vai palieliniet meklēšanas rādiusu. - Rādīt/nerādīt OSM piezīmes Atļaut piekļūšanu privātajām teritorijām. Maršruta gaitā iespējot kartes pagriešanas animāciju no manas atrašanās vietas. Ieslēdz vai izslēdz automātisko tālummaiņu, atkarībā no kustības ātruma. @@ -2670,7 +2667,6 @@ No Afganistānas līdz Zimbabvei, no Austrālijas līdz ASV, Argentīna, Brazīl Soli pa solim Iziet pie Soliņš pieturā - Rādīt/Slēpt GPX trekus 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 diff --git a/OsmAnd/res/values-ml/strings.xml b/OsmAnd/res/values-ml/strings.xml index 9b57d104e0..a3d79f3089 100644 --- a/OsmAnd/res/values-ml/strings.xml +++ b/OsmAnd/res/values-ml/strings.xml @@ -1695,7 +1695,6 @@ "വീണ്ടും തെരയുക " "തെരച്ചില്‍ വൃത്തം വലുതാക്കുക " "ഒന്നും കണ്ടെത്താനായില്ല " - "ഓഎസ് എം കുറിപ്പുകള്‍ (നോട്ട്സ്) കാണിക്കുക/കാണിക്കാതിരിക്കുക " ഓഎസ് എം കുറിപ്പുകള്‍ (നോട്ട്സ്) കാണിക്കുക "ഓഎസ് എം കുറിപ്പുകള്‍ (നോട്ട്സ്) കാണിക്കാതിരിക്കുക " ഓഎസ് എം കുറിപ്പുകള്‍ (നോട്ട്സ്) കാണാന്‍/കാണാതിരിക്കാന്‍ ഈ ആക്ഷന്‍ ബട്ടണ്‍ അമത്തുക @@ -2343,10 +2342,8 @@ സ്ഥലം "അതിവേഗ പ്രവൃത്തിയുടെ നാമം ഉപയോഗത്തിലുണ്ട്, ഡ്യൂപ്ലിക്കേഷൻ ഒഴിവാക്കുന്നതിന് %1$s എന്നാക്കി മാറ്റി." ദ്രുത പ്രവർത്തനത്തിന്റെ പേര് ഒന്നിലധികം പകര്‍പ്പിലുണ്ട് - പ്രിയപ്പെട്ടവ കാണിക്കുക / മറയ്ക്കുക പ്രിയപ്പെട്ടവ കാണിക്കുക പ്രിയങ്കരങ്ങൾ മറയ്ക്കുക - POI കാണിക്കുക / മറയ്ക്കുക %1$s കാണിക്കുക %1$s മറയ്ക്കുക ഒരു വിഭാഗം ചേർക്കുക @@ -2650,7 +2647,6 @@ %1$s-ല്‍ പുറത്തേക്ക് എത്തുക സ്റ്റോപ്പിൽ നിന്ന് കയറുക - GPX ട്രാക്കുകൾ കാണിക്കുക / മറയ്ക്കുക "ഈ ബട്ടണ്‍ തെരഞ്ഞെടുത്ത GPX ട്രാക്കുകൾ മാപ്പില്‍ കാണിക്കാന്‍ /മറയ്ക്കാന്‍ ഉപയോഗിക്കാം" GPX ട്രാക്കുകൾ മറയ്ക്കുക GPX ട്രാക്കുകൾ കാണിക്കുക diff --git a/OsmAnd/res/values-nb/strings.xml b/OsmAnd/res/values-nb/strings.xml index 5d0a58d52d..f26d7030f4 100644 --- a/OsmAnd/res/values-nb/strings.xml +++ b/OsmAnd/res/values-nb/strings.xml @@ -1970,11 +1970,9 @@ Kartinnstilling Legg til en kategori Skjul favoritter - Vis/skjul interessepunkt Vis %1$s Skjul %1$s Vis favoritter - Vis/skjul favoritter Sted Legg til favoritt Tale på/av @@ -2132,7 +2130,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/skjul OSM-notater Vis OSM-notater Skjul OSM-notater Knapp til å vise eller skjule OSM-notater på kartet. @@ -2852,7 +2849,6 @@ Veityper Gå av på Sitt på stoppet - Vis/skjul spor Knapp for å vise eller skjule valgte spor på kartet. Skjul spor Vis spor @@ -3164,11 +3160,9 @@ Foretrekk veier uten fast dekke framfor med fast dekke for ruting. Vis koter Skjul koter - Vis/skjul koter En knapp for å vise eller skjule relieffskygger på kartet. Vis relieffskygge Skjul relieffskygge - Vis/skjul relieffskygge Kan ikke starte tekst-til-tale-motor. Simuler posisjonen din ved bruk av et innspilt GPX-spor. OsmAnd-profil: %1$s @@ -3393,7 +3387,6 @@ Åpne innstillinger Terreng %1$s av %2$s - Vis eller skjul terreng Skjul terreng Vis terreng Slett beskrivelse @@ -3455,7 +3448,6 @@ Vis offentlig transport Tilbake til redigering Opprett eller rediger interessepunkt - Vis eller skjul offentlig transport Legg til profil Knapp for vising eller skjuling av offentlig transport på kartet. Direkte-til-punkt @@ -3582,7 +3574,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 - Vis/skjul Mapillary Skjul Mapillary Vis Mapillary Peiling diff --git a/OsmAnd/res/values-nl/strings.xml b/OsmAnd/res/values-nl/strings.xml index 5209bca499..1c682d61d9 100644 --- a/OsmAnd/res/values-nl/strings.xml +++ b/OsmAnd/res/values-nl/strings.xml @@ -2118,10 +2118,8 @@ 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 /verbergen Favorieten tonen Favorieten verbergen - POI’s tonen/verbergen %1$s tonen %1$s verbergen Categorie toevoegen @@ -2327,7 +2325,6 @@ \n Naam bevat erg veel hoofdletters, toch doorgaan? Zoek in Favorieten - OSM-opmerkingen tonen of verbergen OSM-opmerkingen tonen OSM-opmerkingen verbergen Knop om OSM-opmerkingen al dan niet te tonen. @@ -2859,7 +2856,6 @@ Wissel Toon meer Getoonde tracks - GPX-tracks tonen/verbergen Een knop om geselecteerde GPX-tracks al dan niet te tonen op de kaart. GPX-tracks verbergen GPX-tracks tonen @@ -3131,11 +3127,9 @@ Knop om hoogtelijnen al dan niet te tonen op de kaart. Hoogtelijnen tonen Hoogtelijnen verbergen - Hoogtelijnen tonen/verbergen Knop om de reliëfschaduw al dan niet te tonen op de kaart. Reliëfschaduw tonen Reliëfschaduw verbergen - Reliëfschaduw tonen/verbergen Track opgeslagen Toon knooppunt van de fietsroutes Hoogtelijnen en reliëfschaduw @@ -3408,7 +3402,6 @@ Kan profiel niet back-uppen. %1$s van %2$s Hellingen - Terrein tonen / verbergen Terrein verbergen Terrein tonen Een knop om de terreinlaag al dan niet te tonen op de kaart. @@ -3445,7 +3438,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 tonen/verbergen Mapillary verbergen Mapillary tonen Een schakelknop om de Mapillary-laag al dan niet te tonen op de kaart. @@ -3563,7 +3555,6 @@ POI-types zoeken OV-informatie verbergen OV-informatie tonen - OV-informatie tonen/verbergen 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 28149e979a..788aa757e2 100644 --- a/OsmAnd/res/values-oc/strings.xml +++ b/OsmAnd/res/values-oc/strings.xml @@ -136,7 +136,6 @@ De l\'envèrs Mostrar mai Traças vesedoiras - Mòstrar/ Amagar la traça GPS 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 @@ -484,11 +483,9 @@ 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 - Mòstra/Amaga 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 - Mòstra/Amaga 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 384f3f73a1..1e00cb7e75 100644 --- a/OsmAnd/res/values-pl/strings.xml +++ b/OsmAnd/res/values-pl/strings.xml @@ -2134,10 +2134,8 @@ 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. - Przełącz widoczność ulubionych Pokaż Ulubione Ukryj Ulubione - Przełącz widoczność użytecznych miejsc Tworzenie elementów Ta wiadomość uzupełni się w polu komentarza. Wiadomość @@ -2282,7 +2280,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ż lub ukryj uwagi OSM Pokaż uwagi OSM Ukryj uwagi OSM Przybliżony zasięg i jakość mapy: @@ -2845,7 +2842,6 @@ Wymień Wyświetl więcej Wyświetlane ślady - Pokaż/Ukryj ślady Przycisk do pokazywania lub ukrywania wybranych śladów na mapie. Ukryj ślady Pokaż ślady @@ -3266,10 +3262,8 @@ Przełącza wyświetlenie poziomic na mapie. Wyświetl poziomice Ukryj poziomice - Przełącz widoczność poziomic Wyświetl cieniowanie terenu Ukryj cieniowanie terenu - Przełącz widoczność cieniowania terenu Przycisk do pokazywania lub ukrywania cieniowania terenu na mapie. Nie można uruchomić mechanizmu zamiany tekstu na mowę. Wspólne @@ -3486,7 +3480,6 @@ Przycisk do wyświetlania lub ukrywania warstwy terenu na mapie. Pokaż teren Ukryj teren - Pokaż lub 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 @@ -3613,7 +3606,6 @@ Powrót do edycji Ukryj transport publiczny Pokaż transport publiczny - Pokaż lub ukryj transport publiczny Utwórz lub edytuj użyteczne miejsce Dodaj lub edytuj ulubione miejsce Przycisk akcji przełącza między wybranymi profilami. @@ -3665,7 +3657,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 - Pokaż/ukryj Mapillary Ukryj Mapillary Pokaż Mapillary Wprowadź szerokość pojazdu, niektóre restrykcje dróg mogą dotyczyć szerokich pojazdów. diff --git a/OsmAnd/res/values-pt-rBR/strings.xml b/OsmAnd/res/values-pt-rBR/strings.xml index 7a21af4cd6..34bd6feef6 100644 --- a/OsmAnd/res/values-pt-rBR/strings.xml +++ b/OsmAnd/res/values-pt-rBR/strings.xml @@ -2049,7 +2049,6 @@ Aumentar o raio de busca Nada encontrado Modifique o texto da pesquisa ou aumente o raio de busca. - Mostrar ou ocultar notas do OSM Mostrar Anotações do OSM Ocultar notas OSM Botão para mostrar ou ocultar notas do OSM no mapa. @@ -2457,10 +2456,8 @@ 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/ocultar favoritos Mostrar Favoritos Ocultar favoritos - Mostrar/ocultar POI Mostrar %1$s Ocultar %1$s Adicionar uma categoria @@ -2841,7 +2838,6 @@ Tipos de estrada Desembarque em Embarque na parada - Mostrar/ocultar trilhas Um botão para mostrar ou ocultar as trilhas selecionadas no mapa. Ocultar trilhas Mostrar trilhas @@ -3259,11 +3255,9 @@ Botão que mostra ou oculta linhas de contorno no mapa. Mostrar curvas de nível Ocultar linhas de contorno - Mostrar/ocultar linhas de contorno Um botão para mostrar ou ocultar sombras de relevo. Mostrar sombras de relevo Ocultar sombras de relevo - Mostrar/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 @@ -3489,7 +3483,6 @@ Sombras de relevo %1$s de %2$s Encostas - Mostrar ou ocultar terreno Ocultar terreno Mostrar terreno Um botão para mostrar ou ocultar a camada do terreno no mapa. @@ -3606,7 +3599,6 @@ Você pode acessar essas ações tocando no botão “%1$s”. Ocultar transporte público Mostrar transporte público - Mostrar ou ocultar transporte público Botão que mostra ou oculta o transporte público no mapa. Criar ou editar POI Posições de estacionamento @@ -3675,7 +3667,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 - Mostrar/ocultar Mapillary Ocultar Mapillary Mostrar Mapillary Uma alternância para mostrar ou ocultar a camada Mapillary no mapa. diff --git a/OsmAnd/res/values-pt/strings.xml b/OsmAnd/res/values-pt/strings.xml index b5ddfb1f86..d94decabf7 100644 --- a/OsmAnd/res/values-pt/strings.xml +++ b/OsmAnd/res/values-pt/strings.xml @@ -1911,7 +1911,6 @@ Aumentar raio de pesquisa Nada encontrado Altere a pesquisa ou aumente o raio dela. - Mostrar ou ocultar anotações do OSM Mostrar anotações OSM Ocultar anotações do OSM Botão para mostrar ou ocultar anotações OSM no mapa. @@ -2725,10 +2724,8 @@ 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/esconder favoritos Mostrar Favoritos Esconder favoritos - Mostrar/esconder POI Mostrar %1$s Esconder %1$s Adicionar uma categoria @@ -2894,7 +2891,6 @@ Trocar Mostrar mais Trilhos mostrados - Mostrar/ocultar trilhos Um botão para mostrar ou ocultar trilhos selecionados no mapa. Ocultar trilhos Sem elétricos @@ -3286,11 +3282,9 @@ Botão que mostra ou oculta curvas de nível no mapa. Mostrar curvas de nível Ocultar curvas de nível - Mostrar/ocultar curvas de nível Um botão para mostrar ou ocultar sombras de relevo. Mostrar sombras de relevo Ocultar sombras de relevo - Mostrar/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 @@ -3345,7 +3339,6 @@ Sombras de relevo %1$s de %2$s Pistas - Mostrar ou ocultar terrenos Ocultar terreno Mostrar terreno Um botão para mostrar ou esconder a camada do terreno no mapa. @@ -3593,7 +3586,6 @@ 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 - Mostrar ou ocultar transportes públicos Botão que mostra ou oculta o transporte público no mapa. Criar ou editar um POI Posições de estacionamento @@ -3712,7 +3704,6 @@ 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. Cadeira de rodas para a frente Controlar o nível de ampliação do mapa pelos botões de volume do aparelho. - Mostrar/ocultar Mapillary Desinstalar radares de velocidade Anotaçaõ OSM fechada Desinstalar e reiniciar diff --git a/OsmAnd/res/values-ro/strings.xml b/OsmAnd/res/values-ro/strings.xml index 22bec3c3c9..f216bc900e 100644 --- a/OsmAnd/res/values-ro/strings.xml +++ b/OsmAnd/res/values-ro/strings.xml @@ -1803,7 +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. - Comutare note OSM Arată notele OSM Ascunde notele OSM Atingând acest buton de acțiune, se afișează sau se ascund notele OSM de pe hartă. @@ -2204,7 +2203,6 @@ Schimbați Afișați mai multe Trasee afișate - Afișați/Ascundeți traseele GPX Ascundeți traseele GPX Afișați traseele GPX Selectați destinația mai întâi @@ -2383,11 +2381,9 @@ Comută pentru a afișa sau ascunde liniile de contur pe hartă. Afişează conturul liniilor Ascunde conturul liniilor - Afişează-ascunde conturul liniilor Comută pentru a arăta sau ascunde umbrele de pe hartă. Arata si umbrele Ascunde afisarea umbrelor - Afişează/ascunde umbrele Motorul text-to-speech nu porneste. Exportă profilul Profil osmand exportat %1$s @@ -2825,7 +2821,6 @@ tone metrii Adăugare surse online - Afișare/ascundere Mapillary Ascundere Mapillary Afișare Mapillary O comutare pentru a afișa sau ascunde stratul Mapillary pe hartă. diff --git a/OsmAnd/res/values-ru/strings.xml b/OsmAnd/res/values-ru/strings.xml index b77fe2b33d..629a956ea1 100644 --- a/OsmAnd/res/values-ru/strings.xml +++ b/OsmAnd/res/values-ru/strings.xml @@ -40,7 +40,6 @@ Увеличить радиус поиска Ничего не найдено Изменить запрос или увеличить радиус поиска. - Показать/скрыть OSM-заметки Показать OSM-заметки Скрыть OSM-заметки Переключатель отображения OSM-заметок на карте. @@ -147,7 +146,6 @@ Обнаружен дубликат имени Переключатель, чтобы показать или скрыть избранные точки на карте. Переключатель, чтобы показать или скрыть POI на карте. - Показать/скрыть избранные Категория Действия Если оставить это поле пустым, то оно будет автоматически заполнено адресом или названием места. @@ -2260,7 +2258,6 @@ Вы уверены, что хотите удалить действие «%s»\? Показать избранные Скрыть избранные - Показать/скрыть POI Показать %1$s Скрыть %1$s Настройки карты @@ -2868,7 +2865,6 @@ Поменять Показать больше Отображаемые треки - Показать/скрыть треки Скрыть треки Показать треки Время суток @@ -3230,11 +3226,9 @@ Переключатель, показывающая или скрывающая контурные линии на карте. Показать контурные линии Скрыть контурные линии - Показать/скрыть контурные линии Переключатель, чтобы показать или скрыть затенение рельефа на карте. Показать затенение рельефа Скрыть затенение рельефа - Показать/скрыть затенение рельефа Экспорт профиля Профиль OsmAnd: %1$s «%1$s» уже существует. Перезаписать\? @@ -3482,7 +3476,6 @@ Пересчитывать маршрут в случае отклонения %1$s из %2$s Настройка минимального и максимального уровней масштабирования, при которых слой будет отображаться. - Показать или скрыть рельеф Переключатель, чтобы показать или скрыть слой рельефа местности на карте. Показать рельеф Скрыть рельеф @@ -3611,7 +3604,6 @@ Функции, доступные при нажатии кнопки «%1$s». Скрыть общественный транспорт Показать общественный транспорт - Показать/скрыть общественный транспорт Добавить или изменить избранное Создать или изменить POI Возврат к редактированию @@ -3680,7 +3672,6 @@ Вы можете указать высоту судна, чтобы избегать низких мостов. Имейте в виду, что если мост раздвижной, будет использована его высота в открытом состоянии. Укажите высоту судна, чтобы избежать низких мостов. Имейте в виду, что если мост раздвижной, будет использована его высота в открытом состоянии. Укажите ширину судна, чтобы избежать узких мостов - Показать/скрыть Mapillary Скрыть Mapillary Показать Mapillary Переключатель, чтобы показать или скрыть слой Mapillary на карте. diff --git a/OsmAnd/res/values-sc/strings.xml b/OsmAnd/res/values-sc/strings.xml index 0f5d4c3fdb..800c4709a5 100644 --- a/OsmAnd/res/values-sc/strings.xml +++ b/OsmAnd/res/values-sc/strings.xml @@ -2119,10 +2119,8 @@ 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/cua sos preferidos Ammustra sos preferidos Cua sos preferidos - Ammustra/cua sos PDI Ammustra %1$s Cua %1$s Annanghe una categoria @@ -2389,7 +2387,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/cua sas notas OSM Ammustra sas notas OSM Cua sas notas OSM Unu butone pro ammustrare o cuare sas Notas OSM in sa mapa. @@ -2844,7 +2841,6 @@ Castas de àndalas Essi in Àrtzia in sa firmada - Ammustra/cua sas rastas Unu butone pro ammustrare o cuare sas rastas ischertadas in sa mapa. Istichi sas rastas Ammustra sas rastas @@ -3264,11 +3260,9 @@ Butone chi ammustrat o cuat sas curvas de livellu in sa mapa. Ammustra sas curvas de livellu Cua sas curvas de livellu - Ammustra/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 - Ammustra/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 @@ -3494,7 +3488,6 @@ Umbraduras de sos rilievos %1$s de %2$s Pistas - Ammustra o cua su terrinu Cua su terrinu Ammustra su terrinu Unu butone pro ammustrare o cuare s\'istratu de su terrinu in sa mapa. @@ -3612,7 +3605,6 @@ Podes atzèdere a custas atziones incarchende su butone \"%1$s\". Cua sos trasportos pùblicos Ammustra sos trasportos pùblicos - Ammustra o cua 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 @@ -3680,7 +3672,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 - Ammustra/cua Mapillary Cua Mapillary Ammustra Mapillary Unu butone pro ammustrare o cuare s\'istratu de Mapillary in sa mapa. diff --git a/OsmAnd/res/values-sk/strings.xml b/OsmAnd/res/values-sk/strings.xml index 2fd8af51aa..77703c92a5 100644 --- a/OsmAnd/res/values-sk/strings.xml +++ b/OsmAnd/res/values-sk/strings.xml @@ -2124,10 +2124,8 @@ 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ť/skryť Obľúbené body Zobraziť Obľúbené body Skryť Obľúbené body - Zobraziť/skryť body záujmu Zobraziť %1$s Skryť %1$s Pridať kategóriu @@ -2387,7 +2385,6 @@ Stiahnite mapu \"Vrstevnice\" pre tento región. Zoradené podľa vzdialenosti Hľadať v Obľúbených bodoch - Zobraziť alebo skryť OSM poznámky Zobraziť OSM poznámky Skryť OSM poznámky Tlačidlo pre zobrazenie alebo skrytie OSM poznámok na mape. @@ -2844,7 +2841,6 @@ Druhy ciest Vystúpte na Nastúpte na zastávke - Zobraziť/skryť stopy Tlačidlo pre zobrazenie alebo skrytie zvolených stôp na mape. Skryť stopy Zobraziť stopy @@ -3274,11 +3270,9 @@ Tlačidlo pre zobrazenie alebo skrytie vrstevníc na mape. Zobraziť vrstevnice Skryť vrstevnice - Zobraziť/skryť vrstevnice Tlačidlo pre zobrazenie alebo skrytie tieňovaných svahov na mape. Zobraziť tieňované svahy Skryť tieňované svahy - Zobraziť/skryť tieňované svahy Nepodarilo sa spustiť modul prevodu textu na reč. Simulovať polohu pomocou zaznamenanej stopy GPX. Importovať profil @@ -3492,7 +3486,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 - Zobraziť alebo skryť terén Skryť terén Zobraziť terén Tlačidlo pre zobrazenie alebo skrytie vrstvy terénu na mape. @@ -3608,7 +3601,6 @@ \n Skryť verejnú dopravu Zobraziť verejnú dopravu - Zobraziť alebo skryť verejnú dopravu Tlačidlo na zobrazenie alebo skrytie verejnej dopravy na mape. Vytvoriť alebo upraviť bod záujmu Parkovacie miesta @@ -3689,7 +3681,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. - Zobraziť/skryť Mapillary Skryť Mapillary Zobraziť Mapillary Prepínač pre zobrazenie alebo skrytie vrstvy Mapillary na mape. diff --git a/OsmAnd/res/values-sl/strings.xml b/OsmAnd/res/values-sl/strings.xml index e78029cd1b..ef4d7e4679 100644 --- a/OsmAnd/res/values-sl/strings.xml +++ b/OsmAnd/res/values-sl/strings.xml @@ -2095,10 +2095,8 @@ Ali ste prepričani, da želite izbrisati dejanje »%s«? Ime dejanja Mesto - Pokaži/Skrij priljubljene Pokaži priljubljene Skrij priljubljene - Pokaži/Skrij točke POI Pokaži %1$s Skrij %1$s Dodaj kategorijo @@ -2258,7 +2256,6 @@ Povečaj območje iskanja Ni zadetkov Poskusite zamenjati iskalni niz ali pa povečajte obseg iskanja. - Preklopi vidnost opomb OSM Pokaži Opombe OSM Skrij Opombe OSM Razvrščeno po razdalji @@ -2874,7 +2871,6 @@ Zamenjaj Pokaži več Prikazane sledi - Pokaži/Skrij sledi GPX Skrij sledi GPX Pokaži sledi GPX Najprej je treba dodati cilj @@ -3241,7 +3237,6 @@ Skrij Mapillary Prikaži mapillary Dodaj spletni vir - Prikaži/skrij Mapillary Odstrani in ponovno zaženi Uporabi gumbe za glasnost za približevanje Prejmi zemljevide Wikipedije diff --git a/OsmAnd/res/values-sr/strings.xml b/OsmAnd/res/values-sr/strings.xml index a548052f4a..084c6de825 100644 --- a/OsmAnd/res/values-sr/strings.xml +++ b/OsmAnd/res/values-sr/strings.xml @@ -1245,7 +1245,6 @@ Повећај област претраге Нема ничег пронађеног Промените претрагу или повећајте област претраге. - Приказује или сакрива OSM белешке Прикажи белешке ОСМ-а Сакриј белешке ОСМ-а Дугме да прикажите или да сакријете OSM белешке на карти. @@ -2218,10 +2217,8 @@ Прикажи дијалог за Омиљене " сачувано у " Место - Прикажи/сакриј Омиљене Прикажи Омиљене Сакриј Омиљене - Прикажи/сакриј тачке од интереса Прикажи %1$s Сакриј %1$s Додај категорију @@ -2901,7 +2898,6 @@ Прикажи још Приказане путање Укрцавање на стајању - Прикажи/сакриј путање Дугме које приказује или сакрива одабране путање са карте. Сакриј путање Прикажи путање @@ -3264,11 +3260,9 @@ Дугме које приказује или сакрива линије изохипси на карти. Прикажи изохипсе Сакриј изохипсе - Прикажи/сакриј изохипсе Дугме које приказује или сакрива рељеф на карти. Прикажи рељеф Сакриј рељеф - Прикажи/сакриј рељеф Не могу да покренем мотор за синтетизовање гласа. Симулирајте Вашу позицију користећу снимљену GPX стазу. Извези профил @@ -3467,7 +3461,6 @@ Поврати све поставке профила\? Чувам нови профил Не могу да направим резервну копију профила. - Прикажи или сакриј терен Сакриј терен Прикажи терен Дугме да прикаже или сакрите слој терена на карти. @@ -3510,7 +3503,6 @@ Профили навођења Сакриј јавни превоз Прикажи јавни превоз - Прикажи или сакриј јавни превоз Дугме које приказује или скрива јавни превоз на карти. Паркинг позиције Поврати подразумевани поредак ставки @@ -3587,7 +3579,6 @@ Држи активним Избриши Упозорења за радаре су законом забрањене у неким државама. - Прикажи/сакриј Mapillary Сакриј Mapillary Прикажи Mapillary Јоруба diff --git a/OsmAnd/res/values-sv/strings.xml b/OsmAnd/res/values-sv/strings.xml index bb3003ee19..502d5544dd 100644 --- a/OsmAnd/res/values-sv/strings.xml +++ b/OsmAnd/res/values-sv/strings.xml @@ -2025,10 +2025,8 @@ 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/Dölj favoriter Visa favoriter Dölj favoriter - Visa/Dölj POI Visa %1$s Dölj %1$s Lägg till en kategori @@ -2125,7 +2123,6 @@ Vänligen tillhandahåll fullständig kod Välj stad Välj postnummer Autozoomning på/av - Visa/Dölj OSM-anteckningar Visa OSM-anteckningar Dölj OSM-anteckningar Ett tryck på denna åtgärdsknapp visar eller döljer OSM-anteckningar på kartan. diff --git a/OsmAnd/res/values-tr/strings.xml b/OsmAnd/res/values-tr/strings.xml index 2d2101489a..243127892f 100644 --- a/OsmAnd/res/values-tr/strings.xml +++ b/OsmAnd/res/values-tr/strings.xml @@ -1981,7 +1981,6 @@ Düşük Su İşlem Adı - OSM notlarını göster ya da gizle OSM notlarını göster OSM notlarını gizle OSM notlarını haritada göstermek veya gizlemek için bir düğme. @@ -2443,7 +2442,6 @@ Yol türleri Takas Daha fazla görüntüle - Yolları göster/gizle Yolları Gizle Yolları Göster Ev ekle @@ -2964,10 +2962,8 @@ " kaydedildi " Yer Hızlı eylem adı yinelenen - Sık Kullanılanları göster/gizle Sık Kullanılanları göster Sık Kullanılanları gizle - POI göster/gizle %1$s göster %1$s gizle Kategori ekle @@ -3267,11 +3263,9 @@ 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 - Eş yükselti eğrilerini göster/gizle Haritada tepe gölgelerini göstermek veya gizlemek için bir düğme. Tepe gölgesini göster Tepe gölgesini gizle - Tepe gölgesini göster/gizle Metinden konuşmaya motoru başlatılamıyor. Kayıtlı bir GPX yolu kullanarak konumunuzu simüle edin. Profili dışa aktar @@ -3497,7 +3491,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 göster veya gizle Araziyi gizle Araziyi göster Haritada arazi katmanını göstermek veya gizlemek için bir düğme. @@ -3615,7 +3608,6 @@ Bu eylemlere “%1$s” düğmesine dokunarak erişebilirsiniz. Toplu taşıma araçlarını gizle Toplu taşıma araçlarını göster - Toplu taşıma araçlarını göster veya gizle Haritada toplu taşıma araçlarını gösteren veya gizleyen düğme. POI oluştur veya düzenle Park etme alanları @@ -3683,7 +3675,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 göster/gizle Mapillary\'i gizle Mapillary\'i göster Harita üzerinde Mapillary katmanını göstermek veya gizlemek için bir geçiş. diff --git a/OsmAnd/res/values-uk/strings.xml b/OsmAnd/res/values-uk/strings.xml index 6fba4223b3..7d92f4dbac 100644 --- a/OsmAnd/res/values-uk/strings.xml +++ b/OsmAnd/res/values-uk/strings.xml @@ -2093,10 +2093,8 @@ Вилучити дію Ви впевнені, що хочете вилучити дію „%s“? Місце - Показати/приховати Закладки Показати Закладки Приховати Закладки - Показати/приховати POI Показати %1$s Приховати %1$s Додати категорію @@ -2210,7 +2208,6 @@ Нічого не знайдено Місце призначення розташовано в області з приватним доступом. Дозволити доступ до приватних доріг у цій подорожі\? Змініть пошуковий запит або ж розширте пошуковий радіус. - Показати/приховати примітки OSM Показати примітки OSM Приховати примітки OSM Натискання на кнопку дії покаже чи приховає примітки OSM на мапі. @@ -2804,7 +2801,6 @@ Поміняти Показати більше Показані треки - Показати/Приховати треки Приховати треки Показати треки Спершу додайте пункт призначення @@ -3267,11 +3263,9 @@ Увімк/вимк показ горизонталей. Показати горизонталі Сховати горизонталі - Показати/приховати горизонталі Кнопка, що показує чи приховує горизонталі на мапі. Показати затемнення рельєфу Приховати затемнення рельєфу - Показати/приховати затемнення рельєфу Не вдається запустити рушій мовлення. Відтворити свою позицію за допомогою записаного треку GPX. Експорт профілю @@ -3496,7 +3490,6 @@ Пагорб %1$s з %2$s Схили - Показати чи приховати рельєф Сховати місцевість Показати місцевість Кнопка для відображення або приховування шару місцевості на мапі. @@ -3612,7 +3605,6 @@ Розташування припаркованого авто Приховати громадський транспорт Показати громадський транспорт - Показати чи приховати громадський транспорт Кнопка показу або приховування громадського транспорту на мапі. Створити чи змінити POI Додати чи змінити закладку @@ -3681,7 +3673,6 @@ Ви можете встановити висоту судна, щоб уникнути низьких мостів. Майте на увазі, якщо міст рухомий, використовуватиметься його висота у відкритому стані. Встановіть висоту судна, щоб уникнути низьких мостів. Майте на увазі, якщо міст рухомий, використовуватиметься його висота у відкритому стані. Встановіть ширину судна, щоб уникнути вузьких мостів - Увімкнути/вимкнути Mapillary Вимкнути Mapillary Показати Mapillary Перемикач показує/приховує шар Mapillary на мапі. diff --git a/OsmAnd/res/values-zh-rCN/strings.xml b/OsmAnd/res/values-zh-rCN/strings.xml index 4f46e46e40..390f33407d 100644 --- a/OsmAnd/res/values-zh-rCN/strings.xml +++ b/OsmAnd/res/values-zh-rCN/strings.xml @@ -1249,7 +1249,6 @@ 增加搜索范围 什么都没找到 更改搜索或增加其半径。 - 显示/隐藏 OSM 注记 显示 OSM 注记 隐藏 OSM 注记 添加照片 @@ -2382,10 +2381,8 @@ 快速动作名称重复 轻触动作按钮将会在地图上显示或隐收藏夹标点。 轻触动作按钮将会在地图上显示或隐藏 POI。 - 显示/隐藏收藏夹 显示收藏夹 隐藏收藏夹 - 显示/隐藏 POI 显示 %1$s 隐藏 %1$s 添加类别 @@ -2732,7 +2729,6 @@ 逐步 道路类型 退出于 - 显示/隐藏GPX轨迹 在地图中显示或隐藏已选中的GPX轨迹的按钮。 隐藏GPX轨迹 显示GPX路径 @@ -2894,7 +2890,6 @@ 透明度 缩放等级 图例 - 显示/隐藏地形 隐藏地形 显示地形 删除描述 @@ -2919,7 +2914,6 @@ 订阅 - OsmAnd Live 隐藏公共交通 显示公共交通 - 显示/隐藏公共交通 创建/编辑兴趣点 编辑在线资源 正轴等角圆柱投影 @@ -2934,7 +2928,6 @@ 您可以设置船只高度,以避免过低桥梁。请记住,如果桥是可移动的,我们将使用它在打开状态下的高度。 设置船只高度,以避免过低桥梁。请记住,如果桥是可移动的,我们将使用它在打开状态下的高度。 设置船只宽度以避免狭窄的桥梁 - 显示/隐藏Mapillary 隐藏Mapillary 显示Mapillary %1$s 已删除 @@ -2959,9 +2952,7 @@ 允许专家路线 节点网络 隐藏罗盘标尺 - 显示/隐藏山体阴影 隐藏山体阴影 - 显示/隐藏轮廓线 隐藏轮廓线 在地图上显示或隐藏地形图层的按钮。 显示或隐藏其他地图细节 diff --git a/OsmAnd/res/values-zh-rTW/strings.xml b/OsmAnd/res/values-zh-rTW/strings.xml index 21e5de09a5..bfa817bfa3 100644 --- a/OsmAnd/res/values-zh-rTW/strings.xml +++ b/OsmAnd/res/values-zh-rTW/strings.xml @@ -2092,10 +2092,8 @@ 預設的名稱 " 儲存到 " 場所 - 顯示/隱藏我的收藏 顯示我的收藏 隱藏我的收藏 - 顯示/隱藏 POI 顯示 %1$s 隱藏 %1$s 增加一項類別 @@ -2382,7 +2380,6 @@ 安裝「等高線」外掛程式以顯示漸層垂直區域。 自此縮放等級開始隱藏 按距離排序 - 顯示或隱藏 OSM 註記 顯示 OSM 註記 隱藏 OSM 註記 在我的最愛中搜尋 @@ -2839,7 +2836,6 @@ 道路類型 離開於 站點的座位 - 顯示/隱藏軌跡 在地圖上顯示或隱藏所選軌跡的按鈕。 隱藏軌跡 顯示軌跡 @@ -3259,11 +3255,9 @@ 在地圖上顯示或隱藏等高線的按鈕。 顯示等高線 隱藏等高線 - 顯示/隱藏等高線 在地圖上顯示或隱藏地形陰影的按鈕。 顯示地形陰影 隱藏地形陰影 - 顯示/隱藏地形陰影 無法啟動文字轉語音引擎。 使用已紀錄的 GPX 軌跡模擬您的位置。 匯出設定檔 @@ -3490,7 +3484,6 @@ 啟用以檢視地形陰影或坡度圖。您可以在我們的網站上閱讀更多關於這些地圖類型的資訊。 地形陰影 坡度 - 顯示或隱藏地形 隱藏地形 顯示地形 用於顯示或隱藏地圖上地形圖層的按鈕。 @@ -3607,7 +3600,6 @@ 您可以透過點選「%1$s」按鈕存取這些動作。 隱藏大眾運輸 在地圖上顯示或隱藏大眾運輸的按鈕。 - 顯示或隱藏大眾運輸 建立或編輯 POI 停車位置 新增與編輯收藏 @@ -3675,7 +3667,6 @@ 您可以設定船艦高度以避免矮橋。請記住,如果橋是可動式的,我們將會使用其在開啟狀態的高度。 設定船艦高度以避免矮橋。請記住,如果橋是可動式的,我們將會使用其開啟狀態的高度。 設定船艦寬度以避免窄橋 - 顯示/隱藏 Mapillary 隱藏 Mapillary 顯示 Mapillary 在地圖上顯示或隱藏 Mapillary 圖層的開關。 diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index 8bd34fa336..c43425fa92 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -12,6 +12,7 @@ --> + Show/hide Copy POI name The recording will be continued. Select category or add new one @@ -19,7 +20,6 @@ A toggle to show or hide the Coordinates widget on the map. Show Coordinates widget Hide Coordinates widget - Show/Hide coordinates widget Routing could avoid strong uphills. Application restart required to apply some settings. On pause @@ -344,7 +344,6 @@ A toggle to show or hide the Mapillary layer on the map. Show Mapillary Hide Mapillary - Show/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. @@ -421,7 +420,6 @@ Parking positions Create or edit POI Button showing or hiding public transport on the map. - Show or hide public transport Show public transport Hide public transport @@ -523,7 +521,6 @@ A button to show or hide terrain layer on the map. Show terrain Hide terrain - Show or 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. @@ -726,11 +723,9 @@ Button showing or hiding contour lines on the map. Show contour lines Hide contour lines - Show/hide contour lines A button to show or hide hillshades on the map. Show hillshade Hide hillshade - Show/hide hillshade You can apply this change to all or only the selected profile. Shared Prefer unpaved roads @@ -1117,7 +1112,6 @@ Swap Show more Displayed tracks - Show/hide tracks A button to show or hide selected tracks on the map. Hide Tracks Show Tracks @@ -1530,7 +1524,6 @@ Increase search radius Nothing found Change the search or increase its radius. - Show or hide OSM notes Show OSM notes Hide OSM notes Button to show or hide OSM notes on the map. @@ -4014,10 +4007,8 @@ 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/hide Favorites Show Favorites Hide Favorites - Show/hide POI 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 39082ea6e9..a50d53f7d5 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/ShowHideOSMBugAction.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/ShowHideOSMBugAction.java @@ -15,10 +15,10 @@ import net.osmand.plus.quickaction.QuickActionType; public class ShowHideOSMBugAction extends QuickAction { public static final QuickActionType TYPE = new QuickActionType(24, - "osmbug.showhide", ShowHideOSMBugAction.class). - nameRes(R.string.quick_action_showhide_osmbugs_title).iconRes(R.drawable.ic_action_osm_note).nonEditable(). - category(QuickActionType.CONFIGURE_MAP); - + "osmbug.showhide", ShowHideOSMBugAction.class) + .nameActionRes(R.string.quick_action_showhide_title) + .nameRes(R.string.osm_notes).iconRes(R.drawable.ic_action_osm_note).nonEditable() + .category(QuickActionType.CONFIGURE_MAP); public ShowHideOSMBugAction() { super(TYPE); diff --git a/OsmAnd/src/net/osmand/plus/quickaction/AddQuickActionDialog.java b/OsmAnd/src/net/osmand/plus/quickaction/AddQuickActionDialog.java index 41a25beb12..c36e666457 100644 --- a/OsmAnd/src/net/osmand/plus/quickaction/AddQuickActionDialog.java +++ b/OsmAnd/src/net/osmand/plus/quickaction/AddQuickActionDialog.java @@ -53,7 +53,15 @@ public class AddQuickActionDialog extends MenuBottomSheetDialogFragment { null, false); TextView title = itemView.findViewById(R.id.title); ImageView icon = itemView.findViewById(R.id.image); - title.setText(action.getNameRes()); + String message; + if (action.getActionNameRes() != 0) { + String showHide = getResources().getString(action.getActionNameRes()); + String nameAction = getResources().getString(action.getNameRes()); + message = getResources().getString(R.string.ltr_or_rtl_combine_via_dash, showHide, nameAction); + } else { + message = getResources().getString(action.getNameRes()); + } + title.setText(message); icon.setImageResource(action.getIconRes()); items.add(new BaseBottomSheetItem.Builder() .setCustomView(itemView) diff --git a/OsmAnd/src/net/osmand/plus/quickaction/QuickActionType.java b/OsmAnd/src/net/osmand/plus/quickaction/QuickActionType.java index d58085966d..9d29039764 100644 --- a/OsmAnd/src/net/osmand/plus/quickaction/QuickActionType.java +++ b/OsmAnd/src/net/osmand/plus/quickaction/QuickActionType.java @@ -16,6 +16,7 @@ public class QuickActionType { private final String stringId; private boolean actionEditable; private @StringRes int nameRes; + private @StringRes int nameActionRes; private @DrawableRes int iconRes; private Class cl; private int category; @@ -37,6 +38,11 @@ public class QuickActionType { return this; } + public QuickActionType nameActionRes(int nameActionRes) { + this.nameActionRes = nameActionRes; + return this; + } + public QuickActionType category(int cat) { this.category = cat; return this; @@ -102,6 +108,10 @@ public class QuickActionType { return nameRes; } + public int getActionNameRes() { + return nameActionRes; + } + public int getIconRes() { return iconRes; } diff --git a/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHideCoordinatesWidgetAction.java b/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHideCoordinatesWidgetAction.java index 68df60511b..f1a450d09e 100644 --- a/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHideCoordinatesWidgetAction.java +++ b/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHideCoordinatesWidgetAction.java @@ -14,7 +14,8 @@ import net.osmand.plus.quickaction.QuickActionType; public class ShowHideCoordinatesWidgetAction extends QuickAction { public static final QuickActionType TYPE = new QuickActionType(35, "coordinates.showhide", ShowHideCoordinatesWidgetAction.class) - .nameRes(R.string.quick_action_showhide_coordinates_widget) + .nameActionRes(R.string.quick_action_showhide_title) + .nameRes(R.string.coordinates_widget) .iconRes(R.drawable.ic_action_coordinates_widget).nonEditable() .category(QuickActionType.CONFIGURE_SCREEN); diff --git a/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHideFavoritesAction.java b/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHideFavoritesAction.java index 0bad3af2a9..3393af785e 100644 --- a/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHideFavoritesAction.java +++ b/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHideFavoritesAction.java @@ -14,11 +14,11 @@ import net.osmand.plus.quickaction.QuickActionType; public class ShowHideFavoritesAction extends QuickAction { public static final QuickActionType TYPE = new QuickActionType(4, - "favorites.showhide", ShowHideFavoritesAction.class). - nameRes(R.string.quick_action_showhide_favorites_title).iconRes(R.drawable.ic_action_favorite).nonEditable(). - category(QuickActionType.CONFIGURE_MAP); - - + "favorites.showhide", ShowHideFavoritesAction.class) + .nameActionRes(R.string.quick_action_showhide_title) + .nameRes(R.string.shared_string_favorites) + .iconRes(R.drawable.ic_action_favorite).nonEditable() + .category(QuickActionType.CONFIGURE_MAP); public ShowHideFavoritesAction() { super(TYPE); diff --git a/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHideGpxTracksAction.java b/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHideGpxTracksAction.java index 34ce197220..1e67f1a6ac 100644 --- a/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHideGpxTracksAction.java +++ b/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHideGpxTracksAction.java @@ -16,10 +16,10 @@ public class ShowHideGpxTracksAction extends QuickAction { public static final QuickActionType TYPE = new QuickActionType(28, - "gpx.showhide", ShowHideGpxTracksAction.class). - nameRes(R.string.quick_action_show_hide_gpx_tracks).iconRes(R.drawable.ic_action_polygom_dark).nonEditable(). - category(QuickActionType.CONFIGURE_MAP); - + "gpx.showhide", ShowHideGpxTracksAction.class) + .nameActionRes(R.string.quick_action_showhide_title) + .nameRes(R.string.show_gpx).iconRes(R.drawable.ic_action_polygom_dark).nonEditable() + .category(QuickActionType.CONFIGURE_MAP); public ShowHideGpxTracksAction() { super(TYPE); diff --git a/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHideMapillaryAction.java b/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHideMapillaryAction.java index ba6c7d7391..709d589537 100644 --- a/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHideMapillaryAction.java +++ b/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHideMapillaryAction.java @@ -18,7 +18,8 @@ public class ShowHideMapillaryAction extends QuickAction { public static final QuickActionType TYPE = new QuickActionType(33, "mapillary.showhide", ShowHideMapillaryAction.class) - .nameRes(R.string.quick_action_showhide_mapillary_title) + .nameActionRes(R.string.quick_action_showhide_title) + .nameRes(R.string.mapillary) .iconRes(R.drawable.ic_action_mapillary).nonEditable() .category(QuickActionType.CONFIGURE_MAP); diff --git a/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHidePoiAction.java b/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHidePoiAction.java index 51b9b300ed..735b9efdc1 100644 --- a/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHidePoiAction.java +++ b/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHidePoiAction.java @@ -37,10 +37,11 @@ public class ShowHidePoiAction extends QuickAction { public static final QuickActionType TYPE = new QuickActionType(5, - "poi.showhide", ShowHidePoiAction.class). - nameRes(R.string.quick_action_showhide_poi_title).iconRes(R.drawable.ic_action_info_dark). - category(QuickActionType.CONFIGURE_MAP); - + "poi.showhide", ShowHidePoiAction.class) + .nameActionRes(R.string.quick_action_showhide_title) + .nameRes(R.string.poi) + .iconRes(R.drawable.ic_action_info_dark) + .category(QuickActionType.CONFIGURE_MAP); public static final String KEY_FILTERS = "filters"; diff --git a/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHideTransportLinesAction.java b/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHideTransportLinesAction.java index 61f04f2c6f..d4c6bd0788 100644 --- a/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHideTransportLinesAction.java +++ b/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHideTransportLinesAction.java @@ -16,7 +16,8 @@ public class ShowHideTransportLinesAction extends QuickAction { public static final QuickActionType TYPE = new QuickActionType(31, "transport.showhide", ShowHideTransportLinesAction.class) - .nameRes(R.string.quick_action_show_hide_transport) + .nameActionRes(R.string.quick_action_showhide_title) + .nameRes(R.string.poi_filter_public_transport) .iconRes(R.drawable.ic_action_transport_bus).nonEditable() .category(QuickActionType.CONFIGURE_MAP); diff --git a/OsmAnd/src/net/osmand/plus/srtmplugin/ContourLinesAction.java b/OsmAnd/src/net/osmand/plus/srtmplugin/ContourLinesAction.java index 15d33c8fa3..0a67a3cfb0 100644 --- a/OsmAnd/src/net/osmand/plus/srtmplugin/ContourLinesAction.java +++ b/OsmAnd/src/net/osmand/plus/srtmplugin/ContourLinesAction.java @@ -21,11 +21,10 @@ import static net.osmand.plus.srtmplugin.SRTMPlugin.CONTOUR_LINES_DISABLED_VALUE public class ContourLinesAction extends QuickAction { public static final QuickActionType TYPE = new QuickActionType(29, - "contourlines.showhide", ContourLinesAction.class). - nameRes(R.string.quick_action_show_hide_contour_lines).iconRes(R.drawable.ic_plugin_srtm).nonEditable(). - category(QuickActionType.CONFIGURE_MAP); - - + "contourlines.showhide", ContourLinesAction.class) + .nameActionRes(R.string.quick_action_showhide_title) + .nameRes(R.string.srtm_plugin_name).iconRes(R.drawable.ic_plugin_srtm).nonEditable() + .category(QuickActionType.CONFIGURE_MAP); public ContourLinesAction() { super(TYPE); diff --git a/OsmAnd/src/net/osmand/plus/srtmplugin/TerrainAction.java b/OsmAnd/src/net/osmand/plus/srtmplugin/TerrainAction.java index fdeb099cfa..988f6a5782 100644 --- a/OsmAnd/src/net/osmand/plus/srtmplugin/TerrainAction.java +++ b/OsmAnd/src/net/osmand/plus/srtmplugin/TerrainAction.java @@ -16,8 +16,8 @@ import net.osmand.plus.quickaction.QuickActionType; public class TerrainAction extends QuickAction { public static final QuickActionType TYPE = new QuickActionType(30, - "terrain.showhide", TerrainAction.class). - nameRes(R.string.quick_action_show_hide_terrain).iconRes(R.drawable.ic_action_hillshade_dark).nonEditable(). + "terrain.showhide", TerrainAction.class).nameActionRes(R.string.quick_action_showhide_title). + nameRes(R.string.shared_string_terrain).iconRes(R.drawable.ic_action_hillshade_dark).nonEditable(). category(QuickActionType.CONFIGURE_MAP); From 233463a138df8027f07eb1c8fa51a2ba049829b4 Mon Sep 17 00:00:00 2001 From: Hardy Date: Thu, 4 Mar 2021 08:06:53 +0100 Subject: [PATCH 15/59] Correct spelling --- OsmAnd/res/values-de/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OsmAnd/res/values-de/strings.xml b/OsmAnd/res/values-de/strings.xml index 9711652ceb..8a6d7cb2a4 100644 --- a/OsmAnd/res/values-de/strings.xml +++ b/OsmAnd/res/values-de/strings.xml @@ -1204,7 +1204,7 @@ Daten als GPX-Datei speichern oder Wegpunkte als Favoriten importieren? Tracks Favoriten - Meine orte + Meine Orte %1$s wird geladen … Aktuelle Zeit " @@ -4035,4 +4035,4 @@ sek Rennsport Erste Ankündigung (größere Distanz) - \ No newline at end of file + 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 16/59] 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 368b2ff8f922fc4c8bfeda46d04141134af72f9f Mon Sep 17 00:00:00 2001 From: Kseniia Date: Thu, 4 Mar 2021 12:55:32 +0200 Subject: [PATCH 17/59] Add minor stop 10281 --- OsmAnd-java/build.gradle | 1 - .../net/osmand/binary/RouteDataObject.java | 14 +++++++++---- .../osmand/router/RouteResultPreparation.java | 21 ++++++++++++++----- 3 files changed, 26 insertions(+), 10 deletions(-) diff --git a/OsmAnd-java/build.gradle b/OsmAnd-java/build.gradle index d4e77b9d85..d461ea8aff 100644 --- a/OsmAnd-java/build.gradle +++ b/OsmAnd-java/build.gradle @@ -112,7 +112,6 @@ dependencies { implementation group: 'org.json', name: 'json', version: '20171018' implementation 'it.unibo.alice.tuprolog:tuprolog:3.2.1' implementation 'org.apache.commons:commons-compress:1.17' - implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.0' implementation 'com.moparisthebest:junidecode:0.1.1' implementation 'com.vividsolutions:jts-core:1.14.0' implementation 'com.google.openlocationcode:openlocationcode:1.0.4' diff --git a/OsmAnd-java/src/main/java/net/osmand/binary/RouteDataObject.java b/OsmAnd-java/src/main/java/net/osmand/binary/RouteDataObject.java index 61d282e5e4..d4c4024b27 100644 --- a/OsmAnd-java/src/main/java/net/osmand/binary/RouteDataObject.java +++ b/OsmAnd-java/src/main/java/net/osmand/binary/RouteDataObject.java @@ -8,7 +8,6 @@ import net.osmand.util.Algorithms; import net.osmand.util.MapUtils; import net.osmand.util.TransliterationHelper; -import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.logging.Log; import java.text.MessageFormat; @@ -504,9 +503,16 @@ public class RouteDataObject { public void removePointType(int ind, int type) { if (pointTypes != null || ind < pointTypes.length) { int[] typesArr = pointTypes[ind]; - for (int t : typesArr) { - if (t == type) { - pointTypes[ind] = ArrayUtils.removeElement(typesArr, t); + + for (int i = 0; i < typesArr.length; i++) { + if (typesArr[i] == type) { + int[] result = new int[typesArr.length - 1]; + System.arraycopy(typesArr, 0, result, 0, i); + if (typesArr.length != i) { + System.arraycopy(typesArr, i + 1, result, i, typesArr.length - 1 - i); + pointTypes[ind] = result; + break; + } } } } 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 d79bbc53da..2faf6b1833 100644 --- a/OsmAnd-java/src/main/java/net/osmand/router/RouteResultPreparation.java +++ b/OsmAnd-java/src/main/java/net/osmand/router/RouteResultPreparation.java @@ -177,19 +177,30 @@ public class RouteResultPreparation { validateAllPointsConnected(result); splitRoadsAndAttachRoadSegments(ctx, result, recalculation); for (int i = 0; i < result.size(); i++) { - prepareStopSign(result.get(i)); + filterMinorStops(result.get(i)); } calculateTimeSpeed(ctx, result); prepareTurnResults(ctx, result); return result; } - public RouteSegmentResult prepareStopSign(RouteSegmentResult seg) { - int start = seg.getStartPointIndex(); - int end = seg.getEndPointIndex(); + public RouteSegmentResult filterMinorStops(RouteSegmentResult seg) { + int startPoint = seg.getStartPointIndex(); + int endPoint = seg.getEndPointIndex(); + int start; + int end; + + if (startPoint < endPoint) { + start = startPoint; + end = endPoint; + } else { + start = endPoint; + end = startPoint; + } + List stops = new ArrayList<>(); - for (int i = start; i > end; i--) { + for (int i = start; i < end; i++) { int[] pointTypes = seg.getObject().getPointTypes(i); if (pointTypes != null) { for (int j = 0; j < pointTypes.length; j++) { From 9a44cd70e66b8778d9edbb462decb5f2774bd3ac Mon Sep 17 00:00:00 2001 From: Kseniia Date: Thu, 4 Mar 2021 14:15:33 +0200 Subject: [PATCH 18/59] Add minor stop 10281 --- .../osmand/router/RouteResultPreparation.java | 31 +++++++++++-------- 1 file changed, 18 insertions(+), 13 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 2faf6b1833..16c492422a 100644 --- a/OsmAnd-java/src/main/java/net/osmand/router/RouteResultPreparation.java +++ b/OsmAnd-java/src/main/java/net/osmand/router/RouteResultPreparation.java @@ -185,6 +185,7 @@ public class RouteResultPreparation { } public RouteSegmentResult filterMinorStops(RouteSegmentResult seg) { + List stops = null; int startPoint = seg.getStartPointIndex(); int endPoint = seg.getEndPointIndex(); int start; @@ -198,27 +199,31 @@ public class RouteResultPreparation { end = startPoint; } - List stops = new ArrayList<>(); - - for (int i = start; i < end; i++) { - int[] pointTypes = seg.getObject().getPointTypes(i); + while (start <= end) { + int[] pointTypes = seg.getObject().getPointTypes(start); if (pointTypes != null) { for (int j = 0; j < pointTypes.length; j++) { if (pointTypes[j] == seg.getObject().region.stopMinor) { - stops.add(i); + if (stops == null) { + stops = new ArrayList<>(); + } + stops.add(start); } } } + start++; } - for (int stop : stops) { - List attachedRoutes = seg.getAttachedRoutes(stop); - for (RouteSegmentResult attached : attachedRoutes) { - int attStopPriority = highwaySpeakPriority(attached.getObject().getHighway()); - int segStopPriority = highwaySpeakPriority(seg.getObject().getHighway()); - if (segStopPriority < attStopPriority) { - seg.getObject().removePointType(stop, seg.getObject().region.stopSign); - break; + if (stops != null) { + for (int stop : stops) { + List attachedRoutes = seg.getAttachedRoutes(stop); + for (RouteSegmentResult attached : attachedRoutes) { + int attStopPriority = highwaySpeakPriority(attached.getObject().getHighway()); + int segStopPriority = highwaySpeakPriority(seg.getObject().getHighway()); + if (segStopPriority < attStopPriority) { + seg.getObject().removePointType(stop, seg.getObject().region.stopSign); + break; + } } } } From 08cd0db15204b7760c133d529bcc338841a305a4 Mon Sep 17 00:00:00 2001 From: androiddevkotlin <64539346+androiddevkotlin@users.noreply.github.com> Date: Thu, 4 Mar 2021 15:07:31 +0200 Subject: [PATCH 19/59] Minor fix --- .../osmand/plus/quickaction/AddQuickActionDialog.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/quickaction/AddQuickActionDialog.java b/OsmAnd/src/net/osmand/plus/quickaction/AddQuickActionDialog.java index c36e666457..9183338021 100644 --- a/OsmAnd/src/net/osmand/plus/quickaction/AddQuickActionDialog.java +++ b/OsmAnd/src/net/osmand/plus/quickaction/AddQuickActionDialog.java @@ -53,15 +53,13 @@ public class AddQuickActionDialog extends MenuBottomSheetDialogFragment { null, false); TextView title = itemView.findViewById(R.id.title); ImageView icon = itemView.findViewById(R.id.image); - String message; if (action.getActionNameRes() != 0) { - String showHide = getResources().getString(action.getActionNameRes()); - String nameAction = getResources().getString(action.getNameRes()); - message = getResources().getString(R.string.ltr_or_rtl_combine_via_dash, showHide, nameAction); + String name = getString(action.getNameRes()); + String actionName = getString(action.getActionNameRes()); + title.setText(getString(R.string.ltr_or_rtl_combine_via_dash, actionName, name)); } else { - message = getResources().getString(action.getNameRes()); + title.setText(action.getNameRes()); } - title.setText(message); icon.setImageResource(action.getIconRes()); items.add(new BaseBottomSheetItem.Builder() .setCustomView(itemView) From 6bf313c32ea26bcda425e61fdface3719b9994c3 Mon Sep 17 00:00:00 2001 From: cepprice Date: Thu, 4 Mar 2021 13:35:38 +0500 Subject: [PATCH 20/59] 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 21/59] 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 0d39173b8bc10f2d94f604e2495621259e2604fd Mon Sep 17 00:00:00 2001 From: nazar-kutz Date: Fri, 5 Mar 2021 12:38:38 +0200 Subject: [PATCH 22/59] add ObjectType.GPX_TRACK --- .../src/main/java/net/osmand/search/core/ObjectType.java | 2 +- .../osmand/plus/activities/search/SearchHistoryFragment.java | 2 -- .../net/osmand/plus/search/QuickSearchDialogFragment.java | 3 +-- OsmAnd/src/net/osmand/plus/search/QuickSearchHelper.java | 2 +- .../src/net/osmand/plus/search/QuickSearchListAdapter.java | 3 ++- .../src/net/osmand/plus/search/QuickSearchListFragment.java | 5 +++-- .../osmand/plus/search/listitems/QuickSearchListItem.java | 2 ++ 7 files changed, 10 insertions(+), 9 deletions(-) diff --git a/OsmAnd-java/src/main/java/net/osmand/search/core/ObjectType.java b/OsmAnd-java/src/main/java/net/osmand/search/core/ObjectType.java index c14d5cff07..df81a9ce18 100644 --- a/OsmAnd-java/src/main/java/net/osmand/search/core/ObjectType.java +++ b/OsmAnd-java/src/main/java/net/osmand/search/core/ObjectType.java @@ -8,7 +8,7 @@ public enum ObjectType { // LOCATION LOCATION(true), PARTIAL_LOCATION(false), // UI OBJECTS - FAVORITE(true), FAVORITE_GROUP(false), WPT(true), RECENT_OBJ(true), + FAVORITE(true), FAVORITE_GROUP(false), WPT(true), RECENT_OBJ(true), GPX_TRACK(false), // ONLINE SEARCH ONLINE_SEARCH(true), diff --git a/OsmAnd/src/net/osmand/plus/activities/search/SearchHistoryFragment.java b/OsmAnd/src/net/osmand/plus/activities/search/SearchHistoryFragment.java index 234f9ec1af..9cb508141e 100644 --- a/OsmAnd/src/net/osmand/plus/activities/search/SearchHistoryFragment.java +++ b/OsmAnd/src/net/osmand/plus/activities/search/SearchHistoryFragment.java @@ -305,8 +305,6 @@ public class SearchHistoryFragment extends OsmAndListFragment implements SearchA iconId = R.drawable.ic_type_video; } else if (pd.isPhotoNote()) { iconId = R.drawable.ic_type_img; - } else if (pd.isGpxFile()) { - iconId = R.drawable.ic_action_polygom_dark; } else { iconId = R.drawable.ic_action_street_name; } diff --git a/OsmAnd/src/net/osmand/plus/search/QuickSearchDialogFragment.java b/OsmAnd/src/net/osmand/plus/search/QuickSearchDialogFragment.java index 463db3a6f7..22b75072ec 100644 --- a/OsmAnd/src/net/osmand/plus/search/QuickSearchDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/search/QuickSearchDialogFragment.java @@ -513,8 +513,7 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC List historyEntries = new ArrayList(); List selectedItems = historySearchFragment.getListAdapter().getSelectedItems(); for (QuickSearchListItem searchListItem : selectedItems) { - SearchResult sr = searchListItem.getSearchResult(); - Object object = sr.object; + Object object = searchListItem.getSearchResult().object;; if (object instanceof HistoryEntry) { historyEntries.add((HistoryEntry) object); } diff --git a/OsmAnd/src/net/osmand/plus/search/QuickSearchHelper.java b/OsmAnd/src/net/osmand/plus/search/QuickSearchHelper.java index 7a47446fa6..2cf4226e12 100644 --- a/OsmAnd/src/net/osmand/plus/search/QuickSearchHelper.java +++ b/OsmAnd/src/net/osmand/plus/search/QuickSearchHelper.java @@ -464,7 +464,7 @@ public class QuickSearchHelper implements ResourceListener { if (gpxInfo != null) { sr.localeName = gpxInfo.getFileName(); sr.object = point; - sr.objectType = ObjectType.RECENT_OBJ; + sr.objectType = ObjectType.GPX_TRACK; sr.relatedObject = gpxInfo; publish = true; } diff --git a/OsmAnd/src/net/osmand/plus/search/QuickSearchListAdapter.java b/OsmAnd/src/net/osmand/plus/search/QuickSearchListAdapter.java index 64593b5492..c9a3d1d5e9 100644 --- a/OsmAnd/src/net/osmand/plus/search/QuickSearchListAdapter.java +++ b/OsmAnd/src/net/osmand/plus/search/QuickSearchListAdapter.java @@ -40,6 +40,7 @@ import net.osmand.plus.search.listitems.QuickSearchListItemType; import net.osmand.plus.search.listitems.QuickSearchMoreListItem; import net.osmand.plus.search.listitems.QuickSearchSelectAllListItem; import net.osmand.search.SearchUICore; +import net.osmand.search.core.ObjectType; import net.osmand.search.core.SearchPhrase; import net.osmand.search.core.SearchResult; import net.osmand.search.core.SearchWord; @@ -401,7 +402,7 @@ public class QuickSearchListAdapter extends ArrayAdapter { @Nullable View convertView, @NonNull QuickSearchListItem listItem) { SearchResult sr = listItem.getSearchResult(); - if (sr != null && sr.relatedObject instanceof GPXInfo) { + if (sr != null && sr.objectType == ObjectType.GPX_TRACK) { return bindGpxTrack(position, convertView, listItem, (GPXInfo) sr.relatedObject); } else { return bindSearchResult(position, convertView, listItem); diff --git a/OsmAnd/src/net/osmand/plus/search/QuickSearchListFragment.java b/OsmAnd/src/net/osmand/plus/search/QuickSearchListFragment.java index c9635e7dac..410f011154 100644 --- a/OsmAnd/src/net/osmand/plus/search/QuickSearchListFragment.java +++ b/OsmAnd/src/net/osmand/plus/search/QuickSearchListFragment.java @@ -100,7 +100,8 @@ public abstract class QuickSearchListFragment extends OsmAndListFragment { || sr.objectType == ObjectType.FAVORITE || sr.objectType == ObjectType.RECENT_OBJ || sr.objectType == ObjectType.WPT - || sr.objectType == ObjectType.STREET_INTERSECTION) { + || sr.objectType == ObjectType.STREET_INTERSECTION + || sr.objectType == ObjectType.GPX_TRACK) { showResult(sr); } else { @@ -170,7 +171,7 @@ public abstract class QuickSearchListFragment extends OsmAndListFragment { public void showResult(SearchResult searchResult) { showResult = false; - if (searchResult.relatedObject instanceof GPXInfo) { + if (searchResult.objectType == ObjectType.GPX_TRACK) { showTrackMenuFragment((GPXInfo) searchResult.relatedObject); } else if (searchResult.location != null) { OsmandApplication app = getMyApplication(); diff --git a/OsmAnd/src/net/osmand/plus/search/listitems/QuickSearchListItem.java b/OsmAnd/src/net/osmand/plus/search/listitems/QuickSearchListItem.java index 204c31de88..56b0b7a572 100644 --- a/OsmAnd/src/net/osmand/plus/search/listitems/QuickSearchListItem.java +++ b/OsmAnd/src/net/osmand/plus/search/listitems/QuickSearchListItem.java @@ -359,6 +359,8 @@ public class QuickSearchListItem { } else { return icon; } + case GPX_TRACK: + return getIcon(app, R.drawable.ic_action_polygom_dark); case LOCATION: return getIcon(app, R.drawable.ic_action_world_globe); case FAVORITE: From d47a19eff837c6d67831e1e5602bdeb75bb99abe Mon Sep 17 00:00:00 2001 From: nazar-kutz Date: Fri, 5 Mar 2021 14:54:01 +0200 Subject: [PATCH 23/59] 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 24/59] 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 25/59] 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 26/59] 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 27/59] 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 28/59] 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 1c5d01f391552044090ea05612b07dc26840d5e4 Mon Sep 17 00:00:00 2001 From: nazar-kutz Date: Fri, 5 Mar 2021 20:03:04 +0200 Subject: [PATCH 29/59] Split interval: UI fixes --- ...em_description_long_without_min_height.xml | 17 +++++ OsmAnd/res/layout/track_split_interval.xml | 55 ++-------------- OsmAnd/res/values/strings.xml | 1 + .../LongDescriptionStandardHeightItem.java | 12 ++++ .../plus/track/SplitIntervalBottomSheet.java | 63 +++++++++++-------- 5 files changed, 73 insertions(+), 75 deletions(-) create mode 100644 OsmAnd/res/layout/bottom_sheet_item_description_long_without_min_height.xml create mode 100644 OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/simpleitems/LongDescriptionStandardHeightItem.java diff --git a/OsmAnd/res/layout/bottom_sheet_item_description_long_without_min_height.xml b/OsmAnd/res/layout/bottom_sheet_item_description_long_without_min_height.xml new file mode 100644 index 0000000000..9fe963d78f --- /dev/null +++ b/OsmAnd/res/layout/bottom_sheet_item_description_long_without_min_height.xml @@ -0,0 +1,17 @@ + + diff --git a/OsmAnd/res/layout/track_split_interval.xml b/OsmAnd/res/layout/track_split_interval.xml index ae823012cd..7751d35e0f 100644 --- a/OsmAnd/res/layout/track_split_interval.xml +++ b/OsmAnd/res/layout/track_split_interval.xml @@ -5,57 +5,11 @@ android:layout_height="match_parent" android:orientation="vertical"> - + android:layout_height="@dimen/content_padding" /> - - - - - - - + @@ -143,6 +97,7 @@ android:layout_marginStart="@dimen/content_padding" android:layout_marginEnd="@dimen/content_padding" android:layout_marginBottom="@dimen/content_padding" + android:layout_marginTop="@dimen/content_padding_half" android:lineSpacingExtra="@dimen/line_spacing_extra_description" android:text="@string/gpx_split_interval_none_descr" android:textColor="?android:textColorSecondary" diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index c43425fa92..9208a0deb9 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -12,6 +12,7 @@ --> + Interval Show/hide Copy POI name The recording will be continued. diff --git a/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/simpleitems/LongDescriptionStandardHeightItem.java b/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/simpleitems/LongDescriptionStandardHeightItem.java new file mode 100644 index 0000000000..fa2b9808b9 --- /dev/null +++ b/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/simpleitems/LongDescriptionStandardHeightItem.java @@ -0,0 +1,12 @@ +package net.osmand.plus.base.bottomsheetmenu.simpleitems; + +import net.osmand.plus.R; +import net.osmand.plus.base.bottomsheetmenu.BottomSheetItemWithDescription; + +public class LongDescriptionStandardHeightItem extends BottomSheetItemWithDescription { + + public LongDescriptionStandardHeightItem(CharSequence description) { + this.description = description; + this.layoutId =R.layout.bottom_sheet_item_description_long_without_min_height; + } +} diff --git a/OsmAnd/src/net/osmand/plus/track/SplitIntervalBottomSheet.java b/OsmAnd/src/net/osmand/plus/track/SplitIntervalBottomSheet.java index 15d94db2cc..57d38e2040 100644 --- a/OsmAnd/src/net/osmand/plus/track/SplitIntervalBottomSheet.java +++ b/OsmAnd/src/net/osmand/plus/track/SplitIntervalBottomSheet.java @@ -3,7 +3,7 @@ package net.osmand.plus.track; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; -import android.widget.RadioGroup; +import android.widget.LinearLayout; import android.widget.TextView; import androidx.annotation.NonNull; @@ -22,9 +22,12 @@ import net.osmand.plus.R; import net.osmand.plus.UiUtilities; import net.osmand.plus.base.MenuBottomSheetDialogFragment; import net.osmand.plus.base.bottomsheetmenu.SimpleBottomSheetItem; -import net.osmand.plus.base.bottomsheetmenu.simpleitems.LongDescriptionItem; +import net.osmand.plus.base.bottomsheetmenu.simpleitems.LongDescriptionStandardHeightItem; import net.osmand.plus.base.bottomsheetmenu.simpleitems.TitleItem; import net.osmand.plus.helpers.AndroidUiHelper; +import net.osmand.plus.widgets.MultiStateToggleButton; +import net.osmand.plus.widgets.MultiStateToggleButton.OnRadioItemClickListener; +import net.osmand.plus.widgets.MultiStateToggleButton.RadioItem; import org.apache.commons.logging.Log; @@ -93,7 +96,7 @@ public class SplitIntervalBottomSheet extends MenuBottomSheetDialogFragment { @Override public void createMenuItems(Bundle savedInstanceState) { items.add(new TitleItem(getString(R.string.gpx_split_interval))); - items.add(new LongDescriptionItem(getString(R.string.gpx_split_interval_descr))); + items.add(new LongDescriptionStandardHeightItem(getString(R.string.gpx_split_interval_descr))); LayoutInflater themedInflater = UiUtilities.getInflater(requireContext(), nightMode); View view = themedInflater.inflate(R.layout.track_split_interval, null); @@ -106,29 +109,10 @@ public class SplitIntervalBottomSheet extends MenuBottomSheetDialogFragment { selectedSplitValue = view.findViewById(R.id.split_value_tv); splitIntervalNoneDescr = view.findViewById(R.id.split_interval_none_descr); - UiUtilities.setupSlider(slider, nightMode, null); + UiUtilities.setupSlider(slider, nightMode, null, true); - RadioGroup splitTypeGroup = view.findViewById(R.id.split_type); - if (selectedSplitType == GpxSplitType.NO_SPLIT) { - splitTypeGroup.check(R.id.no_split); - } else if (selectedSplitType == GpxSplitType.TIME) { - splitTypeGroup.check(R.id.time_split); - } else if (selectedSplitType == GpxSplitType.DISTANCE) { - splitTypeGroup.check(R.id.distance_split); - } - splitTypeGroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() { - @Override - public void onCheckedChanged(RadioGroup group, int checkedId) { - if (checkedId == R.id.no_split) { - selectedSplitType = GpxSplitType.NO_SPLIT; - } else if (checkedId == R.id.time_split) { - selectedSplitType = GpxSplitType.TIME; - } else if (checkedId == R.id.distance_split) { - selectedSplitType = GpxSplitType.DISTANCE; - } - updateSlider(); - } - }); + LinearLayout radioGroup = (LinearLayout) view.findViewById(R.id.custom_radio_buttons); + setupTypeRadioGroup(radioGroup); SimpleBottomSheetItem titleItem = (SimpleBottomSheetItem) new SimpleBottomSheetItem.Builder() .setCustomView(view) @@ -136,6 +120,35 @@ public class SplitIntervalBottomSheet extends MenuBottomSheetDialogFragment { items.add(titleItem); } + private void setupTypeRadioGroup(LinearLayout buttonsContainer) { + RadioItem none = createRadioButton(GpxSplitType.NO_SPLIT, R.string.shared_string_none); + RadioItem time = createRadioButton(GpxSplitType.TIME, R.string.shared_string_time); + RadioItem distance = createRadioButton(GpxSplitType.DISTANCE, R.string.distance); + + MultiStateToggleButton radioGroup = new MultiStateToggleButton(app, buttonsContainer, nightMode); + radioGroup.setItems(none, time, distance); + + if (selectedSplitType == GpxSplitType.NO_SPLIT) { + radioGroup.setSelectedItem(none); + } else { + radioGroup.setSelectedItem(selectedSplitType == GpxSplitType.TIME ? time : distance); + } + } + + private RadioItem createRadioButton(final GpxSplitType splitType, int titleId) { + String title = app.getString(titleId); + RadioItem item = new RadioItem(title); + item.setOnClickListener(new OnRadioItemClickListener() { + @Override + public boolean onRadioItemClick(RadioItem radioItem, View view) { + selectedSplitType = splitType; + updateSlider(); + return true; + } + }); + return item; + } + @Override public void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); From e1d1edee4348523efa8868b7d29d2d2e391673c5 Mon Sep 17 00:00:00 2001 From: nazar-kutz Date: Fri, 5 Mar 2021 20:05:05 +0200 Subject: [PATCH 30/59] remove zeros from time formatting --- .../src/main/java/net/osmand/util/Algorithms.java | 7 +++++++ OsmAnd/src/net/osmand/plus/OsmAndFormatter.java | 12 +++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) 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..05da55a753 100644 --- a/OsmAnd-java/src/main/java/net/osmand/util/Algorithms.java +++ b/OsmAnd-java/src/main/java/net/osmand/util/Algorithms.java @@ -117,6 +117,13 @@ public class Algorithms { } return def; } + + public static String formatDoubleWithoutAdditionalZeros(double d) { + if(d == (long) d) + return String.format(Locale.US, "%d",(long)d); + else + return String.format("%s",d); + } public static int parseIntSilently(String input, int def) { if (input != null && input.length() > 0) { diff --git a/OsmAnd/src/net/osmand/plus/OsmAndFormatter.java b/OsmAnd/src/net/osmand/plus/OsmAndFormatter.java index 6a52fe9804..d18309730e 100644 --- a/OsmAnd/src/net/osmand/plus/OsmAndFormatter.java +++ b/OsmAnd/src/net/osmand/plus/OsmAndFormatter.java @@ -121,13 +121,19 @@ public class OsmAndFormatter { } public static String getFormattedTimeInterval(OsmandApplication app, double interval) { + String units; + double intervalInUnits; if (interval < 60) { - return interval + " " + app.getString(R.string.int_seconds); + units = app.getString(R.string.shared_string_sec); + intervalInUnits = interval; } else if (interval % 60 == 0) { - return (interval / 60) + " " + app.getString(R.string.int_min); + units = app.getString(R.string.int_min); + intervalInUnits = (interval / 60); } else { - return (interval / 60f) + " " + app.getString(R.string.int_min); + units = app.getString(R.string.int_min); + intervalInUnits = (interval / 60f); } + return Algorithms.formatDoubleWithoutAdditionalZeros(intervalInUnits) + " " + units; } public static String getFormattedDistanceInterval(OsmandApplication app, double interval) { From df95dbec7f5bb7e0049a8a4aa8aa796fad9d2176 Mon Sep 17 00:00:00 2001 From: nazar-kutz Date: Fri, 5 Mar 2021 20:08:26 +0200 Subject: [PATCH 31/59] Show grey circle only around a color that does not contrast well with the background --- OsmAnd/src/net/osmand/plus/track/ColorsCard.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/track/ColorsCard.java b/OsmAnd/src/net/osmand/plus/track/ColorsCard.java index 5f83dfc6c8..e0c8a3343b 100644 --- a/OsmAnd/src/net/osmand/plus/track/ColorsCard.java +++ b/OsmAnd/src/net/osmand/plus/track/ColorsCard.java @@ -27,6 +27,7 @@ import java.util.ArrayList; import java.util.List; import androidx.annotation.ColorInt; +import androidx.annotation.ColorRes; import androidx.core.content.ContextCompat; import androidx.core.graphics.ColorUtils; import androidx.fragment.app.Fragment; @@ -34,7 +35,7 @@ import androidx.fragment.app.Fragment; public class ColorsCard extends BaseCard implements ColorPickerListener { public static final int MAX_CUSTOM_COLORS = 6; - public static final int MINIMUM_CONTRAST_RATIO = 3; + public static final double MINIMUM_CONTRAST_RATIO = 1.5; private static final Log log = PlatformUtil.getLog(TrackColoringCard.class); @@ -136,7 +137,8 @@ public class ColorsCard extends BaseCard implements ColorPickerListener { Drawable transparencyIcon = getTransparencyIcon(app, color); Drawable colorIcon = app.getUIUtilities().getPaintedIcon(R.drawable.bg_point_circle, color); Drawable layeredIcon = UiUtilities.getLayeredIcon(transparencyIcon, colorIcon); - double contrastRatio = ColorUtils.calculateContrast(color, ContextCompat.getColor(app, nightMode ? R.color.card_and_list_background_dark : R.color.card_and_list_background_light)); + int listBgColor = ContextCompat.getColor(app, getListBackgroundColorId()); + double contrastRatio = ColorUtils.calculateContrast(color, listBgColor); if (contrastRatio < MINIMUM_CONTRAST_RATIO) { backgroundCircle.setBackgroundResource(nightMode ? R.drawable.circle_contour_bg_dark : R.drawable.circle_contour_bg_light); } @@ -268,4 +270,11 @@ public class ColorsCard extends BaseCard implements ColorPickerListener { colorsListPreference.setStringsListForProfile(appMode, colorNames); } } + + @ColorRes + private int getListBackgroundColorId() { + return nightMode ? + R.color.card_and_list_background_dark : + R.color.card_and_list_background_light; + } } \ No newline at end of file From 6883bf722b769c194591b4158931daaec6c258ea Mon Sep 17 00:00:00 2001 From: nazar-kutz Date: Fri, 5 Mar 2021 20:10:40 +0200 Subject: [PATCH 32/59] Track Appearance: adjust track on map when header clicked --- .../net/osmand/plus/track/TrackAppearanceFragment.java | 4 +++- .../src/net/osmand/plus/views/OsmandMapTileView.java | 10 +++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/track/TrackAppearanceFragment.java b/OsmAnd/src/net/osmand/plus/track/TrackAppearanceFragment.java index 4642175b09..43b0c78eca 100644 --- a/OsmAnd/src/net/osmand/plus/track/TrackAppearanceFragment.java +++ b/OsmAnd/src/net/osmand/plus/track/TrackAppearanceFragment.java @@ -409,15 +409,17 @@ public class TrackAppearanceFragment extends ContextMenuScrollFragment implement RotatedTileBox tb = mapActivity.getMapView().getCurrentRotatedTileBox().copy(); int tileBoxWidthPx = 0; int tileBoxHeightPx = 0; + int marginLeftPx = 0; if (!isPortrait()) { tileBoxWidthPx = tb.getPixWidth() - getWidth(); + marginLeftPx = getWidth(); } else { int fHeight = getViewHeight() - y - AndroidUtils.getStatusBarHeight(mapActivity); tileBoxHeightPx = tb.getPixHeight() - fHeight; } if (r.left != 0 && r.right != 0) { - mapActivity.getMapView().fitRectToMap(r.left, r.right, r.top, r.bottom, tileBoxWidthPx, tileBoxHeightPx, 0); + mapActivity.getMapView().fitRectToMap(r.left, r.right, r.top, r.bottom, tileBoxWidthPx, tileBoxHeightPx, 0, marginLeftPx); } } } diff --git a/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java b/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java index 475e7879aa..ad1a8bb190 100644 --- a/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java +++ b/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java @@ -638,8 +638,7 @@ public class OsmandMapTileView implements IMapDownloaderCallback { } else if (mapPosition == OsmandSettings.LANDSCAPE_MIDDLE_RIGHT_CONSTANT) { ratiox = 0.7f; } else { - boolean isLayoutRtl = AndroidUtils.isLayoutRtl(application); - ratiox = mapPositionX == 0 ? 0.5f : (isLayoutRtl ? 0.25f : 0.75f); + ratiox = mapPositionX == 0 ? 0.5f : (isLayoutRtl() ? 0.25f : 0.75f); } final int cy = (int) (ratioy * view.getHeight()); final int cx = (int) (ratiox * view.getWidth()); @@ -959,7 +958,8 @@ public class OsmandMapTileView implements IMapDownloaderCallback { if (tileBoxWidthPx > 0) { tbw = (int) (tileBoxWidthPx * border); if (marginLeftPx > 0) { - dx = (tb.getPixWidth() - tileBoxWidthPx) / 2 - marginLeftPx; + int offset = (tb.getPixWidth() - tileBoxWidthPx) / 2 - marginLeftPx; + dx = isLayoutRtl() ? -offset : offset; } } else if (tileBoxHeightPx > 0) { tbh = (int) (tileBoxHeightPx * border); @@ -1425,4 +1425,8 @@ public class OsmandMapTileView implements IMapDownloaderCallback { public Context getContext() { return activity; } + + public boolean isLayoutRtl() { + return AndroidUtils.isLayoutRtl(application); + } } From a6b0b08ecea8937c738a2ab87c766f7f842336fc Mon Sep 17 00:00:00 2001 From: nazar-kutz Date: Fri, 5 Mar 2021 20:13:13 +0200 Subject: [PATCH 33/59] Fix track width card --- OsmAnd/res/layout/track_width_card.xml | 31 ++++++++++--------- OsmAnd/src/net/osmand/plus/UiUtilities.java | 5 +-- .../net/osmand/plus/track/TrackWidthCard.java | 12 +++++-- 3 files changed, 30 insertions(+), 18 deletions(-) diff --git a/OsmAnd/res/layout/track_width_card.xml b/OsmAnd/res/layout/track_width_card.xml index 3710ad43b4..e919df6e29 100644 --- a/OsmAnd/res/layout/track_width_card.xml +++ b/OsmAnd/res/layout/track_width_card.xml @@ -52,7 +52,6 @@ android:layout_height="wrap_content" android:orientation="horizontal" android:paddingStart="@dimen/content_padding" - android:paddingTop="@dimen/content_padding" android:paddingEnd="@dimen/content_padding"> + android:textColor="?android:textColorSecondary" + android:textSize="@dimen/default_list_text_size" + tools:text="1" /> + + - - + android:textSize="@dimen/default_list_text_size" + tools:text="1" /> + android:textSize="@dimen/default_list_text_size" + tools:text="24" /> diff --git a/OsmAnd/src/net/osmand/plus/UiUtilities.java b/OsmAnd/src/net/osmand/plus/UiUtilities.java index 269800c630..08f8e182f9 100644 --- a/OsmAnd/src/net/osmand/plus/UiUtilities.java +++ b/OsmAnd/src/net/osmand/plus/UiUtilities.java @@ -633,8 +633,9 @@ public class UiUtilities { } int activeDisableColor = getColorWithAlpha(activeColor, 0.25f); ColorStateList activeCsl = new ColorStateList(states, new int[] {activeColor, activeDisableColor}); - int inactiveColor = ContextCompat.getColor(ctx, nightMode ? R.color.icon_color_default_dark : R.color.icon_color_secondary_light); - ColorStateList inactiveCsl = new ColorStateList(states, new int[] {inactiveColor, inactiveColor}); + int inactiveColor = getColorWithAlpha(activeColor, 0.5f); + int inactiveDisableColor = ContextCompat.getColor(ctx, nightMode ? R.color.icon_color_default_dark : R.color.icon_color_secondary_light); + ColorStateList inactiveCsl = new ColorStateList(states, new int[] {inactiveColor, inactiveDisableColor}); slider.setTrackActiveTintList(activeCsl); slider.setTrackInactiveTintList(inactiveCsl); slider.setHaloTintList(activeCsl); diff --git a/OsmAnd/src/net/osmand/plus/track/TrackWidthCard.java b/OsmAnd/src/net/osmand/plus/track/TrackWidthCard.java index 2a8f34c024..a6bc058b6d 100644 --- a/OsmAnd/src/net/osmand/plus/track/TrackWidthCard.java +++ b/OsmAnd/src/net/osmand/plus/track/TrackWidthCard.java @@ -45,6 +45,7 @@ public class TrackWidthCard extends BaseCard { private GpxWidthAdapter widthAdapter; private View sliderContainer; + private RecyclerView groupRecyclerView; public TrackWidthCard(MapActivity mapActivity, TrackDrawInfo trackDrawInfo, OnNeedScrollListener onNeedScrollListener) { @@ -65,9 +66,10 @@ public class TrackWidthCard extends BaseCard { updateCustomWidthSlider(); widthAdapter = new GpxWidthAdapter(appearanceItems); - RecyclerView groupRecyclerView = view.findViewById(R.id.recycler_view); + groupRecyclerView = view.findViewById(R.id.recycler_view); groupRecyclerView.setAdapter(widthAdapter); groupRecyclerView.setLayoutManager(new LinearLayoutManager(app, RecyclerView.HORIZONTAL, false)); + scrollMenuToSelectedItem(); AndroidUiHelper.updateVisibility(view.findViewById(R.id.top_divider), isShowDivider()); } @@ -155,7 +157,7 @@ public class TrackWidthCard extends BaseCard { } } }); - UiUtilities.setupSlider(widthSlider, nightMode, null); + UiUtilities.setupSlider(widthSlider, nightMode, null, true); ScrollUtils.addOnGlobalLayoutListener(sliderContainer, new Runnable() { @Override public void run() { @@ -175,6 +177,11 @@ public class TrackWidthCard extends BaseCard { mapActivity.refreshMap(); } + private void scrollMenuToSelectedItem() { + int position = widthAdapter.getItemPosition(selectedItem); + groupRecyclerView.scrollToPosition(position); + } + private class GpxWidthAdapter extends RecyclerView.Adapter { private List items; @@ -219,6 +226,7 @@ public class TrackWidthCard extends BaseCard { updateHeader(); updateCustomWidthSlider(); + scrollMenuToSelectedItem(); CardListener listener = getListener(); if (listener != null) { From 6affa0c43296873d4faf3d012879565f76f75a70 Mon Sep 17 00:00:00 2001 From: nazar-kutz Date: Fri, 5 Mar 2021 22:52:15 +0200 Subject: [PATCH 34/59] 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 35/59] 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 36/59] 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 37/59] 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 38/59] 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 39/59] 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 40/59] 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 41/59] 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 42/59] 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 43/59] 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 44/59] 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 45/59] 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 46/59] 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 47/59] 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 48/59] 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 49/59] =?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 50/59] 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 51/59] 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 52/59] 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 53/59] 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 From 6d5529918c6dac93e1bd47ea1848aeb0d25b8e74 Mon Sep 17 00:00:00 2001 From: nazar-kutz Date: Tue, 9 Mar 2021 11:45:40 +0200 Subject: [PATCH 54/59] Fix after review --- .../src/main/java/net/osmand/util/Algorithms.java | 13 ++++++++----- OsmAnd/src/net/osmand/plus/OsmAndFormatter.java | 2 +- .../LongDescriptionStandardHeightItem.java | 12 ------------ .../osmand/plus/track/SplitIntervalBottomSheet.java | 7 +++++-- .../src/net/osmand/plus/track/TrackWidthCard.java | 4 +++- 5 files changed, 17 insertions(+), 21 deletions(-) delete mode 100644 OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/simpleitems/LongDescriptionStandardHeightItem.java 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 05da55a753..48adfce30f 100644 --- a/OsmAnd-java/src/main/java/net/osmand/util/Algorithms.java +++ b/OsmAnd-java/src/main/java/net/osmand/util/Algorithms.java @@ -118,11 +118,14 @@ public class Algorithms { return def; } - public static String formatDoubleWithoutAdditionalZeros(double d) { - if(d == (long) d) - return String.format(Locale.US, "%d",(long)d); - else - return String.format("%s",d); + public static String formatDoubleWithoutExtraZeros(double d) { + return isInt(d) ? + String.format(Locale.US, "%d", (long) d) : + String.format("%s", d); + } + + public static boolean isInt(double d) { + return (d == Math.floor(d)) && !Double.isInfinite(d); } public static int parseIntSilently(String input, int def) { diff --git a/OsmAnd/src/net/osmand/plus/OsmAndFormatter.java b/OsmAnd/src/net/osmand/plus/OsmAndFormatter.java index d18309730e..ba821f411c 100644 --- a/OsmAnd/src/net/osmand/plus/OsmAndFormatter.java +++ b/OsmAnd/src/net/osmand/plus/OsmAndFormatter.java @@ -133,7 +133,7 @@ public class OsmAndFormatter { units = app.getString(R.string.int_min); intervalInUnits = (interval / 60f); } - return Algorithms.formatDoubleWithoutAdditionalZeros(intervalInUnits) + " " + units; + return Algorithms.formatDoubleWithoutExtraZeros(intervalInUnits) + " " + units; } public static String getFormattedDistanceInterval(OsmandApplication app, double interval) { diff --git a/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/simpleitems/LongDescriptionStandardHeightItem.java b/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/simpleitems/LongDescriptionStandardHeightItem.java deleted file mode 100644 index fa2b9808b9..0000000000 --- a/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/simpleitems/LongDescriptionStandardHeightItem.java +++ /dev/null @@ -1,12 +0,0 @@ -package net.osmand.plus.base.bottomsheetmenu.simpleitems; - -import net.osmand.plus.R; -import net.osmand.plus.base.bottomsheetmenu.BottomSheetItemWithDescription; - -public class LongDescriptionStandardHeightItem extends BottomSheetItemWithDescription { - - public LongDescriptionStandardHeightItem(CharSequence description) { - this.description = description; - this.layoutId =R.layout.bottom_sheet_item_description_long_without_min_height; - } -} diff --git a/OsmAnd/src/net/osmand/plus/track/SplitIntervalBottomSheet.java b/OsmAnd/src/net/osmand/plus/track/SplitIntervalBottomSheet.java index 57d38e2040..644df0db81 100644 --- a/OsmAnd/src/net/osmand/plus/track/SplitIntervalBottomSheet.java +++ b/OsmAnd/src/net/osmand/plus/track/SplitIntervalBottomSheet.java @@ -22,7 +22,7 @@ import net.osmand.plus.R; import net.osmand.plus.UiUtilities; import net.osmand.plus.base.MenuBottomSheetDialogFragment; import net.osmand.plus.base.bottomsheetmenu.SimpleBottomSheetItem; -import net.osmand.plus.base.bottomsheetmenu.simpleitems.LongDescriptionStandardHeightItem; +import net.osmand.plus.base.bottomsheetmenu.simpleitems.LongDescriptionItem; import net.osmand.plus.base.bottomsheetmenu.simpleitems.TitleItem; import net.osmand.plus.helpers.AndroidUiHelper; import net.osmand.plus.widgets.MultiStateToggleButton; @@ -96,7 +96,10 @@ public class SplitIntervalBottomSheet extends MenuBottomSheetDialogFragment { @Override public void createMenuItems(Bundle savedInstanceState) { items.add(new TitleItem(getString(R.string.gpx_split_interval))); - items.add(new LongDescriptionStandardHeightItem(getString(R.string.gpx_split_interval_descr))); + items.add(new LongDescriptionItem.Builder() + .setDescription(getString(R.string.gpx_split_interval_descr)) + .setLayoutId(R.layout.bottom_sheet_item_description_long_without_min_height) + .create()); LayoutInflater themedInflater = UiUtilities.getInflater(requireContext(), nightMode); View view = themedInflater.inflate(R.layout.track_split_interval, null); diff --git a/OsmAnd/src/net/osmand/plus/track/TrackWidthCard.java b/OsmAnd/src/net/osmand/plus/track/TrackWidthCard.java index a6bc058b6d..9e98414d34 100644 --- a/OsmAnd/src/net/osmand/plus/track/TrackWidthCard.java +++ b/OsmAnd/src/net/osmand/plus/track/TrackWidthCard.java @@ -179,7 +179,9 @@ public class TrackWidthCard extends BaseCard { private void scrollMenuToSelectedItem() { int position = widthAdapter.getItemPosition(selectedItem); - groupRecyclerView.scrollToPosition(position); + if (position != -1) { + groupRecyclerView.scrollToPosition(position); + } } private class GpxWidthAdapter extends RecyclerView.Adapter { From 5ddfe09b27c2f0f9c7f456fd3d2ddef984b1e4d7 Mon Sep 17 00:00:00 2001 From: nazar-kutz Date: Tue, 9 Mar 2021 12:36:50 +0200 Subject: [PATCH 55/59] add "shared_string_interval" --- OsmAnd/res/values/strings.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index a93a58dec7..66d7b6ec59 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -12,6 +12,7 @@ --> + Interval Show/hide Copy POI name The recording will be continued. From 7773335722aaa9020d29ee6e4e81d671ec49d2ca Mon Sep 17 00:00:00 2001 From: nazar-kutz Date: Tue, 9 Mar 2021 14:39:07 +0200 Subject: [PATCH 56/59] Fix "landscape: My location, Zoom In/Out button is missing" --- .../net/osmand/plus/views/layers/MapControlsLayer.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/views/layers/MapControlsLayer.java b/OsmAnd/src/net/osmand/plus/views/layers/MapControlsLayer.java index 945796a726..840599720e 100644 --- a/OsmAnd/src/net/osmand/plus/views/layers/MapControlsLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/layers/MapControlsLayer.java @@ -876,9 +876,10 @@ public class MapControlsLayer extends OsmandMapLayer { routePlanningBtn.updateVisibility(showBottomMenuButtons); menuControl.updateVisibility(showBottomMenuButtons); - boolean showZoomButtons = !routeDialogOpened && !shouldHideTopControls && !isInTrackAppearanceMode() - && (!isInGpxApproximationMode() || !isPotrait()) - && !isInFollowTrackMode() && (!isInChoosingRoutesMode() || !isInWaypointsChoosingMode() || !portrait); + boolean showZoomButtons = !routeDialogOpened && !shouldHideTopControls + && !isInFollowTrackMode() + && (!isInGpxApproximationMode() || !isInTrackAppearanceMode() + || !isInChoosingRoutesMode() || !isInWaypointsChoosingMode() || !portrait); mapZoomIn.updateVisibility(showZoomButtons); mapZoomOut.updateVisibility(showZoomButtons); @@ -1022,7 +1023,7 @@ public class MapControlsLayer extends OsmandMapLayer { boolean tracked = mapActivity.getMapViewTrackingUtilities().isMapLinkedToLocation(); boolean visible = !(tracked && rh.isFollowingMode()) && (!isInGpxApproximationMode() || !isPotrait()); backToLocationControl.updateVisibility(visible && !dialogOpened && !isInPlanRouteMode() - && !isInTrackAppearanceMode() && (!isInChoosingRoutesMode() || !isInWaypointsChoosingMode() || !isInFollowTrackMode() || !isPotrait())); + && (!isInTrackAppearanceMode() || !isInChoosingRoutesMode() || !isInWaypointsChoosingMode() || !isInFollowTrackMode() || !isPotrait())); } public boolean onSingleTap(PointF point, RotatedTileBox tileBox) { From 5b08660b5e9830e6d3914ecb4367ee975e90fb6f Mon Sep 17 00:00:00 2001 From: nazar-kutz Date: Tue, 9 Mar 2021 15:10:10 +0200 Subject: [PATCH 57/59] Fix after review part 2 --- .../main/java/net/osmand/util/Algorithms.java | 14 ++++---------- ...item_description_long_without_min_height.xml | 17 ----------------- OsmAnd/res/layout/track_split_interval.xml | 14 ++++++++++++++ OsmAnd/src/net/osmand/plus/OsmAndFormatter.java | 13 ++++++++----- .../src/net/osmand/plus/track/ColorsCard.java | 12 ++++-------- .../plus/track/SplitIntervalBottomSheet.java | 4 ---- 6 files changed, 30 insertions(+), 44 deletions(-) delete mode 100644 OsmAnd/res/layout/bottom_sheet_item_description_long_without_min_height.xml 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 3fd3bf6763..7aa4389f67 100644 --- a/OsmAnd-java/src/main/java/net/osmand/util/Algorithms.java +++ b/OsmAnd-java/src/main/java/net/osmand/util/Algorithms.java @@ -119,16 +119,6 @@ public class Algorithms { return def; } - public static String formatDoubleWithoutExtraZeros(double d) { - return isInt(d) ? - String.format(Locale.US, "%d", (long) d) : - String.format("%s", d); - } - - public static boolean isInt(double d) { - return (d == Math.floor(d)) && !Double.isInfinite(d); - } - public static int parseIntSilently(String input, int def) { if (input != null && input.length() > 0) { try { @@ -798,6 +788,10 @@ public class Algorithms { return false; } + public static boolean isInt(double d) { + return (d == Math.floor(d)) && !Double.isInfinite(d); + } + public static boolean isInt(String value) { int length = value.length(); for (int i = 0; i < length; i++) { diff --git a/OsmAnd/res/layout/bottom_sheet_item_description_long_without_min_height.xml b/OsmAnd/res/layout/bottom_sheet_item_description_long_without_min_height.xml deleted file mode 100644 index 9fe963d78f..0000000000 --- a/OsmAnd/res/layout/bottom_sheet_item_description_long_without_min_height.xml +++ /dev/null @@ -1,17 +0,0 @@ - - diff --git a/OsmAnd/res/layout/track_split_interval.xml b/OsmAnd/res/layout/track_split_interval.xml index 7751d35e0f..2fdcfc467c 100644 --- a/OsmAnd/res/layout/track_split_interval.xml +++ b/OsmAnd/res/layout/track_split_interval.xml @@ -5,6 +5,20 @@ android:layout_height="match_parent" android:orientation="vertical"> + + diff --git a/OsmAnd/src/net/osmand/plus/OsmAndFormatter.java b/OsmAnd/src/net/osmand/plus/OsmAndFormatter.java index ba821f411c..883cc908c5 100644 --- a/OsmAnd/src/net/osmand/plus/OsmAndFormatter.java +++ b/OsmAnd/src/net/osmand/plus/OsmAndFormatter.java @@ -121,19 +121,22 @@ public class OsmAndFormatter { } public static String getFormattedTimeInterval(OsmandApplication app, double interval) { - String units; + String unitsStr; double intervalInUnits; if (interval < 60) { - units = app.getString(R.string.shared_string_sec); + unitsStr = app.getString(R.string.shared_string_sec); intervalInUnits = interval; } else if (interval % 60 == 0) { - units = app.getString(R.string.int_min); + unitsStr = app.getString(R.string.int_min); intervalInUnits = (interval / 60); } else { - units = app.getString(R.string.int_min); + unitsStr = app.getString(R.string.int_min); intervalInUnits = (interval / 60f); } - return Algorithms.formatDoubleWithoutExtraZeros(intervalInUnits) + " " + units; + String formattedInterval = Algorithms.isInt(intervalInUnits) ? + String.format(Locale.US, "%d", (long) intervalInUnits) : + String.format("%s", intervalInUnits); + return formattedInterval + " " + unitsStr; } public static String getFormattedDistanceInterval(OsmandApplication app, double interval) { diff --git a/OsmAnd/src/net/osmand/plus/track/ColorsCard.java b/OsmAnd/src/net/osmand/plus/track/ColorsCard.java index 0ee0885f61..e6da7e736f 100644 --- a/OsmAnd/src/net/osmand/plus/track/ColorsCard.java +++ b/OsmAnd/src/net/osmand/plus/track/ColorsCard.java @@ -145,7 +145,10 @@ public class ColorsCard extends BaseCard implements ColorPickerListener { Drawable transparencyIcon = getTransparencyIcon(app, color); Drawable colorIcon = app.getUIUtilities().getPaintedIcon(R.drawable.bg_point_circle, color); Drawable layeredIcon = UiUtilities.getLayeredIcon(transparencyIcon, colorIcon); - int listBgColor = ContextCompat.getColor(app, getListBackgroundColorId()); + int listBgColorId = nightMode ? + R.color.card_and_list_background_dark : + R.color.card_and_list_background_light; + int listBgColor = getResolvedColor(listBgColorId); double contrastRatio = ColorUtils.calculateContrast(color, listBgColor); if (contrastRatio < MINIMUM_CONTRAST_RATIO) { backgroundCircle.setBackgroundResource(nightMode ? R.drawable.circle_contour_bg_dark : R.drawable.circle_contour_bg_light); @@ -267,11 +270,4 @@ public class ColorsCard extends BaseCard implements ColorPickerListener { colorsListPreference.setStringsListForProfile(appMode, colorNames); } } - - @ColorRes - private int getListBackgroundColorId() { - return nightMode ? - R.color.card_and_list_background_dark : - R.color.card_and_list_background_light; - } } \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/track/SplitIntervalBottomSheet.java b/OsmAnd/src/net/osmand/plus/track/SplitIntervalBottomSheet.java index 644df0db81..7d36e90b27 100644 --- a/OsmAnd/src/net/osmand/plus/track/SplitIntervalBottomSheet.java +++ b/OsmAnd/src/net/osmand/plus/track/SplitIntervalBottomSheet.java @@ -96,10 +96,6 @@ public class SplitIntervalBottomSheet extends MenuBottomSheetDialogFragment { @Override public void createMenuItems(Bundle savedInstanceState) { items.add(new TitleItem(getString(R.string.gpx_split_interval))); - items.add(new LongDescriptionItem.Builder() - .setDescription(getString(R.string.gpx_split_interval_descr)) - .setLayoutId(R.layout.bottom_sheet_item_description_long_without_min_height) - .create()); LayoutInflater themedInflater = UiUtilities.getInflater(requireContext(), nightMode); View view = themedInflater.inflate(R.layout.track_split_interval, null); From ca72d8f5d6b3781ceb4f52765e16681802240eee Mon Sep 17 00:00:00 2001 From: nazar-kutz Date: Tue, 9 Mar 2021 15:38:11 +0200 Subject: [PATCH 58/59] Fix "Double zoom in / out visibility" --- .../plus/views/layers/MapControlsLayer.java | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/views/layers/MapControlsLayer.java b/OsmAnd/src/net/osmand/plus/views/layers/MapControlsLayer.java index 840599720e..ed425c0993 100644 --- a/OsmAnd/src/net/osmand/plus/views/layers/MapControlsLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/layers/MapControlsLayer.java @@ -876,10 +876,13 @@ public class MapControlsLayer extends OsmandMapLayer { routePlanningBtn.updateVisibility(showBottomMenuButtons); menuControl.updateVisibility(showBottomMenuButtons); + boolean additionalDialogsHide = !isInGpxApproximationMode() + && !isInTrackAppearanceMode() + && !isInChoosingRoutesMode() + && !isInWaypointsChoosingMode(); boolean showZoomButtons = !routeDialogOpened && !shouldHideTopControls && !isInFollowTrackMode() - && (!isInGpxApproximationMode() || !isInTrackAppearanceMode() - || !isInChoosingRoutesMode() || !isInWaypointsChoosingMode() || !portrait); + && (additionalDialogsHide || !portrait); mapZoomIn.updateVisibility(showZoomButtons); mapZoomOut.updateVisibility(showZoomButtons); @@ -1021,9 +1024,14 @@ public class MapControlsLayer extends OsmandMapLayer { public void updateMyLocationVisibility(MapHudButton backToLocationControl, RoutingHelper rh, boolean dialogOpened) { boolean tracked = mapActivity.getMapViewTrackingUtilities().isMapLinkedToLocation(); - boolean visible = !(tracked && rh.isFollowingMode()) && (!isInGpxApproximationMode() || !isPotrait()); + boolean visible = !(tracked && rh.isFollowingMode()); + boolean additionalDialogsHide = !isInTrackAppearanceMode() + && !isInGpxApproximationMode() + && !isInChoosingRoutesMode() + && !isInWaypointsChoosingMode() + && !isInFollowTrackMode(); backToLocationControl.updateVisibility(visible && !dialogOpened && !isInPlanRouteMode() - && (!isInTrackAppearanceMode() || !isInChoosingRoutesMode() || !isInWaypointsChoosingMode() || !isInFollowTrackMode() || !isPotrait())); + && (additionalDialogsHide || !isPotrait())); } public boolean onSingleTap(PointF point, RotatedTileBox tileBox) { From 6c6230f55cc74b52d4ed6cdec48deae337b50f36 Mon Sep 17 00:00:00 2001 From: nazar-kutz Date: Tue, 9 Mar 2021 18:13:37 +0200 Subject: [PATCH 59/59] Fix "Crash when add waypoint to current recording gpx track" --- OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java b/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java index f34fc008f5..66dbb1c75e 100644 --- a/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java +++ b/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java @@ -737,7 +737,9 @@ public class GpxSelectionHelper { String rootGpxDir = app.getAppPath(IndexConstants.GPX_INDEX_DIR).getAbsolutePath() + '/'; String fileName = path.replace(rootGpxDir, ""); GPXInfo gpxInfo = GpxUiHelper.getGpxInfoByFileName(app, fileName); - SearchHistoryHelper.getInstance(app).addNewItemToHistory(gpxInfo); + if (gpxInfo != null) { + SearchHistoryHelper.getInstance(app).addNewItemToHistory(gpxInfo); + } } return sf; }