From eff1c23734d7a69f6ba3c47111469c28abec6706 Mon Sep 17 00:00:00 2001 From: veliymolfar Date: Wed, 25 Mar 2020 18:13:17 +0200 Subject: [PATCH 001/202] initial commit --- .../res/layout/fragment_ui_customization.xml | 26 ++ .../list_item_description_with_image.xml | 24 + OsmAnd/res/layout/list_item_move_header.xml | 88 ++++ .../res/layout/list_item_ui_customization.xml | 50 ++ OsmAnd/res/values/sizes.xml | 1 + OsmAnd/res/values/strings.xml | 7 + OsmAnd/res/xml/configure_profile.xml | 9 + .../osmand/plus/activities/MapActivity.java | 10 + .../settings/ConfigureProfileFragment.java | 13 + .../settings/UiCustomizationFragment.java | 438 ++++++++++++++++++ .../settings/UiCustomizationRootFragment.java | 244 ++++++++++ .../net/osmand/view/BaseMoveItemAdapter.java | 48 ++ 12 files changed, 958 insertions(+) create mode 100644 OsmAnd/res/layout/fragment_ui_customization.xml create mode 100644 OsmAnd/res/layout/list_item_description_with_image.xml create mode 100644 OsmAnd/res/layout/list_item_move_header.xml create mode 100644 OsmAnd/res/layout/list_item_ui_customization.xml create mode 100644 OsmAnd/src/net/osmand/plus/settings/UiCustomizationFragment.java create mode 100644 OsmAnd/src/net/osmand/plus/settings/UiCustomizationRootFragment.java create mode 100644 OsmAnd/src/net/osmand/view/BaseMoveItemAdapter.java diff --git a/OsmAnd/res/layout/fragment_ui_customization.xml b/OsmAnd/res/layout/fragment_ui_customization.xml new file mode 100644 index 0000000000..5a96b3b194 --- /dev/null +++ b/OsmAnd/res/layout/fragment_ui_customization.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/OsmAnd/res/layout/list_item_description_with_image.xml b/OsmAnd/res/layout/list_item_description_with_image.xml new file mode 100644 index 0000000000..2c362c3e19 --- /dev/null +++ b/OsmAnd/res/layout/list_item_description_with_image.xml @@ -0,0 +1,24 @@ + + + + + + + + \ No newline at end of file diff --git a/OsmAnd/res/layout/list_item_move_header.xml b/OsmAnd/res/layout/list_item_move_header.xml new file mode 100644 index 0000000000..e319a6d231 --- /dev/null +++ b/OsmAnd/res/layout/list_item_move_header.xml @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/OsmAnd/res/layout/list_item_ui_customization.xml b/OsmAnd/res/layout/list_item_ui_customization.xml new file mode 100644 index 0000000000..4526820df9 --- /dev/null +++ b/OsmAnd/res/layout/list_item_ui_customization.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/OsmAnd/res/values/sizes.xml b/OsmAnd/res/values/sizes.xml index ad201fa4c5..5163d88887 100644 --- a/OsmAnd/res/values/sizes.xml +++ b/OsmAnd/res/values/sizes.xml @@ -356,4 +356,5 @@ 72dp 42dp + 65dp \ No newline at end of file diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index 4131dc937b..506c99b9ca 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -11,6 +11,13 @@ Thx - Hardy --> + Elements below this point separated by a divider. + Divider + Reorder or hide items from the %1$s. + Context menu actions + Drawer + UI Customization + Customize the quantity of items in Drawer, Configure map and context menu.\n\nYou can disable unused plugins, to hide all its controls from the application. Are you sure you want to clear recorded data? All profile settings will be restored to their original state after creating/importing this profile. Restore all profile settings? diff --git a/OsmAnd/res/xml/configure_profile.xml b/OsmAnd/res/xml/configure_profile.xml index 938f77077a..a7477a6cdf 100644 --- a/OsmAnd/res/xml/configure_profile.xml +++ b/OsmAnd/res/xml/configure_profile.xml @@ -52,6 +52,15 @@ android:title="@string/profile_appearance" tools:icon="@drawable/ic_action_offroad" /> + + + diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java index b7f163f14c..1e66149128 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java @@ -139,6 +139,7 @@ import net.osmand.plus.settings.DataStorageFragment; import net.osmand.plus.settings.ImportCompleteFragment; import net.osmand.plus.settings.ImportSettingsFragment; import net.osmand.plus.settings.ProfileAppearanceFragment; +import net.osmand.plus.settings.UiCustomizationFragment; import net.osmand.plus.views.AddGpxPointBottomSheetHelper.NewGpxPoint; import net.osmand.plus.views.AnimateDraggingMapThread; import net.osmand.plus.views.MapControlsLayer; @@ -740,6 +741,11 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven importCompleteFragment.dismissFragment(); return; } + UiCustomizationFragment uiCustomizationFragment = getUiCustomizationFragment(); + if (uiCustomizationFragment != null) { + uiCustomizationFragment.showExitDialog(); + return; + } super.onBackPressed(); } @@ -2459,6 +2465,10 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven return getFragment(ImportCompleteFragment.TAG); } + public UiCustomizationFragment getUiCustomizationFragment() { + return getFragment(UiCustomizationFragment.TAG); + } + public void backToConfigureProfileFragment() { FragmentManager fragmentManager = getSupportFragmentManager(); int backStackEntryCount = fragmentManager.getBackStackEntryCount(); diff --git a/OsmAnd/src/net/osmand/plus/settings/ConfigureProfileFragment.java b/OsmAnd/src/net/osmand/plus/settings/ConfigureProfileFragment.java index 7238fde88f..9d8c2911ac 100644 --- a/OsmAnd/src/net/osmand/plus/settings/ConfigureProfileFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/ConfigureProfileFragment.java @@ -71,6 +71,7 @@ public class ConfigureProfileFragment extends BaseSettingsFragment implements Co private static final String EXPORT_PROFILE = "export_profile"; private static final String DELETE_PROFILE = "delete_profile"; private static final String PROFILE_APPEARANCE = "profile_appearance"; + private static final String UI_CUSTOMIZATION = "ui_customization"; @ColorRes protected int getBackgroundColorRes() { @@ -273,6 +274,7 @@ public class ConfigureProfileFragment extends BaseSettingsFragment implements Co setupConfigureMapPref(); setupConfigureScreenPref(); setupProfileAppearancePref(); + setupUiCustomizationPref(); PreferenceCategory pluginSettings = (PreferenceCategory) findPreference(PLUGIN_SETTINGS); setupOsmandPluginsPref(pluginSettings); @@ -382,6 +384,17 @@ public class ConfigureProfileFragment extends BaseSettingsFragment implements Co } } + private void setupUiCustomizationPref() { + Context ctx = getContext(); + if (ctx == null) { + return; + } + Preference uiCustomization = findPreference(UI_CUSTOMIZATION); +// TODO change icon + uiCustomization.setIcon(getContentIcon(getSelectedAppMode().getIconRes())); + uiCustomization.setFragment(UiCustomizationRootFragment.TAG); + } + @Override public boolean onPreferenceClick(Preference preference) { String prefId = preference.getKey(); diff --git a/OsmAnd/src/net/osmand/plus/settings/UiCustomizationFragment.java b/OsmAnd/src/net/osmand/plus/settings/UiCustomizationFragment.java new file mode 100644 index 0000000000..3251ece226 --- /dev/null +++ b/OsmAnd/src/net/osmand/plus/settings/UiCustomizationFragment.java @@ -0,0 +1,438 @@ +package net.osmand.plus.settings; + +import android.content.Context; +import android.content.DialogInterface; +import android.os.Build; +import android.os.Bundle; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.ImageButton; +import android.widget.ImageView; +import android.widget.TextView; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.widget.Toolbar; +import androidx.fragment.app.FragmentManager; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; + +import net.osmand.AndroidUtils; +import net.osmand.plus.OsmandApplication; +import net.osmand.plus.R; +import net.osmand.plus.UiUtilities; +import net.osmand.plus.base.BaseOsmAndFragment; +import net.osmand.plus.poi.RearrangePoiFiltersFragment; +import net.osmand.plus.settings.UiCustomizationRootFragment.ScreenType; +import net.osmand.plus.views.controls.ReorderItemTouchHelperCallback; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; + +import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_DASHBOARD_ID; +import static net.osmand.aidlapi.OsmAndCustomizationConstants.FAVORITES_ID; +import static net.osmand.aidlapi.OsmAndCustomizationConstants.POI_OVERLAY_ID; +import static net.osmand.aidlapi.OsmAndCustomizationConstants.SHOW_CATEGORY_ID; + +public class UiCustomizationFragment extends BaseOsmAndFragment { + + public static final String TAG = UiCustomizationFragment.class.getName(); + private static final String ITEM_TYPE_KEY = "item_type_key"; + private static String ITEMS_ORDER_KEY = "items_order_key"; + + private HashMap itemsOrder = new HashMap<>(); + + private List items = new ArrayList<>(); + + private OsmandApplication app; + private boolean nightMode; + private ScreenType type; + private LayoutInflater mInflater; + + + @Override + public void onSaveInstanceState(@NonNull Bundle outState) { + super.onSaveInstanceState(outState); + outState.putSerializable(ITEM_TYPE_KEY, type); + } + + public static UiCustomizationFragment showInstance(@NonNull FragmentManager fm, @NonNull ScreenType type) { + UiCustomizationFragment fragment = new UiCustomizationFragment(); + fragment.setType(type); + fm.beginTransaction() + .replace(R.id.fragmentContainer, fragment, TAG) + .addToBackStack(null) + .commitAllowingStateLoss(); + return fragment; + } + + @Override + public void onCreate(@Nullable Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + if (savedInstanceState != null) { + type = (ScreenType) savedInstanceState.getSerializable(ITEM_TYPE_KEY); + } + app = requireMyApplication(); + nightMode = !app.getSettings().isLightContent(); + mInflater = UiUtilities.getInflater(app, nightMode); + } + + @Nullable + @Override + public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { + View root = mInflater.inflate(R.layout.edit_arrangement_list_fragment, container, false); + Toolbar toolbar = root.findViewById(R.id.toolbar); + TextView toolbarTitle = root.findViewById(R.id.toolbar_title); + ImageButton toolbarButton = root.findViewById(R.id.close_button); + RecyclerView recyclerView = root.findViewById(R.id.profiles_list); + toolbar.setBackgroundColor(nightMode + ? getResources().getColor(R.color.list_background_color_dark) + : getResources().getColor(R.color.list_background_color_light)); + toolbarTitle.setTextColor(nightMode + ? getResources().getColor(R.color.text_color_primary_dark) + : getResources().getColor(R.color.list_background_color_dark)); + toolbarButton.setImageDrawable(getPaintedContentIcon(R.drawable.ic_arrow_back, getResources().getColor(R.color.text_color_secondary_light))); + toolbarTitle.setText(type.titleRes); + toolbar.setNavigationOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + showExitDialog(); + } + }); + + recyclerView.setLayoutManager(new LinearLayoutManager(app)); + + UiItemAdapter adapter = new UiItemAdapter(getItems(), new UiItemsAdapterListener() { + @Override + public void onDragStarted(RecyclerView.ViewHolder holder) { + + } + + @Override + public void onDragOrSwipeEnded(RecyclerView.ViewHolder holder) { + + } + + @Override + public void onButtonClicked(int view) { + + } + }); + + recyclerView.setAdapter(adapter); + + +// final ItemTouchHelper touchHelper = new ItemTouchHelper(new ReorderItemTouchHelperCallback(adapter)); +// touchHelper.attachToRecyclerView(recyclerView); + + if (Build.VERSION.SDK_INT >= 21) { + AndroidUtils.addStatusBarPadding21v(app, root); + } + return root; + } + + private List getItems() { + + + List items = new ArrayList<>(); + items.add(new ListItem(AdapterItemType.DESCRIPTION, type)); + items.add(new ListItem(AdapterItemType.DIVIDER, 1)); + return items; + } + + private class ListItem { + AdapterItemType type; + Object value; + + public ListItem(AdapterItemType type, Object value) { + this.type = type; + this.value = value; + } + } + + + @Override + public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { + super.onViewCreated(view, savedInstanceState); + } + + public void showExitDialog() { + Context themedContext = UiUtilities.getThemedContext(getActivity(), nightMode); + AlertDialog.Builder dismissDialog = new AlertDialog.Builder(themedContext); + dismissDialog.setTitle(getString(R.string.shared_string_dismiss)); + dismissDialog.setMessage(getString(R.string.exit_without_saving)); + dismissDialog.setNegativeButton(R.string.shared_string_cancel, null); + dismissDialog.setPositiveButton(R.string.shared_string_exit, new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface dialog, int which) { + dismissFragment(); + } + }); + dismissDialog.show(); + } + + private void dismissFragment() { + FragmentManager fm = getFragmentManager(); + if (fm != null && !fm.isStateSaved()) { + getFragmentManager().popBackStack(); + } + } + + public void setType(ScreenType type) { + this.type = type; + } + + public interface UiItemsAdapterListener { + + void onDragStarted(RecyclerView.ViewHolder holder); + + void onDragOrSwipeEnded(RecyclerView.ViewHolder holder); + + void onButtonClicked(int view); + } + + private enum AdapterItemType { + DESCRIPTION, + UI_ITEM, + MOVE_DIVIDER, + DIVIDER, + HEADER, + BUTTON + } + + private class UiItemAdapter extends RecyclerView.Adapter + implements ReorderItemTouchHelperCallback.OnItemMoveCallback { + + private List items; + private UiItemsAdapterListener listener; + + public UiItemAdapter(List items, UiItemsAdapterListener listener) { + this.items = items; + this.listener = listener; + } + + @Override + public int getItemViewType(int position) { + ListItem listItem = items.get(position); + return listItem.type.ordinal(); + } + + @NonNull + @Override + public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { + AdapterItemType itemType = AdapterItemType.values()[viewType]; + View view; + switch (itemType) { + case DESCRIPTION: + view = mInflater.inflate(R.layout.list_item_description_with_image, parent, false); + return new DescriptionHolder(view); + case UI_ITEM: + view = mInflater.inflate(R.layout.change_order_item, parent, false); + return new ItemHolder(view); + case MOVE_DIVIDER: + view = mInflater.inflate(R.layout.list_item_move_header, parent, false); + return new MoveDividerHolder(view); + case DIVIDER: + view = mInflater.inflate(R.layout.divider, parent, false); + return new DividerHolder(view); + case HEADER: + view = mInflater.inflate(R.layout.preference_category_with_descr, parent, false); + return new HeaderHolder(view); + case BUTTON: + view = mInflater.inflate(R.layout.preference_button, parent, false); + return new ButtonHolder(view); + default: + throw new IllegalArgumentException("Unsupported view type"); + } + } + + @Override + public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) { + ListItem item = items.get(position); + if (holder instanceof DescriptionHolder) { + DescriptionHolder h = (DescriptionHolder) holder; + ScreenType screenType = (ScreenType) item.value; + h.description.setText(String.format(getString(R.string.reorder_or_hide_from), getString(screenType.titleRes))); + h.image.setImageResource(nightMode ? screenType.imageNightRes : screenType.imageDayRes); + } else if (holder instanceof ItemHolder) { + ItemHolder h = (ItemHolder) holder; + } else if (holder instanceof HeaderHolder) { + HeaderHolder h = (HeaderHolder) holder; + } else if (holder instanceof MoveDividerHolder) { + MoveDividerHolder h = (MoveDividerHolder) holder; + } else if (holder instanceof ButtonHolder) { + ButtonHolder h = (ButtonHolder) holder; + } + } + + @Override + public int getItemCount() { + return items.size(); + } + + @Override + public boolean onItemMove(int from, int to) { + return false; + } + + @Override + public void onItemDismiss(RecyclerView.ViewHolder holder) { + listener.onDragOrSwipeEnded(holder); + } + + private class DescriptionHolder extends RecyclerView.ViewHolder implements ReorderItemTouchHelperCallback.UnmovableItem { + private ImageView image; + private TextView description; + + public DescriptionHolder(@NonNull View itemView) { + super(itemView); + image = itemView.findViewById(R.id.image); + description = itemView.findViewById(R.id.description); + } + + @Override + public boolean isMovingDisabled() { + return true; + } + } + + private class ItemHolder extends RecyclerView.ViewHolder implements ReorderItemTouchHelperCallback.UnmovableItem { + + private TextView title; + private TextView description; + private ImageView icon; + private ImageView actionIcon; + private ImageView moveIcon; + private View itemsContainer; + + public ItemHolder(@NonNull View itemView) { + super(itemView); + title = itemView.findViewById(R.id.title); + actionIcon = itemView.findViewById(R.id.action_icon); + icon = itemView.findViewById(R.id.icon); + moveIcon = itemView.findViewById(R.id.move_icon); + itemsContainer = itemView.findViewById(R.id.selectable_list_item); + } + + @Override + public boolean isMovingDisabled() { +// int position = getAdapterPosition(); +// if (position != RecyclerView.NO_POSITION) { +// RearrangePoiFiltersFragment.ListItem item = items.get(position); +// if (item.value instanceof RearrangePoiFiltersFragment.PoiUIFilterDataObject) { +// RearrangePoiFiltersFragment.PoiUIFilterDataObject pdo = (RearrangePoiFiltersFragment.PoiUIFilterDataObject) item.value; +// return !pdo.isActive; +// } +// } + return true; + } + } + + private class MoveDividerHolder extends RecyclerView.ViewHolder implements ReorderItemTouchHelperCallback.UnmovableItem { + + public MoveDividerHolder(@NonNull View itemView) { + super(itemView); + } + + @Override + public boolean isMovingDisabled() { + return false; + } + } + + private class DividerHolder extends RecyclerView.ViewHolder implements ReorderItemTouchHelperCallback.UnmovableItem { + View divider; + + public DividerHolder(View itemView) { + super(itemView); + divider = itemView.findViewById(R.id.divider); + } + + @Override + public boolean isMovingDisabled() { + return true; + } + } + + private class HeaderHolder extends RecyclerView.ViewHolder implements ReorderItemTouchHelperCallback.UnmovableItem { + private TextView title; + private TextView description; + + public HeaderHolder(@NonNull View itemView) { + super(itemView); + title = itemView.findViewById(android.R.id.title); + description = itemView.findViewById(android.R.id.summary); + } + + @Override + public boolean isMovingDisabled() { + return true; + } + } + + private class ButtonHolder extends RecyclerView.ViewHolder implements ReorderItemTouchHelperCallback.UnmovableItem { + private View button; + private ImageView icon; + private TextView title; + + public ButtonHolder(@NonNull View itemView) { + super(itemView); + button = itemView; + icon = itemView.findViewById(android.R.id.icon); + title = itemView.findViewById(android.R.id.title); + } + + @Override + public boolean isMovingDisabled() { + return true; + } + } + } + + private List getDrawerItems() { + List list = new ArrayList<>(); + list.add(new UiItemBase(FAVORITES_ID, R.string.shared_string_favorites, R.string.shared_string_favorites, R.drawable.ic_action_fav_dark, 0)); + list.add(new UiItemBase(POI_OVERLAY_ID, R.string.layer_poi, R.string.layer_poi, R.drawable.ic_action_info_dark, 1)); + return list; + } + + + private class UiItemBase { + private String id; + private int titleRes; + private int descrRes; + private int iconRes; + private int order; + + public UiItemBase(String id, int titleRes, int descrRes, int iconRes, int order) { + this.id = id; + this.titleRes = titleRes; + this.descrRes = descrRes; + this.iconRes = iconRes; + this.order = order; + } + + public String getId() { + return id; + } + + public int getTitleRes() { + return titleRes; + } + + public int getDescrRes() { + return descrRes; + } + + public int getIconRes() { + return iconRes; + } + + public int getOrder() { + return order; + } + } +} diff --git a/OsmAnd/src/net/osmand/plus/settings/UiCustomizationRootFragment.java b/OsmAnd/src/net/osmand/plus/settings/UiCustomizationRootFragment.java new file mode 100644 index 0000000000..f179bfdf47 --- /dev/null +++ b/OsmAnd/src/net/osmand/plus/settings/UiCustomizationRootFragment.java @@ -0,0 +1,244 @@ +package net.osmand.plus.settings; + +import android.content.Intent; +import android.os.Build; +import android.os.Bundle; +import android.text.SpannableString; +import android.text.Spanned; +import android.text.method.LinkMovementMethod; +import android.text.style.ClickableSpan; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.ImageButton; +import android.widget.ImageView; +import android.widget.TextView; + +import androidx.annotation.DrawableRes; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.StringRes; +import androidx.appcompat.widget.Toolbar; +import androidx.fragment.app.FragmentManager; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; + +import net.osmand.AndroidUtils; +import net.osmand.PlatformUtil; +import net.osmand.plus.ApplicationMode; +import net.osmand.plus.OsmandApplication; +import net.osmand.plus.R; +import net.osmand.plus.UiUtilities; +import net.osmand.plus.activities.PluginsActivity; +import net.osmand.plus.base.BaseOsmAndFragment; + + +import org.apache.commons.logging.Log; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +public class UiCustomizationRootFragment extends BaseOsmAndFragment { + + public static final String TAG = UiCustomizationRootFragment.class.getName(); + private static final Log LOG = PlatformUtil.getLog(TAG); + + private OsmandApplication app; + private LayoutInflater mInflater; + private boolean nightMode; + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + app = requireMyApplication(); + nightMode = !app.getSettings().isLightContent(); + mInflater = UiUtilities.getInflater(app, nightMode); +// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { +// getActivity().getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR); +// } + } + + @Nullable + @Override + public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { + ApplicationMode profile = app.getSettings().getApplicationMode(); + View root = mInflater.inflate(R.layout.fragment_ui_customization, container, false); + Toolbar toolbar = root.findViewById(R.id.toolbar); + TextView toolbarTitle = root.findViewById(R.id.toolbar_title); + TextView toolbarSubTitle = root.findViewById(R.id.toolbar_subtitle); + ImageButton toolbarButton = root.findViewById(R.id.close_button); + RecyclerView recyclerView = root.findViewById(R.id.list); + toolbar.setBackgroundColor(nightMode + ? getResources().getColor(R.color.list_background_color_dark) + : getResources().getColor(R.color.list_background_color_light)); + toolbarTitle.setTextColor(nightMode + ? getResources().getColor(R.color.text_color_primary_dark) + : getResources().getColor(R.color.list_background_color_dark)); + toolbarSubTitle.setTextColor(getResources().getColor(R.color.text_color_secondary_light)); + toolbarButton.setImageDrawable(getPaintedContentIcon(R.drawable.ic_arrow_back, getResources().getColor(R.color.text_color_secondary_light))); + toolbarTitle.setText(R.string.ui_customization); + toolbarSubTitle.setText(profile.toHumanString()); + toolbarSubTitle.setVisibility(View.VISIBLE); + List items = new ArrayList<>(); + items.add(getString(R.string.ui_customization_description)); + items.addAll(Arrays.asList(ScreenType.values())); + CustomizationItemsAdapter adapter = new CustomizationItemsAdapter(items, new OnCustomizationItemClickListener() { + @Override + public void onItemClick(ScreenType type) { + FragmentManager fm = getFragmentManager(); + if (fm != null) { + UiCustomizationFragment.showInstance(fm, type); + } + } + }); + recyclerView.setLayoutManager(new LinearLayoutManager(app)); + recyclerView.setAdapter(adapter); + if (Build.VERSION.SDK_INT >= 21) { + AndroidUtils.addStatusBarPadding21v(app, root); + } + return root; + } + + @Override + public int getStatusBarColorId() { + return nightMode ? R.color.list_background_color_dark : R.color.list_background_color_light; + } + + + private class CustomizationItemsAdapter extends RecyclerView.Adapter { + + private static final int DESCRIPTION_TYPE = 0; + private static final int ITEM_TYPE = 1; + + private List items; + private OnCustomizationItemClickListener listener; + + CustomizationItemsAdapter(List items, OnCustomizationItemClickListener listener) { + this.items = items; + this.listener = listener; + } + + @Override + public int getItemViewType(int position) { + if (items.get(position) instanceof String) { + return DESCRIPTION_TYPE; + } else { + return ITEM_TYPE; + } + } + + @NonNull + @Override + public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { + if (viewType == DESCRIPTION_TYPE) { + View view = mInflater.inflate(R.layout.list_item_description_with_image, parent, false); + return new DescriptionHolder(view); + + } else { + View view = mInflater.inflate(R.layout.list_item_ui_customization, parent, false); + return new ItemHolder(view); + } + } + + @Override + public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) { + final Object currentItem = items.get(position); + if (holder instanceof DescriptionHolder) { + DescriptionHolder descriptionHolder = (DescriptionHolder) holder; + String plugins = getString(R.string.prefs_plugins) + '.'; + String description = String.format(getString(R.string.ltr_or_rtl_combine_via_space), (String) currentItem, plugins); + setupClickableText( + descriptionHolder.description, description, plugins, new Intent(app, PluginsActivity.class)); + descriptionHolder.image.setVisibility(View.GONE); + } else { + final ScreenType item = (ScreenType) currentItem; + ItemHolder itemHolder = (ItemHolder) holder; + itemHolder.icon.setImageResource(item.iconRes); + itemHolder.title.setText(item.titleRes); + itemHolder.itemView.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + listener.onItemClick(item); + } + }); + } + } + + @Override + public int getItemCount() { + return items.size(); + } + + private void setupClickableText(TextView textView, String text, String clickableText, final Intent intent) { + SpannableString spannableString = new SpannableString(text); + ClickableSpan clickableSpan = new ClickableSpan() { + @Override + public void onClick(@NonNull View view) { + startActivity(intent); + } + }; + try { + int startIndex = text.indexOf(clickableText); + spannableString.setSpan(clickableSpan, startIndex, startIndex + clickableText.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); + textView.setText(spannableString); + textView.setMovementMethod(LinkMovementMethod.getInstance()); + textView.setHighlightColor(nightMode + ? getResources().getColor(R.color.active_color_primary_dark) + : getResources().getColor(R.color.active_color_primary_light)); + } catch (RuntimeException e) { + LOG.error("Error trying to find index of " + clickableText + " " + e); + } + } + + class DescriptionHolder extends RecyclerView.ViewHolder { + ImageView image; + TextView description; + + DescriptionHolder(@NonNull View itemView) { + super(itemView); + image = itemView.findViewById(R.id.image); + description = itemView.findViewById(R.id.description); + } + } + + class ItemHolder extends RecyclerView.ViewHolder { + ImageView icon; + TextView title; + TextView subTitle; + + ItemHolder(@NonNull View itemView) { + super(itemView); + icon = itemView.findViewById(R.id.icon); + title = itemView.findViewById(R.id.title); + subTitle = itemView.findViewById(R.id.sub_title); + } + } + } + + public enum ScreenType { + DRAWER(R.string.shared_string_drawer, R.drawable.ic_action_layers, R.drawable.img_settings_customize_drawer_day, R.drawable.img_settings_customize_drawer_night), + CONFIGURE_MAP(R.string.configure_map, R.drawable.ic_action_layers, R.drawable.img_settings_customize_configure_map_day, R.drawable.img_settings_customize_configure_map_night), + CONTEXT_MENU_ACTIONS(R.string.context_menu_actions, R.drawable.ic_action_layers, R.drawable.img_settings_customize_context_menu_day, R.drawable.img_settings_customize_context_menu_night); + + @StringRes + public int titleRes; + @DrawableRes + public int iconRes; + @DrawableRes + public int imageDayRes; + @DrawableRes + public int imageNightRes; + + ScreenType(int titleRes, int iconRes, int imageDayRes, int imageNightRes) { + this.titleRes = titleRes; + this.iconRes = iconRes; + this.imageDayRes = imageDayRes; + this.imageNightRes = imageNightRes; + } + } + + interface OnCustomizationItemClickListener { + void onItemClick(ScreenType type); + } +} diff --git a/OsmAnd/src/net/osmand/view/BaseMoveItemAdapter.java b/OsmAnd/src/net/osmand/view/BaseMoveItemAdapter.java new file mode 100644 index 0000000000..f1f90a5ec8 --- /dev/null +++ b/OsmAnd/src/net/osmand/view/BaseMoveItemAdapter.java @@ -0,0 +1,48 @@ +package net.osmand.view; + +import android.view.ViewGroup; + +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.RecyclerView; + +import net.osmand.plus.settings.UiCustomizationFragment; +import net.osmand.plus.views.controls.ReorderItemTouchHelperCallback; + +import java.util.List; + +public abstract class BaseMoveItemAdapter + extends RecyclerView.Adapter + implements ReorderItemTouchHelperCallback.OnItemMoveCallback { + +// private List + + + @NonNull + @Override + public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { + return null; + } + + @Override + public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) { + + } + +// private class ListItem { +// UiCustomizationFragment.AdapterItemType type; +// Object value; +// +// public ListItem(UiCustomizationFragment.AdapterItemType type, Object value) { +// this.type = type; +// this.value = value; +// } +// } + + public enum ItemType { + DESCRIPTION, + UI_ITEM, + DIVIDER, + HEADER, + BUTTON + } +} From 63e579feb062b9c075fb7f76ecfa768a325df83c Mon Sep 17 00:00:00 2001 From: veliymolfar Date: Wed, 25 Mar 2020 19:11:51 +0200 Subject: [PATCH 002/202] wip --- .../osmand/plus/settings/UiCustomizationFragment.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/OsmAnd/src/net/osmand/plus/settings/UiCustomizationFragment.java b/OsmAnd/src/net/osmand/plus/settings/UiCustomizationFragment.java index 3251ece226..38b6c5c1e6 100644 --- a/OsmAnd/src/net/osmand/plus/settings/UiCustomizationFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/UiCustomizationFragment.java @@ -139,6 +139,7 @@ public class UiCustomizationFragment extends BaseOsmAndFragment { List items = new ArrayList<>(); items.add(new ListItem(AdapterItemType.DESCRIPTION, type)); + items.addAll(getDrawerListItems()); items.add(new ListItem(AdapterItemType.DIVIDER, 1)); return items; } @@ -399,6 +400,15 @@ public class UiCustomizationFragment extends BaseOsmAndFragment { return list; } + private List getDrawerListItems() { + List itemBases = getDrawerItems(); + List listItems = new ArrayList<>(); + for (UiItemBase itemBase : itemBases) { + listItems.add(new ListItem(AdapterItemType.UI_ITEM, itemBase)); + } + return listItems; + } + private class UiItemBase { private String id; From 5b89e876874278f59d3e0270d090e57492908992 Mon Sep 17 00:00:00 2001 From: sonora Date: Sun, 29 Mar 2020 14:13:21 +0200 Subject: [PATCH 003/202] Voice Prompt Delay for all modes (#8706) --- .../src/net/osmand/plus/OsmandSettings.java | 10 +++++- .../plus/development/TestVoiceActivity.java | 32 +++++++++---------- .../net/osmand/plus/routing/VoiceRouter.java | 15 +++++---- .../voice/AbstractPrologCommandPlayer.java | 3 -- .../plus/voice/JSMediaCommandPlayerImpl.java | 14 ++++---- .../plus/voice/MediaCommandPlayerImpl.java | 14 ++++---- .../plus/voice/TTSCommandPlayerImpl.java | 19 ++++++----- 7 files changed, 59 insertions(+), 48 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/OsmandSettings.java b/OsmAnd/src/net/osmand/plus/OsmandSettings.java index 85c93e31f4..39e781ed76 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandSettings.java +++ b/OsmAnd/src/net/osmand/plus/OsmandSettings.java @@ -2090,7 +2090,15 @@ public class OsmandSettings { 12/*AudioAttributes.USAGE_ASSISTANCE_NAVIGATION_GUIDANCE*/).makeProfile(); // For now this can be changed only in TestVoiceActivity - public final OsmandPreference BT_SCO_DELAY = new IntPreference("bt_sco_delay", 1500).makeGlobal().cache(); + public final OsmandPreference[] VOICE_PROMPT_DELAY = new IntPreference[5]; + + { + // On most devices sound output works pomptly so usually no voice prompt delay needed + VOICE_PROMPT_DELAY[3] = new IntPreference("voice_prompt_delay_3", 0).makeGlobal().cache(); /*AudioManager.STREAM_MUSIC*/ + VOICE_PROMPT_DELAY[5] = new IntPreference("voice_prompt_delay_5", 0).makeGlobal().cache(); /*AudioManager.STREAM_NOTIFICATION*/ + // 1500 ms delay works for most configurations to establish a BT SCO link + VOICE_PROMPT_DELAY[0] = new IntPreference("voice_prompt_delay_0", 1500).makeGlobal().cache(); /*AudioManager.STREAM_VOICE_CALL*/ + } // this value string is synchronized with settings_pref.xml preference name public final CommonPreference MAP_ONLINE_DATA = new BooleanPreference("map_online_data", false).makeProfile(); diff --git a/OsmAnd/src/net/osmand/plus/development/TestVoiceActivity.java b/OsmAnd/src/net/osmand/plus/development/TestVoiceActivity.java index 90acf2e9fa..f6bce308a0 100644 --- a/OsmAnd/src/net/osmand/plus/development/TestVoiceActivity.java +++ b/OsmAnd/src/net/osmand/plus/development/TestVoiceActivity.java @@ -147,7 +147,8 @@ public class TestVoiceActivity extends OsmandActionBarActivity { v += "\n \u25CF BT SCO: The current app profile is not set to use 'Phone call audio'."; } - v += "\n \u25CF Phone call audio delay: " + ((OsmandApplication) getApplication()).getSettings().BT_SCO_DELAY.get() + "\u00A0ms"; + v += "\n \u25CF Voice prompt delay for selected output: " + ((OsmandApplication) getApplication()).getSettings().VOICE_PROMPT_DELAY + [((OsmandApplication) getApplication()).getSettings().AUDIO_MANAGER_STREAM.get()].get() + "\u00A0ms"; return v; } @@ -230,7 +231,7 @@ public class TestVoiceActivity extends OsmandActionBarActivity { addButton(ll, "Voice system info:", builder(p)); addButton(ll, "\u25BA (11.1) (Tap to refresh)\n" + getVoiceSystemInfo(), builder(p).attention("")); - addButton(ll, "\u25BA (11.2) Tap to change Phone call audio delay (if car stereo cuts off prompts). Default is 1500\u00A0ms.", builder(p).attention("")); + addButton(ll, "\u25BA (11.2) Tap to change voice prompt delay (if car stereo cuts off prompts). Default is 1500\u00A0ms for Phone call audio, or else 0\u00A0ms.", builder(p).attention("")); ll.forceLayout(); } @@ -282,23 +283,20 @@ public class TestVoiceActivity extends OsmandActionBarActivity { Toast.makeText(TestVoiceActivity.this, "Info refreshed.", Toast.LENGTH_LONG).show(); } if (description.startsWith("\u25BA (11.2)")) { - if (((OsmandApplication) getApplication()).getSettings().AUDIO_MANAGER_STREAM.get() == 0) { - if (((OsmandApplication) getApplication()).getSettings().BT_SCO_DELAY.get() == 1000) { - ((OsmandApplication) getApplication()).getSettings().BT_SCO_DELAY.set(1500); - } else if (((OsmandApplication) getApplication()).getSettings().BT_SCO_DELAY.get() == 1500) { - ((OsmandApplication) getApplication()).getSettings().BT_SCO_DELAY.set(2000); - } else if (((OsmandApplication) getApplication()).getSettings().BT_SCO_DELAY.get() == 2000) { - ((OsmandApplication) getApplication()).getSettings().BT_SCO_DELAY.set(2500); - } else if (((OsmandApplication) getApplication()).getSettings().BT_SCO_DELAY.get() == 2500) { - ((OsmandApplication) getApplication()).getSettings().BT_SCO_DELAY.set(3000); - } else { - ((OsmandApplication) getApplication()).getSettings().BT_SCO_DELAY.set(1000); - } - infoButton.setText("\u25BA (11.1) (Tap to refresh)\n" + getVoiceSystemInfo()); - Toast.makeText(TestVoiceActivity.this, "BT SCO init delay changed to " + ((OsmandApplication) getApplication()).getSettings().BT_SCO_DELAY.get() + "\u00A0ms.", Toast.LENGTH_LONG).show(); + int ams = ((OsmandApplication) getApplication()).getSettings().AUDIO_MANAGER_STREAM.get(); + if (((OsmandApplication) getApplication()).getSettings().VOICE_PROMPT_DELAY[ams].get() == 1000) { + ((OsmandApplication) getApplication()).getSettings().VOICE_PROMPT_DELAY[ams].set(1500); + } else if (((OsmandApplication) getApplication()).getSettings().VOICE_PROMPT_DELAY[ams].get() == 1500) { + ((OsmandApplication) getApplication()).getSettings().VOICE_PROMPT_DELAY[ams].set(2000); + } else if (((OsmandApplication) getApplication()).getSettings().VOICE_PROMPT_DELAY[ams].get() == 2000) { + ((OsmandApplication) getApplication()).getSettings().VOICE_PROMPT_DELAY[ams].set(2500); + } else if (((OsmandApplication) getApplication()).getSettings().VOICE_PROMPT_DELAY[ams].get() == 2500) { + ((OsmandApplication) getApplication()).getSettings().VOICE_PROMPT_DELAY[ams].set(3000); } else { - Toast.makeText(TestVoiceActivity.this, "Setting only available when using 'Phone call audio'.", Toast.LENGTH_LONG).show(); + ((OsmandApplication) getApplication()).getSettings().VOICE_PROMPT_DELAY[ams].set(1000); } + infoButton.setText("\u25BA (11.1) (Tap to refresh)\n" + getVoiceSystemInfo()); + Toast.makeText(TestVoiceActivity.this, "Voice prompt delay changed to " + ((OsmandApplication) getApplication()).getSettings().VOICE_PROMPT_DELAY[ams].get() + "\u00A0ms.", Toast.LENGTH_LONG).show(); } } }); diff --git a/OsmAnd/src/net/osmand/plus/routing/VoiceRouter.java b/OsmAnd/src/net/osmand/plus/routing/VoiceRouter.java index 0b34ec6a1d..1f5d0e7ebe 100644 --- a/OsmAnd/src/net/osmand/plus/routing/VoiceRouter.java +++ b/OsmAnd/src/net/osmand/plus/routing/VoiceRouter.java @@ -192,7 +192,7 @@ public class VoiceRouter { } } - private double btScoDelayDistance = 0; + private double voicePromptDelayDistance = 0; public boolean isDistanceLess(float currentSpeed, double dist, double etalon, float defSpeed) { if (defSpeed <= 0) { @@ -202,12 +202,13 @@ public class VoiceRouter { currentSpeed = DEFAULT_SPEED; } - // Trigger close prompts earlier if delayed for BT SCO connection establishment - if ((settings.AUDIO_MANAGER_STREAM.getModeValue(router.getAppMode()) == 0) && !AbstractPrologCommandPlayer.btScoStatus) { - btScoDelayDistance = currentSpeed * (double) settings.BT_SCO_DELAY.get() / 1000; + // Trigger close prompts earlier to allow BT SCO link being established, or when VOICE_PROMPT_DELAY is set >0 for the other stream types + int ams = settings.AUDIO_MANAGER_STREAM.getModeValue(router.getAppMode()); + if (((ams == 0) && !AbstractPrologCommandPlayer.btScoStatus) || (ams > 0)) { + voicePromptDelayDistance = currentSpeed * (double) settings.VOICE_PROMPT_DELAY[ams].get() / 1000; } - if ((dist < etalon + btScoDelayDistance) || ((dist - btScoDelayDistance) / currentSpeed) < (etalon / defSpeed)) { + if ((dist < etalon + voicePromptDelayDistance) || ((dist - voicePromptDelayDistance) / currentSpeed) < (etalon / defSpeed)) { return true; } return false; @@ -520,9 +521,9 @@ public class VoiceRouter { if (repeat || dist >= TURN_IN_DISTANCE_END) { if ((isDistanceLess(speed, nextNextInfo.distanceTo, TURN_DISTANCE, 0f) || nextNextInfo.distanceTo < TURN_IN_DISTANCE_END) && nextNextInfo != null) { - playMakeTurnIn(currentSegment, next, dist - (int) btScoDelayDistance, nextNextInfo.directionInfo); + playMakeTurnIn(currentSegment, next, dist - (int) voicePromptDelayDistance, nextNextInfo.directionInfo); } else { - playMakeTurnIn(currentSegment, next, dist - (int) btScoDelayDistance, null); + playMakeTurnIn(currentSegment, next, dist - (int) voicePromptDelayDistance, null); } playGoAndArriveAtDestination(repeat, nextInfo, currentSegment); } diff --git a/OsmAnd/src/net/osmand/plus/voice/AbstractPrologCommandPlayer.java b/OsmAnd/src/net/osmand/plus/voice/AbstractPrologCommandPlayer.java index a645fc8c9d..04449bf62b 100644 --- a/OsmAnd/src/net/osmand/plus/voice/AbstractPrologCommandPlayer.java +++ b/OsmAnd/src/net/osmand/plus/voice/AbstractPrologCommandPlayer.java @@ -322,9 +322,6 @@ public abstract class AbstractPrologCommandPlayer implements CommandPlayer, Stat public static boolean btScoStatus = false; - // BT_SCO_DELAY now in Settings. 1500 ms works for most configurations. - //public static final int BT_SCO_DELAY = 1500; - // This only needed for init debugging in TestVoiceActivity: public static String btScoInit = "-"; diff --git a/OsmAnd/src/net/osmand/plus/voice/JSMediaCommandPlayerImpl.java b/OsmAnd/src/net/osmand/plus/voice/JSMediaCommandPlayerImpl.java index c22973427a..cd4511724e 100644 --- a/OsmAnd/src/net/osmand/plus/voice/JSMediaCommandPlayerImpl.java +++ b/OsmAnd/src/net/osmand/plus/voice/JSMediaCommandPlayerImpl.java @@ -55,12 +55,14 @@ public class JSMediaCommandPlayerImpl extends MediaCommandPlayerImpl { // If we have not already started to play audio, start. if (mediaPlayer == null) { requestAudioFocus(); - // Delay first prompt of each batch to allow BT SCO connection being established - if (ctx != null && ctx.getSettings().AUDIO_MANAGER_STREAM.getModeValue(getApplicationMode()) == 0) { - try { - log.debug("Delaying MediaCommandPlayer for BT SCO"); - Thread.sleep(ctx.getSettings().BT_SCO_DELAY.get()); - } catch (InterruptedException e) { + // Delay first prompt of each batch to allow BT SCO link being established, or when VOICE_PROMPT_DELAY is set >0 for the other stream types + if (ctx != null) { + int vpd = ctx.getSettings().VOICE_PROMPT_DELAY[ctx.getSettings().AUDIO_MANAGER_STREAM.getModeValue(getApplicationMode())].get(); + if (vpd > 0) { + try { + Thread.sleep(vpd); + } catch (InterruptedException e) { + } } } } diff --git a/OsmAnd/src/net/osmand/plus/voice/MediaCommandPlayerImpl.java b/OsmAnd/src/net/osmand/plus/voice/MediaCommandPlayerImpl.java index 8c5b454ddd..273bfe7ccc 100644 --- a/OsmAnd/src/net/osmand/plus/voice/MediaCommandPlayerImpl.java +++ b/OsmAnd/src/net/osmand/plus/voice/MediaCommandPlayerImpl.java @@ -87,12 +87,14 @@ public class MediaCommandPlayerImpl extends AbstractPrologCommandPlayer implemen // If we have not already started to play audio, start. if (mediaPlayer == null) { requestAudioFocus(); - // Delay first prompt of each batch to allow BT SCO connection being established - if (ctx != null && ctx.getSettings().AUDIO_MANAGER_STREAM.getModeValue(getApplicationMode()) == 0) { - try { - log.debug("Delaying MediaCommandPlayer for BT SCO"); - Thread.sleep(ctx.getSettings().BT_SCO_DELAY.get()); - } catch (InterruptedException e) { + // Delay first prompt of each batch to allow BT SCO link being established, or when VOICE_PROMPT_DELAY is set >0 for the other stream types + if (ctx != null) { + int vpd = ctx.getSettings().VOICE_PROMPT_DELAY[ctx.getSettings().AUDIO_MANAGER_STREAM.getModeValue(getApplicationMode())].get(); + if (vpd > 0) { + try { + Thread.sleep(vpd); + } catch (InterruptedException e) { + } } } } diff --git a/OsmAnd/src/net/osmand/plus/voice/TTSCommandPlayerImpl.java b/OsmAnd/src/net/osmand/plus/voice/TTSCommandPlayerImpl.java index 7bb19f361b..ad81dbef28 100644 --- a/OsmAnd/src/net/osmand/plus/voice/TTSCommandPlayerImpl.java +++ b/OsmAnd/src/net/osmand/plus/voice/TTSCommandPlayerImpl.java @@ -123,14 +123,17 @@ public class TTSCommandPlayerImpl extends AbstractPrologCommandPlayer { .setContentType(AudioAttributes.CONTENT_TYPE_SPEECH) .build()); } - // Delay first prompt of each batch to allow BT SCO connection being established - if (ctx.getSettings().AUDIO_MANAGER_STREAM.getModeValue(getApplicationMode()) == 0) { - ttsRequests++; - if (android.os.Build.VERSION.SDK_INT < 21) { - params.put(TextToSpeech.Engine.KEY_PARAM_UTTERANCE_ID,""+System.currentTimeMillis()); - mTts.playSilence(ctx.getSettings().BT_SCO_DELAY.get(), TextToSpeech.QUEUE_ADD, params); - } else { - mTts.playSilentUtterance(ctx.getSettings().BT_SCO_DELAY.get(), TextToSpeech.QUEUE_ADD, ""+System.currentTimeMillis()); + // Delay first prompt of each batch to allow BT SCO link being established, or when VOICE_PROMPT_DELAY is set >0 for the other stream types + if (ctx != null) { + int vpd = ctx.getSettings().VOICE_PROMPT_DELAY[ctx.getSettings().AUDIO_MANAGER_STREAM.getModeValue(getApplicationMode())].get(); + if (vpd > 0) { + ttsRequests++; + if (android.os.Build.VERSION.SDK_INT < 21) { + params.put(TextToSpeech.Engine.KEY_PARAM_UTTERANCE_ID,""+System.currentTimeMillis()); + mTts.playSilence(vpd, TextToSpeech.QUEUE_ADD, params); + } else { + mTts.playSilentUtterance(vpd, TextToSpeech.QUEUE_ADD, ""+System.currentTimeMillis()); + } } } } From 7c01f664ca9d8a0f385e7490683636cc47de8105 Mon Sep 17 00:00:00 2001 From: sonora Date: Sun, 29 Mar 2020 14:29:46 +0200 Subject: [PATCH 004/202] fix array length --- OsmAnd/src/net/osmand/plus/OsmandSettings.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/OsmandSettings.java b/OsmAnd/src/net/osmand/plus/OsmandSettings.java index 39e781ed76..b741f9155c 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandSettings.java +++ b/OsmAnd/src/net/osmand/plus/OsmandSettings.java @@ -2090,7 +2090,7 @@ public class OsmandSettings { 12/*AudioAttributes.USAGE_ASSISTANCE_NAVIGATION_GUIDANCE*/).makeProfile(); // For now this can be changed only in TestVoiceActivity - public final OsmandPreference[] VOICE_PROMPT_DELAY = new IntPreference[5]; + public final OsmandPreference[] VOICE_PROMPT_DELAY = new IntPreference[6]; { // On most devices sound output works pomptly so usually no voice prompt delay needed From d37699988e3df1e5a9e4c2efba26a466ac09646d Mon Sep 17 00:00:00 2001 From: sonora Date: Sun, 29 Mar 2020 15:15:56 +0200 Subject: [PATCH 005/202] Facilitate range 0-3000ms --- .../osmand/plus/development/TestVoiceActivity.java | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/development/TestVoiceActivity.java b/OsmAnd/src/net/osmand/plus/development/TestVoiceActivity.java index f6bce308a0..8864807e9b 100644 --- a/OsmAnd/src/net/osmand/plus/development/TestVoiceActivity.java +++ b/OsmAnd/src/net/osmand/plus/development/TestVoiceActivity.java @@ -284,16 +284,11 @@ public class TestVoiceActivity extends OsmandActionBarActivity { } if (description.startsWith("\u25BA (11.2)")) { int ams = ((OsmandApplication) getApplication()).getSettings().AUDIO_MANAGER_STREAM.get(); - if (((OsmandApplication) getApplication()).getSettings().VOICE_PROMPT_DELAY[ams].get() == 1000) { - ((OsmandApplication) getApplication()).getSettings().VOICE_PROMPT_DELAY[ams].set(1500); - } else if (((OsmandApplication) getApplication()).getSettings().VOICE_PROMPT_DELAY[ams].get() == 1500) { - ((OsmandApplication) getApplication()).getSettings().VOICE_PROMPT_DELAY[ams].set(2000); - } else if (((OsmandApplication) getApplication()).getSettings().VOICE_PROMPT_DELAY[ams].get() == 2000) { - ((OsmandApplication) getApplication()).getSettings().VOICE_PROMPT_DELAY[ams].set(2500); - } else if (((OsmandApplication) getApplication()).getSettings().VOICE_PROMPT_DELAY[ams].get() == 2500) { - ((OsmandApplication) getApplication()).getSettings().VOICE_PROMPT_DELAY[ams].set(3000); + if (((OsmandApplication) getApplication()).getSettings().VOICE_PROMPT_DELAY[ams].get() >= 3000) { + ((OsmandApplication) getApplication()).getSettings().VOICE_PROMPT_DELAY[ams].set(0); } else { - ((OsmandApplication) getApplication()).getSettings().VOICE_PROMPT_DELAY[ams].set(1000); + ((OsmandApplication) getApplication()).getSettings().VOICE_PROMPT_DELAY[ams].set + (((OsmandApplication) getApplication()).getSettings().VOICE_PROMPT_DELAY[ams].get() + 500); } infoButton.setText("\u25BA (11.1) (Tap to refresh)\n" + getVoiceSystemInfo()); Toast.makeText(TestVoiceActivity.this, "Voice prompt delay changed to " + ((OsmandApplication) getApplication()).getSettings().VOICE_PROMPT_DELAY[ams].get() + "\u00A0ms.", Toast.LENGTH_LONG).show(); From 7b268cd9d9d5c9b6262abcd01bb619b85e00e1ac Mon Sep 17 00:00:00 2001 From: Nazar-Kutz Date: Tue, 31 Mar 2020 12:41:49 +0300 Subject: [PATCH 006/202] Add Wikipedia POI separate screen and logic --- .../aidlapi/OsmAndCustomizationConstants.java | 1 + .../main/java/net/osmand/osm/MapPoiTypes.java | 10 + .../bottom_sheet_item_title_with_checkbox.xml | 39 ++ ...ottom_sheet_item_title_with_swith_56dp.xml | 47 +++ .../dash_item_with_description_72dp.xml | 78 ++++ .../layout/list_group_title_with_descr.xml | 21 +- OsmAnd/res/layout/list_item_icon_and_menu.xml | 14 +- OsmAnd/res/values/strings.xml | 5 + OsmAnd/src/net/osmand/AndroidUtils.java | 12 + .../net/osmand/plus/ContextMenuAdapter.java | 2 +- .../src/net/osmand/plus/ContextMenuItem.java | 15 +- .../src/net/osmand/plus/OsmandSettings.java | 55 ++- .../plus/activities/MapActivityLayers.java | 9 +- .../activities/search/SearchPOIActivity.java | 3 +- .../BottomSheetItemWithCompoundButton.java | 4 + .../osmand/plus/dashboard/DashboardOnMap.java | 18 +- .../osmand/plus/dialogs/ConfigureMapMenu.java | 35 +- .../osmand/plus/helpers/WaypointHelper.java | 1 + .../net/osmand/plus/poi/PoiFiltersHelper.java | 156 ++++++-- .../net/osmand/plus/poi/PoiTemplateList.java | 5 + .../src/net/osmand/plus/poi/PoiUIFilter.java | 4 + .../actions/ShowHidePoiAction.java | 11 +- .../MapRouteInfoMenu.java | 5 +- .../ShowAlongTheRouteBottomSheet.java | 6 +- .../search/QuickSearchDialogFragment.java | 7 +- .../osmand/plus/search/QuickSearchHelper.java | 7 +- .../net/osmand/plus/views/POIMapLayer.java | 1 + .../SelectWikiLanguagesBottomSheet.java | 275 ++++++++++++++ .../plus/wikipedia/WikipediaPoiMenu.java | 348 ++++++++++++++++++ 29 files changed, 1103 insertions(+), 91 deletions(-) create mode 100644 OsmAnd/res/layout/bottom_sheet_item_title_with_checkbox.xml create mode 100644 OsmAnd/res/layout/bottom_sheet_item_title_with_swith_56dp.xml create mode 100644 OsmAnd/res/layout/dash_item_with_description_72dp.xml create mode 100644 OsmAnd/src/net/osmand/plus/poi/PoiTemplateList.java create mode 100644 OsmAnd/src/net/osmand/plus/wikipedia/SelectWikiLanguagesBottomSheet.java create mode 100644 OsmAnd/src/net/osmand/plus/wikipedia/WikipediaPoiMenu.java diff --git a/OsmAnd-api/src/net/osmand/aidlapi/OsmAndCustomizationConstants.java b/OsmAnd-api/src/net/osmand/aidlapi/OsmAndCustomizationConstants.java index 6657e29bca..6127cabc9c 100644 --- a/OsmAnd-api/src/net/osmand/aidlapi/OsmAndCustomizationConstants.java +++ b/OsmAnd-api/src/net/osmand/aidlapi/OsmAndCustomizationConstants.java @@ -35,6 +35,7 @@ public interface OsmAndCustomizationConstants { String POI_OVERLAY_LABELS_ID = SHOW_ITEMS_ID_SCHEME + "poi_overlay_labels"; String TRANSPORT_ID = SHOW_ITEMS_ID_SCHEME + "transport"; String GPX_FILES_ID = SHOW_ITEMS_ID_SCHEME + "gpx_files"; + String WIKIPEDIA_ID = SHOW_ITEMS_ID_SCHEME + "wikipedia"; String MAP_MARKERS_ID = SHOW_ITEMS_ID_SCHEME + "map_markers"; String MAP_SOURCE_ID = SHOW_ITEMS_ID_SCHEME + "map_source"; String RECORDING_LAYER = SHOW_ITEMS_ID_SCHEME + "recording_layer"; diff --git a/OsmAnd-java/src/main/java/net/osmand/osm/MapPoiTypes.java b/OsmAnd-java/src/main/java/net/osmand/osm/MapPoiTypes.java index 874759598d..38e914a63d 100644 --- a/OsmAnd-java/src/main/java/net/osmand/osm/MapPoiTypes.java +++ b/OsmAnd-java/src/main/java/net/osmand/osm/MapPoiTypes.java @@ -36,6 +36,7 @@ public class MapPoiTypes { private PoiCategory otherCategory; private PoiCategory otherMapCategory; + public static final String WIKI_LANG_KEY_PREFFIX = "wiki_lang:"; static final String OSM_WIKI_CATEGORY = "osmwiki"; private PoiTranslator poiTranslator = null; private boolean init; @@ -127,6 +128,15 @@ public class MapPoiTypes { return lf; } + public PoiCategory getOsmwiki() { + for (PoiCategory category : categories) { + if (category.isWiki()) { + return category; + } + } + return null; + } + private void sortList(List lf) { final Collator instance = Collator.getInstance(); Collections.sort(lf, new Comparator() { diff --git a/OsmAnd/res/layout/bottom_sheet_item_title_with_checkbox.xml b/OsmAnd/res/layout/bottom_sheet_item_title_with_checkbox.xml new file mode 100644 index 0000000000..cede7a0e86 --- /dev/null +++ b/OsmAnd/res/layout/bottom_sheet_item_title_with_checkbox.xml @@ -0,0 +1,39 @@ + + + + + + + + diff --git a/OsmAnd/res/layout/bottom_sheet_item_title_with_swith_56dp.xml b/OsmAnd/res/layout/bottom_sheet_item_title_with_swith_56dp.xml new file mode 100644 index 0000000000..c347f4b20f --- /dev/null +++ b/OsmAnd/res/layout/bottom_sheet_item_title_with_swith_56dp.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + diff --git a/OsmAnd/res/layout/dash_item_with_description_72dp.xml b/OsmAnd/res/layout/dash_item_with_description_72dp.xml new file mode 100644 index 0000000000..768ae56024 --- /dev/null +++ b/OsmAnd/res/layout/dash_item_with_description_72dp.xml @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/OsmAnd/res/layout/list_group_title_with_descr.xml b/OsmAnd/res/layout/list_group_title_with_descr.xml index 5d2e429a58..4c48d7ba5e 100644 --- a/OsmAnd/res/layout/list_group_title_with_descr.xml +++ b/OsmAnd/res/layout/list_group_title_with_descr.xml @@ -21,7 +21,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="bottom" - android:minHeight="48dp" + android:minHeight="@dimen/setting_list_item_large_height" android:background="?attr/bg_color" android:gravity="center" android:orientation="vertical" @@ -34,9 +34,9 @@ android:id="@+id/title" android:layout_width="match_parent" android:layout_height="wrap_content" - android:paddingTop="10dp" - android:textColor="?android:textColorPrimary" - android:textSize="@dimen/default_sub_text_size" + android:paddingTop="@dimen/content_padding_small" + android:textColor="@color/preference_category_title" + android:textSize="@dimen/default_desc_text_size" osmand:typeface="@string/font_roboto_medium" tools:text="Download map"/> @@ -44,18 +44,13 @@ android:id="@+id/description" android:layout_width="match_parent" android:layout_height="wrap_content" - android:paddingTop="4dp" + android:paddingTop="@dimen/content_padding_half" + android:paddingBottom="@dimen/content_padding" android:textColor="?android:textColorSecondary" - android:textSize="@dimen/default_sub_text_size" - android:paddingBottom="10dp" + android:textSize="@dimen/default_desc_text_size" + osmand:typeface="@string/font_roboto_regular" tools:text="For view contour lines on the map, you need to download contour line map of this region."/> - - \ No newline at end of file diff --git a/OsmAnd/res/layout/list_item_icon_and_menu.xml b/OsmAnd/res/layout/list_item_icon_and_menu.xml index 7e08397865..b3ad8c8cbe 100644 --- a/OsmAnd/res/layout/list_item_icon_and_menu.xml +++ b/OsmAnd/res/layout/list_item_icon_and_menu.xml @@ -15,8 +15,8 @@ android:layout_height="wrap_content" android:layout_centerVertical="true" android:layout_gravity="center_vertical" - android:layout_marginLeft="16dp" - android:layout_marginStart="16dp" + android:layout_marginLeft="@dimen/content_padding" + android:layout_marginStart="@dimen/content_padding" tools:src="@drawable/ic_action_gabout_dark"/> @@ -81,8 +81,8 @@ android:layout_alignParentRight="true" android:layout_centerVertical="true" android:layout_gravity="center_vertical" - android:layout_marginEnd="16dp" - android:layout_marginRight="16dp" + android:layout_marginEnd="@dimen/content_padding" + android:layout_marginRight="@dimen/content_padding" android:focusable="false"/> + Additional maps are needed to view Wikipedia POIs on the map. + Some Wikipedia articles may not be available in your name, select the languages in which Wikipedia articles will appear on the map.\nYou will be able to switch between all available languages while reading the article. + All languages + Language + Languages Snowmobile Ski touring Min diff --git a/OsmAnd/src/net/osmand/AndroidUtils.java b/OsmAnd/src/net/osmand/AndroidUtils.java index de35fad5a0..5a9025c088 100644 --- a/OsmAnd/src/net/osmand/AndroidUtils.java +++ b/OsmAnd/src/net/osmand/AndroidUtils.java @@ -252,6 +252,18 @@ public class AndroidUtils { return ""; } + public static String makeStringFromList(@NonNull List strings, @NonNull String divider) { + if (strings.size() == 0) { + return ""; + } + StringBuilder result = new StringBuilder(strings.get(0)); + for (int i = 1; i < strings.size(); i++) { + result.append(divider); + result.append(strings.get(i)); + } + return result.toString(); + } + public static View findParentViewById(View view, int id) { ViewParent viewParent = view.getParent(); diff --git a/OsmAnd/src/net/osmand/plus/ContextMenuAdapter.java b/OsmAnd/src/net/osmand/plus/ContextMenuAdapter.java index b164989528..e9c934346f 100644 --- a/OsmAnd/src/net/osmand/plus/ContextMenuAdapter.java +++ b/OsmAnd/src/net/osmand/plus/ContextMenuAdapter.java @@ -404,7 +404,7 @@ public class ContextMenuAdapter { } }; ch.setOnCheckedChangeListener(listener); - ch.setVisibility(View.VISIBLE); + ch.setVisibility(item.shouldHideCompoundButton() ? View.GONE : View.VISIBLE); } else if (ch != null) { ch.setVisibility(View.GONE); } diff --git a/OsmAnd/src/net/osmand/plus/ContextMenuItem.java b/OsmAnd/src/net/osmand/plus/ContextMenuItem.java index 0e5b89ab5c..c04acf706a 100644 --- a/OsmAnd/src/net/osmand/plus/ContextMenuItem.java +++ b/OsmAnd/src/net/osmand/plus/ContextMenuItem.java @@ -37,6 +37,7 @@ public class ContextMenuItem { private final ContextMenuAdapter.OnIntegerValueChangedListener integerListener; private final ContextMenuAdapter.ProgressListener progressListener; private final boolean hideDivider; + private final boolean hideCompoundButton; private final int minHeight; private final int tag; private final String id; @@ -60,6 +61,7 @@ public class ContextMenuItem { ContextMenuAdapter.OnIntegerValueChangedListener integerListener, ContextMenuAdapter.ProgressListener progressListener, boolean hideDivider, + boolean hideCompoundButton, int minHeight, int tag, String id) { @@ -82,6 +84,7 @@ public class ContextMenuItem { this.integerListener = integerListener; this.progressListener = progressListener; this.hideDivider = hideDivider; + this.hideCompoundButton = hideCompoundButton; this.minHeight = minHeight; this.tag = tag; this.id = id; @@ -182,6 +185,10 @@ public class ContextMenuItem { return hideDivider; } + public boolean shouldHideCompoundButton() { + return hideCompoundButton; + } + public void setTitle(String title) { this.title = title; } @@ -255,6 +262,7 @@ public class ContextMenuItem { private ContextMenuAdapter.ProgressListener mProgressListener = null; private boolean mSkipPaintingWithoutColor; private boolean mHideDivider; + private boolean mHideCompoundButton; private int mMinHeight; private int mTag; private String mId; @@ -358,6 +366,11 @@ public class ContextMenuItem { return this; } + public ItemBuilder hideCompoundButton(boolean hideCompoundButton) { + mHideCompoundButton = hideCompoundButton; + return this; + } + public ItemBuilder setMinHeight(int minHeight) { this.mMinHeight = minHeight; return this; @@ -381,7 +394,7 @@ public class ContextMenuItem { return new ContextMenuItem(mTitleId, mTitle, mIcon, mColorRes, mSecondaryIcon, mSelected, mProgress, mLayout, mLoading, mIsCategory, mIsClickable, mSkipPaintingWithoutColor, mPosition, mOrder, mDescription, mItemClickListener, mIntegerListener, mProgressListener, - mHideDivider, mMinHeight, mTag, mId); + mHideDivider, mHideCompoundButton, mMinHeight, mTag, mId); } } } diff --git a/OsmAnd/src/net/osmand/plus/OsmandSettings.java b/OsmAnd/src/net/osmand/plus/OsmandSettings.java index 85c93e31f4..b5d2cf32a8 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandSettings.java +++ b/OsmAnd/src/net/osmand/plus/OsmandSettings.java @@ -1012,42 +1012,58 @@ public class OsmandSettings { super(id, defaultValue); this.delimiter = delimiter; } - + public boolean addValue(String res) { - String vl = get(); + return addModeValue(getApplicationMode(), res); + } + + public boolean addModeValue(ApplicationMode appMode, String res) { + String vl = getModeValue(appMode); if (vl == null || vl.isEmpty()) { vl = res + delimiter; } else { vl = vl + res + delimiter; } - set(vl); + setModeValue(appMode, vl); return true; } - + public void clearAll() { - set(""); + clearAllForProfile(getApplicationMode()); + } + + public void clearAllForProfile(ApplicationMode appMode) { + setModeValue(appMode, ""); } public boolean containsValue(String res) { - String vl = get(); + return containsValue(getApplicationMode(), res); + } + + public boolean containsValue(ApplicationMode appMode, String res) { + String vl = getModeValue(appMode); String r = res + delimiter; - return vl.startsWith(r) || vl.indexOf(delimiter + r) >= 0; + return vl.startsWith(r) || vl.contains(delimiter + r); } public boolean removeValue(String res) { - String vl = get(); + return removeValueForProfile(getApplicationMode(), res); + } + + public boolean removeValueForProfile(ApplicationMode appMode, String res) { + String vl = getModeValue(appMode); String r = res + delimiter; if(vl != null) { if(vl.startsWith(r)) { vl = vl.substring(r.length()); - set(vl); + setModeValue(appMode, vl); return true; } else { int it = vl.indexOf(delimiter + r); if(it >= 0) { vl = vl.substring(0, it + delimiter.length()) + vl.substring(it + delimiter.length() + r.length()); } - set(vl); + setModeValue(appMode, vl); return true; } } @@ -1055,7 +1071,11 @@ public class OsmandSettings { } public List getStringsList() { - final String listAsString = get(); + return getStringsListForProfile(getApplicationMode()); + } + + public List getStringsListForProfile(ApplicationMode appMode) { + final String listAsString = getModeValue(appMode); if (listAsString != null) { if (listAsString.contains(delimiter)) { return Arrays.asList(listAsString.split(delimiter)); @@ -1069,13 +1089,17 @@ public class OsmandSettings { } public void setStringsList(List values) { + setStringsListForProfile(getApplicationMode(), values); + } + + public void setStringsListForProfile(ApplicationMode appMode, List values) { if (values == null || values.size() == 0) { - set(null); + setModeValue(appMode, null); return; } - clearAll(); + clearAllForProfile(appMode); for (String value : values) { - addValue(value); + addModeValue(appMode, value); } } } @@ -1261,6 +1285,9 @@ public class OsmandSettings { public final CommonPreference WIKI_ARTICLE_SHOW_IMAGES_ASKED = new BooleanPreference("wikivoyage_show_images_asked", false).makeGlobal(); public final CommonPreference WIKI_ARTICLE_SHOW_IMAGES = new EnumIntPreference<>("wikivoyage_show_imgs", WikiArticleShowImages.OFF, WikiArticleShowImages.values()).makeGlobal(); + public final CommonPreference SHOW_WIKIPEDIA_POI = new BooleanPreference("show_wikipedia_poi", false).makeProfile(); + public final CommonPreference GLOBAL_WIKIPEDIA_POI_ENABLED = new BooleanPreference("global_wikipedia_poi_enabled", false).makeProfile(); + public final ListStringPreference WIKIPEDIA_POI_ENABLED_LANGUAGES = (ListStringPreference) new ListStringPreference("wikipedia_poi_enabled_languages", null, ",,").makeProfile().cache(); public final CommonPreference SELECT_MARKER_ON_SINGLE_TAP = new BooleanPreference("select_marker_on_single_tap", false).makeProfile(); public final CommonPreference KEEP_PASSED_MARKERS_ON_MAP = new BooleanPreference("keep_passed_markers_on_map", true).makeProfile(); diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java b/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java index 84e1afd445..a112d0ed96 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java @@ -35,6 +35,7 @@ import net.osmand.plus.activities.MapActivity.ShowQuickSearchMode; import net.osmand.plus.helpers.GpxUiHelper; import net.osmand.plus.measurementtool.MeasurementToolLayer; import net.osmand.plus.poi.PoiFiltersHelper; +import net.osmand.plus.poi.PoiTemplateList; import net.osmand.plus.poi.PoiUIFilter; import net.osmand.plus.rastermaps.OsmandRasterMapsPlugin; import net.osmand.plus.render.MapVectorLayer; @@ -304,9 +305,9 @@ public class MapActivityLayers { if (filter.isStandardFilter()) { filter.removeUnsavedFilterByName(); } - getApplication().getPoiFilters().addSelectedPoiFilter(filter); + poiFilters.addSelectedPoiFilter(PoiTemplateList.POI, filter); } else { - getApplication().getPoiFilters().removeSelectedPoiFilter(filter); + poiFilters.removeSelectedPoiFilter(PoiTemplateList.POI, filter); } } mapView.refreshMap(); @@ -368,8 +369,8 @@ public class MapActivityLayers { if (pf.isStandardFilter()) { pf.removeUnsavedFilterByName(); } - getApplication().getPoiFilters().clearSelectedPoiFilters(); - getApplication().getPoiFilters().addSelectedPoiFilter(pf); + poiFilters.clearSelectedPoiFilters(PoiTemplateList.POI); + poiFilters.addSelectedPoiFilter(PoiTemplateList.POI, pf); mapView.refreshMap(); } } diff --git a/OsmAnd/src/net/osmand/plus/activities/search/SearchPOIActivity.java b/OsmAnd/src/net/osmand/plus/activities/search/SearchPOIActivity.java index b08b6348eb..cbc165ad99 100644 --- a/OsmAnd/src/net/osmand/plus/activities/search/SearchPOIActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/search/SearchPOIActivity.java @@ -58,6 +58,7 @@ import net.osmand.plus.activities.EditPOIFilterActivity; import net.osmand.plus.activities.MapActivity; import net.osmand.plus.activities.OsmandListActivity; import net.osmand.plus.poi.NominatimPoiFilter; +import net.osmand.plus.poi.PoiTemplateList; import net.osmand.plus.poi.PoiUIFilter; import net.osmand.plus.poi.PoiUIFilter.AmenityNameFilter; import net.osmand.plus.render.RenderingIcons; @@ -164,7 +165,7 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa public boolean onMenuItemClick(MenuItem item) { OsmandSettings settings = app.getSettings(); filter.setFilterByName(searchFilter.getText().toString().trim()); - app.getPoiFilters().addSelectedPoiFilter(filter); + app.getPoiFilters().addSelectedPoiFilter(PoiTemplateList.POI, filter); if (location != null) { settings.setMapLocationToShow(location.getLatitude(), location.getLongitude(), 15); } diff --git a/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/BottomSheetItemWithCompoundButton.java b/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/BottomSheetItemWithCompoundButton.java index 267ff16519..b106b8a2db 100644 --- a/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/BottomSheetItemWithCompoundButton.java +++ b/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/BottomSheetItemWithCompoundButton.java @@ -78,6 +78,10 @@ public class BottomSheetItemWithCompoundButton extends BottomSheetItemWithDescri this.compoundButtonColorId = compoundButtonColorId; } + public CompoundButton getCompoundButton() { + return compoundButton; + } + @Override public void inflate(Context context, ViewGroup container, boolean nightMode) { super.inflate(context, container, nightMode); diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java b/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java index 8815bd0e22..243750ecd8 100644 --- a/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java +++ b/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java @@ -84,6 +84,7 @@ import net.osmand.plus.views.DownloadedRegionsLayer; import net.osmand.plus.views.MapInfoLayer; import net.osmand.plus.views.OsmandMapTileView; import net.osmand.plus.views.mapwidgets.MapWidgetRegistry; +import net.osmand.plus.wikipedia.WikipediaPoiMenu; import java.lang.ref.WeakReference; import java.util.ArrayList; @@ -174,6 +175,7 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks, IRouteInfo MAPILLARY, CONTOUR_LINES, OSM_NOTES, + WIKIPEDIA, TERRAIN } @@ -321,6 +323,8 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks, IRouteInfo tv.setText(R.string.osm_notes); } else if (visibleType == DashboardType.TERRAIN) { tv.setText(R.string.shared_string_terrain); + } else if (visibleType == DashboardType.WIKIPEDIA) { + tv.setText(R.string.shared_string_wikipedia); } ImageView edit = (ImageView) dashboardView.findViewById(R.id.toolbar_edit); edit.setVisibility(View.GONE); @@ -676,7 +680,8 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks, IRouteInfo && visibleType != DashboardType.CONFIGURE_MAP && visibleType != DashboardType.CONTOUR_LINES && visibleType != DashboardType.TERRAIN - && visibleType != DashboardType.OSM_NOTES) { + && visibleType != DashboardType.OSM_NOTES + && visibleType != DashboardType.WIKIPEDIA) { listView.setDivider(dividerDrawable); listView.setDividerHeight(AndroidUtils.dpToPx(mapActivity, 1f)); } else { @@ -712,6 +717,8 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks, IRouteInfo cm = ContourLinesMenu.createListAdapter(mapActivity); } else if (visibleType == DashboardType.OSM_NOTES) { cm = OsmNotesMenu.createListAdapter(mapActivity); + } else if (visibleType == DashboardType.WIKIPEDIA) { + cm = WikipediaPoiMenu.createListAdapter(mapActivity); } if (cm != null) { updateListAdapter(cm); @@ -730,14 +737,17 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks, IRouteInfo } public void onNewDownloadIndexes() { - if (visibleType == DashboardType.CONTOUR_LINES || visibleType == DashboardType.TERRAIN) { + if (visibleType == DashboardType.CONTOUR_LINES + || visibleType == DashboardType.TERRAIN + || visibleType == DashboardType.WIKIPEDIA) { refreshContent(true); } } @SuppressWarnings("unchecked") public void onDownloadInProgress() { - if (visibleType == DashboardType.CONTOUR_LINES || visibleType == DashboardType.TERRAIN) { + if (visibleType == DashboardType.CONTOUR_LINES || visibleType == DashboardType.TERRAIN + || visibleType == DashboardType.WIKIPEDIA) { DownloadIndexesThread downloadThread = getMyApplication().getDownloadThread(); IndexItem downloadIndexItem = downloadThread.getCurrentDownloadingItem(); if (downloadIndexItem != null) { @@ -764,6 +774,8 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks, IRouteInfo } } SRTMPlugin.refreshMapComplete(mapActivity); + } else if (visibleType == DashboardType.WIKIPEDIA) { + refreshContent(true); } } diff --git a/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java b/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java index 4b991c2b8e..424d936d98 100644 --- a/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java +++ b/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java @@ -47,13 +47,16 @@ import net.osmand.plus.activities.MapActivity; import net.osmand.plus.activities.MapActivityLayers; import net.osmand.plus.activities.PluginActivity; import net.osmand.plus.activities.SettingsActivity; +import net.osmand.plus.dashboard.DashboardOnMap; import net.osmand.plus.inapp.InAppPurchaseHelper; import net.osmand.plus.poi.PoiFiltersHelper; +import net.osmand.plus.poi.PoiTemplateList; import net.osmand.plus.rastermaps.OsmandRasterMapsPlugin; import net.osmand.plus.render.RendererRegistry; import net.osmand.plus.srtmplugin.SRTMPlugin; import net.osmand.plus.views.OsmandMapTileView; import net.osmand.plus.views.corenative.NativeCoreContext; +import net.osmand.plus.wikipedia.WikipediaPoiMenu; import net.osmand.render.RenderingRule; import net.osmand.render.RenderingRuleProperty; import net.osmand.render.RenderingRuleStorageProperties; @@ -98,6 +101,7 @@ import static net.osmand.aidlapi.OsmAndCustomizationConstants.SHOW_CATEGORY_ID; import static net.osmand.aidlapi.OsmAndCustomizationConstants.TEXT_SIZE_ID; import static net.osmand.aidlapi.OsmAndCustomizationConstants.TRANSPORT_ID; import static net.osmand.aidlapi.OsmAndCustomizationConstants.TRANSPORT_RENDERING_ID; +import static net.osmand.aidlapi.OsmAndCustomizationConstants.WIKIPEDIA_ID; import static net.osmand.plus.srtmplugin.SRTMPlugin.CONTOUR_DENSITY_ATTR; import static net.osmand.plus.srtmplugin.SRTMPlugin.CONTOUR_LINES_ATTR; import static net.osmand.plus.srtmplugin.SRTMPlugin.CONTOUR_LINES_SCHEME_ATTR; @@ -195,6 +199,10 @@ public class ConfigureMapMenu { } else if (itemId == R.string.layer_gpx_layer && cm.getItem(pos).getSelected()) { showGpxSelectionDialog(adapter, adapter.getItem(pos)); return false; + } else if (itemId == R.string.shared_string_wikipedia) { + ma.getDashboard().setDashboardVisibility(true, DashboardOnMap.DashboardType.WIKIPEDIA, + AndroidUtils.getCenterViewCoordinates(view)); + return false; } else { CompoundButton btn = (CompoundButton) view.findViewById(R.id.toggle_item); if (btn != null && btn.getVisibility() == View.VISIBLE) { @@ -217,11 +225,12 @@ public class ConfigureMapMenu { item.setColorRes(isChecked ? R.color.osmand_orange : ContextMenuItem.INVALID_ID); } if (itemId == R.string.layer_poi) { - poiFiltersHelper.clearSelectedPoiFilters(); + poiFiltersHelper.clearSelectedPoiFilters(PoiTemplateList.POI); if (isChecked) { showPoiFilterDialog(adapter, adapter.getItem(pos)); } else { - adapter.getItem(pos).setDescription(poiFiltersHelper.getSelectedPoiFiltersName()); + adapter.getItem(pos).setDescription( + poiFiltersHelper.getSelectedPoiFiltersName(PoiTemplateList.POI)); } } else if (itemId == R.string.layer_amenity_label) { settings.SHOW_POI_LABEL.set(isChecked); @@ -235,6 +244,8 @@ public class ConfigureMapMenu { } else { showGpxSelectionDialog(adapter, adapter.getItem(pos)); } + } else if (itemId == R.string.shared_string_wikipedia) { + WikipediaPoiMenu.toggleWikipediaPoi(ma, isChecked, true); } else if (itemId == R.string.map_markers) { settings.SHOW_MAP_MARKERS.set(isChecked); } else if (itemId == R.string.layer_map) { @@ -278,14 +289,14 @@ public class ConfigureMapMenu { @Override public void dismiss() { PoiFiltersHelper pf = ma.getMyApplication().getPoiFilters(); - boolean selected = pf.isShowingAnyPoi(); + boolean selected = pf.isShowingAnyPoi(PoiTemplateList.POI); item.setSelected(selected); - item.setDescription(pf.getSelectedPoiFiltersName()); + item.setDescription(pf.getSelectedPoiFiltersName(PoiTemplateList.POI)); item.setColorRes(selected ? R.color.osmand_orange : ContextMenuItem.INVALID_ID); adapter.notifyDataSetChanged(); } }; - if (poiFiltersHelper.getSelectedPoiFilters().size() > 1) { + if (poiFiltersHelper.isShowingAnyPoi(PoiTemplateList.POI)) { ma.getMapLayers().showMultichoicePoiFilterDialog(ma.getMapView(), dismissListener); } else { @@ -315,12 +326,12 @@ public class ConfigureMapMenu { .setColor(selected ? R.color.osmand_orange : ContextMenuItem.INVALID_ID) .setIcon(R.drawable.ic_action_fav_dark) .setListener(l).createItem()); - selected = app.getPoiFilters().isShowingAnyPoi(); + selected = app.getPoiFilters().isShowingAnyPoi(PoiTemplateList.POI); adapter.addItem(new ContextMenuItem.ItemBuilder() .setId(POI_OVERLAY_ID) .setTitleId(R.string.layer_poi, activity) .setSelected(selected) - .setDescription(app.getPoiFilters().getSelectedPoiFiltersName()) + .setDescription(app.getPoiFilters().getSelectedPoiFiltersName(PoiTemplateList.POI)) .setColor(selected ? R.color.osmand_orange : ContextMenuItem.INVALID_ID) .setIcon(R.drawable.ic_action_info_dark) .setSecondaryIcon(R.drawable.ic_action_additional_option) @@ -526,6 +537,16 @@ public class ConfigureMapMenu { .setSecondaryIcon(R.drawable.ic_action_additional_option) .setListener(l).createItem()); + selected = settings.SHOW_WIKIPEDIA_POI.get(); + adapter.addItem(new ContextMenuItem.ItemBuilder() + .setId(WIKIPEDIA_ID) + .setTitleId(R.string.shared_string_wikipedia, activity) + .setSelected(selected) + .setColor(selected ? R.color.osmand_orange : ContextMenuItem.INVALID_ID) + .setIcon(R.drawable.ic_plugin_wikipedia) + .setSecondaryIcon(R.drawable.ic_action_additional_option) + .setListener(l).createItem()); + selected = settings.SHOW_MAP_MARKERS.get(); adapter.addItem(new ContextMenuItem.ItemBuilder() .setId(MAP_MARKERS_ID) diff --git a/OsmAnd/src/net/osmand/plus/helpers/WaypointHelper.java b/OsmAnd/src/net/osmand/plus/helpers/WaypointHelper.java index 7f51847964..6443915ab3 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/WaypointHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/WaypointHelper.java @@ -25,6 +25,7 @@ import net.osmand.plus.TargetPointsHelper.TargetPoint; import net.osmand.plus.UiUtilities; import net.osmand.plus.activities.IntermediatePointsDialog; import net.osmand.plus.base.FavoriteImageDrawable; +import net.osmand.plus.poi.PoiTemplateList; import net.osmand.plus.poi.PoiUIFilter; import net.osmand.plus.render.RenderingIcons; import net.osmand.plus.routing.AlarmInfo; diff --git a/OsmAnd/src/net/osmand/plus/poi/PoiFiltersHelper.java b/OsmAnd/src/net/osmand/plus/poi/PoiFiltersHelper.java index 9bfc82dfdd..90447f2bf4 100644 --- a/OsmAnd/src/net/osmand/plus/poi/PoiFiltersHelper.java +++ b/OsmAnd/src/net/osmand/plus/poi/PoiFiltersHelper.java @@ -1,5 +1,7 @@ package net.osmand.plus.poi; +import android.os.Bundle; + import androidx.annotation.NonNull; import net.osmand.osm.AbstractPoiType; @@ -7,10 +9,12 @@ import net.osmand.osm.MapPoiTypes; import net.osmand.osm.PoiCategory; import net.osmand.osm.PoiType; import net.osmand.plus.OsmandApplication; +import net.osmand.plus.OsmandSettings; import net.osmand.plus.R; import net.osmand.plus.api.SQLiteAPI.SQLiteConnection; import net.osmand.plus.api.SQLiteAPI.SQLiteCursor; import net.osmand.plus.api.SQLiteAPI.SQLiteStatement; +import net.osmand.plus.wikipedia.WikipediaPoiMenu; import net.osmand.util.Algorithms; import java.util.ArrayList; @@ -22,8 +26,10 @@ import java.util.Iterator; import java.util.LinkedHashMap; import java.util.LinkedHashSet; import java.util.List; +import java.util.Locale; import java.util.Map; import java.util.Set; +import java.util.TreeMap; import java.util.TreeSet; public class PoiFiltersHelper { @@ -37,8 +43,9 @@ public class PoiFiltersHelper { private PoiUIFilter customPOIFilter; private PoiUIFilter showAllPOIFilter; private PoiUIFilter localWikiPoiFilter; + private PoiUIFilter globalWikiPoiFilter; private List cacheTopStandardFilters; - private Set selectedPoiFilters = new TreeSet<>(); + private Map> selectedPoiFilters = new TreeMap<>(); private static final String UDF_CAR_AID = "car_aid"; private static final String UDF_FOR_TOURISTS = "for_tourists"; @@ -115,6 +122,42 @@ public class PoiFiltersHelper { return localWikiPoiFilter; } + public PoiUIFilter getGlobalWikiPoiFilter() { + if (globalWikiPoiFilter == null) { + String wikiFilterId = PoiUIFilter.STD_PREFIX + "osmwiki"; + for (PoiUIFilter filter : getTopDefinedPoiFilters()) { + if (wikiFilterId.equals(filter.getFilterId())) { + globalWikiPoiFilter = filter; + break; + } + } + } + return globalWikiPoiFilter; + } + + public List getWikiPOIFilters() { + List cacheWikipediaFilters = new ArrayList<>(); + List enabledLanguages = null; + Bundle wikiPoiSettings = WikipediaPoiMenu.getWikiPoiSettings(application); + if (wikiPoiSettings != null) { + enabledLanguages = wikiPoiSettings.getStringArrayList(WikipediaPoiMenu.ENABLED_WIKI_POI_LANGUAGES_KEY); + } + if (enabledLanguages != null) { + for (String language : enabledLanguages) { + PoiType place = application.getPoiTypes().getPoiTypeByKey("wiki_place"); + if (place != null) { + String locale = new Locale(language).getLanguage(); + PoiUIFilter filter = new PoiUIFilter(place, application, " " + + application.getLangTranslation(locale)); + filter.setSavedFilterByName("wiki:lang:" + locale); + filter.setStandardFilter(true); + cacheWikipediaFilters.add(filter); + } + } + } + return cacheWikipediaFilters; + } + public PoiUIFilter getShowAllPOIFilter() { if (showAllPOIFilter == null) { PoiUIFilter filter = new PoiUIFilter(null, application, ""); @@ -159,8 +202,13 @@ public class PoiFiltersHelper { return f; } } + for (PoiUIFilter f : getWikiPOIFilters()) { + if (f.getFilterId().equals(filterId)) { + return f; + } + } PoiUIFilter ff = getFilterById(filterId, getCustomPOIFilter(), getSearchByNamePOIFilter(), - getLocalWikiPOIFilter(), getShowAllPOIFilter(), getNominatimPOIFilter(), getNominatimAddressFilter()); + getGlobalWikiPoiFilter(), getShowAllPOIFilter(), getNominatimPOIFilter(), getNominatimAddressFilter()); if (ff != null) { return ff; } @@ -225,9 +273,6 @@ public class PoiFiltersHelper { List top = new ArrayList<>(); // user defined top.addAll(getUserDefinedPoiFilters(true)); - if (getLocalWikiPOIFilter() != null) { - top.add(getLocalWikiPOIFilter()); - } // default MapPoiTypes poiTypes = application.getPoiTypes(); for (AbstractPoiType t : poiTypes.getTopVisibleFilters()) { @@ -258,7 +303,11 @@ public class PoiFiltersHelper { public List getSortedPoiFilters(boolean onlyActive) { initPoiUIFiltersState(); List allFilters = new ArrayList<>(); - allFilters.addAll(getTopDefinedPoiFilters()); + for (PoiUIFilter filter : getTopDefinedPoiFilters()) { + if (!filter.isWikiFilter()) { + allFilters.add(filter); + } + } allFilters.addAll(getSearchPoiFilters()); Collections.sort(allFilters); if (onlyActive) { @@ -421,28 +470,70 @@ public class PoiFiltersHelper { return false; } - @NonNull public Set getSelectedPoiFilters() { - return selectedPoiFilters; + Set result = new TreeSet<>(); + for (Set template : selectedPoiFilters.values()) { + if (template != null) { + result.addAll(template); + } + } + return result; } - public void addSelectedPoiFilter(PoiUIFilter filter) { - selectedPoiFilters.add(filter); + @NonNull + public Set getSelectedPoiFilters(PoiTemplateList type) { + Set result = selectedPoiFilters.get(type); + if (result == null) { + return new TreeSet<>(); + } + return result; + } + + public void addSelectedPoiFilter(PoiTemplateList type, PoiUIFilter filter) { + if (!selectedPoiFilters.containsKey(type)) { + selectedPoiFilters.put(type, new TreeSet()); + } + Set templateFilters = selectedPoiFilters.get(type); + if (templateFilters != null) { + templateFilters.add(filter); + } saveSelectedPoiFilters(); } - public void removeSelectedPoiFilter(PoiUIFilter filter) { - selectedPoiFilters.remove(filter); + public void removeSelectedPoiFilter(PoiTemplateList type, PoiUIFilter filter) { + if (selectedPoiFilters.containsKey(type)) { + Set templateFilters = selectedPoiFilters.get(type); + if (templateFilters != null) { + templateFilters.remove(filter); + } + } saveSelectedPoiFilters(); } public boolean isShowingAnyPoi() { - return !selectedPoiFilters.isEmpty(); + for (PoiTemplateList type : selectedPoiFilters.keySet()) { + if (isShowingAnyPoi(type)) { + return true; + } + } + return false; + } + + public boolean isShowingAnyPoi(PoiTemplateList type) { + return !getSelectedPoiFilters(type).isEmpty(); } public void clearSelectedPoiFilters() { - selectedPoiFilters.clear(); - saveSelectedPoiFilters(); + for (PoiTemplateList t : selectedPoiFilters.keySet()) { + clearSelectedPoiFilters(t); + } + } + + public void clearSelectedPoiFilters(PoiTemplateList type) { + Set templateFilters = selectedPoiFilters.get(type); + if (templateFilters != null) { + templateFilters.clear(); + } } public void hidePoiFilters() { @@ -461,18 +552,23 @@ public class PoiFiltersHelper { } } - public String getSelectedPoiFiltersName() { - return getFiltersName(selectedPoiFilters); + public String getSelectedPoiFiltersName(PoiTemplateList type) { + return getFiltersName(getSelectedPoiFilters(type)); } public boolean isPoiFilterSelected(PoiUIFilter filter) { - return selectedPoiFilters.contains(filter); + for (Set template : selectedPoiFilters.values()) { + return template.contains(filter); + } + return false; } public boolean isPoiFilterSelected(String filterId) { - for (PoiUIFilter filter : selectedPoiFilters) { - if (filter.filterId.equals(filterId)) { - return true; + for (Set template : selectedPoiFilters.values()) { + for (PoiUIFilter filter : template) { + if (filter.filterId.equals(filterId)) { + return true; + } } } return false; @@ -480,19 +576,29 @@ public class PoiFiltersHelper { public void loadSelectedPoiFilters() { selectedPoiFilters.clear(); - Set filters = application.getSettings().getSelectedPoiFilters(); + OsmandSettings settings = application.getSettings(); + Set filters = settings.getSelectedPoiFilters(); + boolean shouldShowWikiPoi = WikipediaPoiMenu.isWikiPoiEnabled(application); for (String f : filters) { PoiUIFilter filter = getFilterById(f); if (filter != null) { - selectedPoiFilters.add(filter); + if (filter.isWikiFilter()) { + if (shouldShowWikiPoi) { + addSelectedPoiFilter(PoiTemplateList.WIKI, filter); + } + } else { + addSelectedPoiFilter(PoiTemplateList.POI, filter); + } } } } private void saveSelectedPoiFilters() { Set filters = new HashSet<>(); - for (PoiUIFilter f : selectedPoiFilters) { - filters.add(f.filterId); + for (Set template : selectedPoiFilters.values()) { + for (PoiUIFilter filter : template) { + filters.add(filter.filterId); + } } application.getSettings().setSelectedPoiFilters(filters); } diff --git a/OsmAnd/src/net/osmand/plus/poi/PoiTemplateList.java b/OsmAnd/src/net/osmand/plus/poi/PoiTemplateList.java new file mode 100644 index 0000000000..59a790b3ab --- /dev/null +++ b/OsmAnd/src/net/osmand/plus/poi/PoiTemplateList.java @@ -0,0 +1,5 @@ +package net.osmand.plus.poi; + +public enum PoiTemplateList { + POI, WIKI +} \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/poi/PoiUIFilter.java b/OsmAnd/src/net/osmand/plus/poi/PoiUIFilter.java index 7efaf867ef..5afdd742cc 100644 --- a/OsmAnd/src/net/osmand/plus/poi/PoiUIFilter.java +++ b/OsmAnd/src/net/osmand/plus/poi/PoiUIFilter.java @@ -146,6 +146,10 @@ public class PoiUIFilter implements SearchPoiTypeFilter, Comparable this.deleted = deleted; } + public boolean isWikiFilter() { + return filterId.startsWith(STD_PREFIX + "wiki_place") || filterId.equals(STD_PREFIX + "osmwiki"); + } + public String getFilterByName() { return filterByName; } diff --git a/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHidePoiAction.java b/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHidePoiAction.java index 2e985e9fd0..8186951771 100644 --- a/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHidePoiAction.java +++ b/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHidePoiAction.java @@ -23,6 +23,7 @@ import net.osmand.plus.R; import net.osmand.plus.UiUtilities; import net.osmand.plus.activities.MapActivity; import net.osmand.plus.poi.PoiFiltersHelper; +import net.osmand.plus.poi.PoiTemplateList; import net.osmand.plus.poi.PoiUIFilter; import net.osmand.plus.quickaction.QuickAction; import net.osmand.plus.quickaction.QuickActionType; @@ -112,18 +113,18 @@ public class ShowHidePoiAction extends QuickAction { PoiFiltersHelper pf = activity.getMyApplication().getPoiFilters(); List poiFilters = loadPoiFilters(activity.getMyApplication().getPoiFilters()); - if (!isCurrentFilters(pf.getSelectedPoiFilters(), poiFilters)) { + if (!isCurrentFilters(pf.getSelectedPoiFilters(PoiTemplateList.POI), poiFilters)) { - pf.clearSelectedPoiFilters(); + pf.clearSelectedPoiFilters(PoiTemplateList.POI); for (PoiUIFilter filter : poiFilters) { if (filter.isStandardFilter()) { filter.removeUnsavedFilterByName(); } - pf.addSelectedPoiFilter(filter); + pf.addSelectedPoiFilter(PoiTemplateList.POI, filter); } - } else pf.clearSelectedPoiFilters(); + } else pf.clearSelectedPoiFilters(PoiTemplateList.POI); activity.getMapLayers().updateLayers(activity.getMapView()); } @@ -133,7 +134,7 @@ public class ShowHidePoiAction extends QuickAction { PoiFiltersHelper pf = application.getPoiFilters(); List poiFilters = loadPoiFilters(application.getPoiFilters()); - return isCurrentFilters(pf.getSelectedPoiFilters(), poiFilters); + return isCurrentFilters(pf.getSelectedPoiFilters(PoiTemplateList.POI), poiFilters); } private boolean isCurrentFilters(Set currentPoiFilters, List poiFilters) { diff --git a/OsmAnd/src/net/osmand/plus/routepreparationmenu/MapRouteInfoMenu.java b/OsmAnd/src/net/osmand/plus/routepreparationmenu/MapRouteInfoMenu.java index 754c1ee4b0..81f0f6a3d0 100644 --- a/OsmAnd/src/net/osmand/plus/routepreparationmenu/MapRouteInfoMenu.java +++ b/OsmAnd/src/net/osmand/plus/routepreparationmenu/MapRouteInfoMenu.java @@ -70,6 +70,7 @@ import net.osmand.plus.helpers.GpxUiHelper; import net.osmand.plus.helpers.WaypointHelper; import net.osmand.plus.mapcontextmenu.other.TrackDetailsMenuFragment; import net.osmand.plus.mapmarkers.MapMarkerSelectionFragment; +import net.osmand.plus.poi.PoiTemplateList; import net.osmand.plus.poi.PoiUIFilter; import net.osmand.plus.profiles.AppModesBottomSheetDialogFragment; import net.osmand.plus.profiles.ConfigureAppModesBottomSheetDialogFragment; @@ -1149,7 +1150,7 @@ public class MapRouteInfoMenu implements IRouteInformationListener, CardListener private void createShowAlongTheRouteItems(MapActivity mapActivity, LinearLayout optionsContainer) { OsmandApplication app = mapActivity.getMyApplication(); final ApplicationMode applicationMode = app.getRoutingHelper().getAppMode(); - final Set poiFilters = app.getPoiFilters().getSelectedPoiFilters(); + final Set poiFilters = app.getPoiFilters().getSelectedPoiFilters(PoiTemplateList.POI); final boolean traffic = app.getSettings().SHOW_TRAFFIC_WARNINGS.getModeValue(applicationMode); final boolean fav = app.getSettings().SHOW_NEARBY_FAVORITES.getModeValue(applicationMode); if (!poiFilters.isEmpty()) { @@ -1175,7 +1176,7 @@ public class MapRouteInfoMenu implements IRouteInformationListener, CardListener public void onClick(View v) { MapActivity mapActivity = getMapActivity(); if (mapActivity != null) { - mapActivity.getMyApplication().getPoiFilters().removeSelectedPoiFilter(poiUIFilter); + mapActivity.getMyApplication().getPoiFilters().removeSelectedPoiFilter(PoiTemplateList.POI, poiUIFilter); mapActivity.getMapView().refreshMap(); updateOptionsButtons(); } diff --git a/OsmAnd/src/net/osmand/plus/routepreparationmenu/ShowAlongTheRouteBottomSheet.java b/OsmAnd/src/net/osmand/plus/routepreparationmenu/ShowAlongTheRouteBottomSheet.java index 2e181db52a..466d18cd40 100644 --- a/OsmAnd/src/net/osmand/plus/routepreparationmenu/ShowAlongTheRouteBottomSheet.java +++ b/OsmAnd/src/net/osmand/plus/routepreparationmenu/ShowAlongTheRouteBottomSheet.java @@ -36,6 +36,7 @@ import net.osmand.plus.base.bottomsheetmenu.SimpleBottomSheetItem; import net.osmand.plus.base.bottomsheetmenu.simpleitems.SimpleDividerItem; import net.osmand.plus.helpers.WaypointDialogHelper; import net.osmand.plus.helpers.WaypointHelper; +import net.osmand.plus.poi.PoiTemplateList; import net.osmand.plus.poi.PoiUIFilter; import net.osmand.plus.routing.IRouteInformationListener; import net.osmand.plus.routing.IRoutingDataUpdateListener; @@ -433,7 +434,8 @@ public class ShowAlongTheRouteBottomSheet extends MenuBottomSheetDialogFragment View v; if (type == WaypointHelper.POI) { v = themedInflater.inflate(R.layout.along_the_route_radius_poi, null); - String descEx = !app.getPoiFilters().isShowingAnyPoi() ? getString(R.string.poi) : app.getPoiFilters().getSelectedPoiFiltersName(); + String descEx = !app.getPoiFilters().isShowingAnyPoi(PoiTemplateList.POI) ? + getString(R.string.poi) : app.getPoiFilters().getSelectedPoiFiltersName(PoiTemplateList.POI); ((TextView) v.findViewById(R.id.title)).setText(getString(R.string.search_radius_proximity) + ":"); ((TextView) v.findViewById(R.id.titleEx)).setText(getString(R.string.shared_string_type) + ":"); final TextView radiusEx = (TextView) v.findViewById(R.id.descriptionEx); @@ -483,7 +485,7 @@ public class ShowAlongTheRouteBottomSheet extends MenuBottomSheetDialogFragment new MapActivityLayers.DismissListener() { @Override public void dismiss() { - if (app.getPoiFilters().isShowingAnyPoi()) { + if (app.getPoiFilters().isShowingAnyPoi(PoiTemplateList.POI)) { enableType(type, enable); } } diff --git a/OsmAnd/src/net/osmand/plus/search/QuickSearchDialogFragment.java b/OsmAnd/src/net/osmand/plus/search/QuickSearchDialogFragment.java index 9d25e244cd..91cd25a83d 100644 --- a/OsmAnd/src/net/osmand/plus/search/QuickSearchDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/search/QuickSearchDialogFragment.java @@ -79,6 +79,7 @@ import net.osmand.plus.activities.MapActivity; import net.osmand.plus.activities.MapActivity.ShowQuickSearchMode; import net.osmand.plus.helpers.SearchHistoryHelper; import net.osmand.plus.helpers.SearchHistoryHelper.HistoryEntry; +import net.osmand.plus.poi.PoiTemplateList; import net.osmand.plus.poi.PoiUIFilter; import net.osmand.plus.poi.RearrangePoiFiltersFragment; import net.osmand.plus.resources.RegionAddressRepository; @@ -383,8 +384,8 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC } else { filter = (PoiUIFilter) searchPhrase.getLastSelectedWord().getResult().object; } - app.getPoiFilters().clearSelectedPoiFilters(); - app.getPoiFilters().addSelectedPoiFilter(filter); + app.getPoiFilters().clearSelectedPoiFilters(PoiTemplateList.POI); + app.getPoiFilters().addSelectedPoiFilter(PoiTemplateList.POI, filter); mapActivity.getContextMenu().closeActiveToolbar(); showToolbar(); @@ -861,7 +862,7 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC } public void closeSearch() { - app.getPoiFilters().clearSelectedPoiFilters(); + app.getPoiFilters().clearSelectedPoiFilters(PoiTemplateList.POI); dismiss(); } diff --git a/OsmAnd/src/net/osmand/plus/search/QuickSearchHelper.java b/OsmAnd/src/net/osmand/plus/search/QuickSearchHelper.java index fd13f09dc1..93b4c3127a 100644 --- a/OsmAnd/src/net/osmand/plus/search/QuickSearchHelper.java +++ b/OsmAnd/src/net/osmand/plus/search/QuickSearchHelper.java @@ -27,6 +27,7 @@ import net.osmand.plus.helpers.SearchHistoryHelper; import net.osmand.plus.helpers.SearchHistoryHelper.HistoryEntry; import net.osmand.plus.poi.NominatimPoiFilter; import net.osmand.plus.poi.PoiFiltersHelper; +import net.osmand.plus.poi.PoiTemplateList; import net.osmand.plus.poi.PoiUIFilter; import net.osmand.plus.resources.ResourceManager.ResourceListener; import net.osmand.plus.views.mapwidgets.MapInfoWidgetsFactory.TopToolbarController; @@ -502,8 +503,8 @@ public class QuickSearchHelper implements ResourceListener { }); controller.setTitle(filter.getName()); PoiFiltersHelper helper = mapActivity.getMyApplication().getPoiFilters(); - helper.clearSelectedPoiFilters(); - helper.addSelectedPoiFilter(filter); + helper.clearSelectedPoiFilters(PoiTemplateList.POI); + helper.addSelectedPoiFilter(PoiTemplateList.POI, filter); mapActivity.showTopToolbar(controller); mapActivity.refreshMap(); } @@ -512,7 +513,7 @@ public class QuickSearchHelper implements ResourceListener { @NonNull TopToolbarController controller, @Nullable Runnable action) { mapActivity.hideTopToolbar(controller); - mapActivity.getMyApplication().getPoiFilters().clearSelectedPoiFilters(); + mapActivity.getMyApplication().getPoiFilters().clearSelectedPoiFilters(PoiTemplateList.POI); mapActivity.refreshMap(); if (action != null) { action.run(); diff --git a/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java b/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java index ebb3efa034..ba7a9eee85 100644 --- a/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java @@ -39,6 +39,7 @@ import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; import net.osmand.plus.activities.MapActivity; import net.osmand.plus.helpers.WaypointHelper; +import net.osmand.plus.poi.PoiTemplateList; import net.osmand.plus.poi.PoiUIFilter; import net.osmand.plus.render.RenderingIcons; import net.osmand.plus.routing.IRouteInformationListener; diff --git a/OsmAnd/src/net/osmand/plus/wikipedia/SelectWikiLanguagesBottomSheet.java b/OsmAnd/src/net/osmand/plus/wikipedia/SelectWikiLanguagesBottomSheet.java new file mode 100644 index 0000000000..474cac110c --- /dev/null +++ b/OsmAnd/src/net/osmand/plus/wikipedia/SelectWikiLanguagesBottomSheet.java @@ -0,0 +1,275 @@ +package net.osmand.plus.wikipedia; + +import android.graphics.drawable.Drawable; +import android.os.Bundle; +import android.view.View; +import android.widget.CompoundButton; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.core.content.ContextCompat; + +import net.osmand.AndroidUtils; +import net.osmand.CallbackWithObject; +import net.osmand.osm.MapPoiTypes; +import net.osmand.osm.PoiCategory; +import net.osmand.osm.PoiType; +import net.osmand.plus.ApplicationMode; +import net.osmand.plus.OsmandApplication; +import net.osmand.plus.OsmandSettings; +import net.osmand.plus.R; +import net.osmand.plus.UiUtilities; +import net.osmand.plus.activities.MapActivity; +import net.osmand.plus.base.MenuBottomSheetDialogFragment; +import net.osmand.plus.base.bottomsheetmenu.BottomSheetItemWithCompoundButton; +import net.osmand.plus.base.bottomsheetmenu.simpleitems.DividerSpaceItem; +import net.osmand.plus.base.bottomsheetmenu.simpleitems.LongDescriptionItem; +import net.osmand.plus.base.bottomsheetmenu.simpleitems.TitleItem; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import static net.osmand.plus.wikipedia.WikipediaPoiMenu.ENABLED_WIKI_POI_LANGUAGES_KEY; +import static net.osmand.plus.wikipedia.WikipediaPoiMenu.GLOBAL_WIKI_POI_ENABLED_KEY; + +public class SelectWikiLanguagesBottomSheet extends MenuBottomSheetDialogFragment { + + public static final String TAG = SelectWikiLanguagesBottomSheet.class.getSimpleName(); + + private OsmandApplication app; + private ApplicationMode appMode; + private OsmandSettings settings; + + private List languageItems; + + private ArrayList languages; + private CallbackWithObject languageChangedCallback; + private boolean isGlobalWikiPoiEnabled = false; + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + app = requiredMyApplication(); + settings = app.getSettings(); + initLanguagesData(); + } + + @Override + public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { + super.onViewCreated(view, savedInstanceState); + setLanguageListEnable(!isGlobalWikiPoiEnabled); + } + + @Override + public void createMenuItems(Bundle savedInstanceState) { + + boolean nightMode = isNightMode(app); + final int activeColorResId = AndroidUtils.resolveAttribute(app, R.attr.active_color_basic); + final int profileColorResId = appMode.getIconColorInfo().getColor(nightMode); + + final int paddingSmall = app.getResources().getDimensionPixelSize(R.dimen.content_padding_small); + final int paddingHalf = app.getResources().getDimensionPixelSize(R.dimen.content_padding_half); + + items.add(new TitleItem(getString(R.string.shared_string_languages))); + items.add(new LongDescriptionItem(getString(R.string.wikipedia_poi_languages_promo))); + items.add(new DividerSpaceItem(app, paddingSmall)); + + final BottomSheetItemWithCompoundButton[] btnSelectAll = new BottomSheetItemWithCompoundButton[1]; + btnSelectAll[0] = (BottomSheetItemWithCompoundButton) new BottomSheetItemWithCompoundButton.Builder() + .setChecked(this.isGlobalWikiPoiEnabled) + .setCompoundButtonColorId(profileColorResId) + .setTitle(getString(R.string.shared_string_all_languages)) + .setTitleColorId(activeColorResId) + .setCustomView(getCustomButtonView()) + .setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + isGlobalWikiPoiEnabled = !isGlobalWikiPoiEnabled; + btnSelectAll[0].setChecked(isGlobalWikiPoiEnabled); + setLanguageListEnable(!isGlobalWikiPoiEnabled); + } + }) + .create(); + items.add(btnSelectAll[0]); + items.add(new DividerSpaceItem(app, paddingHalf)); + + languageItems = new ArrayList<>(); + for (final WikiLanguageItem language : languages) { + final BottomSheetItemWithCompoundButton[] languageItem = new BottomSheetItemWithCompoundButton[1]; + languageItem[0] = (BottomSheetItemWithCompoundButton) new BottomSheetItemWithCompoundButton.Builder() + .setChecked(language.isChecked()) + .setTitle(language.getTitle()) + .setLayoutId(R.layout.bottom_sheet_item_title_with_checkbox) + .setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + boolean newValue = !languageItem[0].isChecked(); + language.setChecked(newValue); + } + }) + .create(); + languageItems.add(languageItem[0]); + language.setOnCheckLanguageCallback(new CallbackWithObject() { + @Override + public boolean processResult(Boolean result) { + languageItem[0].setChecked(result); + return true; + } + }); + } + items.addAll(languageItems); + } + + private void initLanguagesData() { + languages = new ArrayList<>(); + + Bundle wikiPoiSettings = WikipediaPoiMenu.getWikiPoiSettings(app); + List activatedLocales = null; + if (wikiPoiSettings != null) { + isGlobalWikiPoiEnabled = wikiPoiSettings.getBoolean(GLOBAL_WIKI_POI_ENABLED_KEY); + activatedLocales = wikiPoiSettings.getStringArrayList(ENABLED_WIKI_POI_LANGUAGES_KEY); + } + + PoiCategory osmwiki = app.getPoiTypes().getOsmwiki(); + if (activatedLocales != null) { + for (PoiType type : osmwiki.getPoiTypeByKeyName("wiki_place").getPoiAdditionals()) { + String name = type.getKeyName(); + if (name != null && name.startsWith(MapPoiTypes.WIKI_LANG_KEY_PREFFIX)) { + String locale = name.substring(MapPoiTypes.WIKI_LANG_KEY_PREFFIX.length()); + boolean checked = activatedLocales.contains(locale); + languages.add(new WikiLanguageItem(locale, app.getLangTranslation(locale), checked)); + } + } + } else { + for (PoiType type : osmwiki.getPoiTypeByKeyName("wiki_place").getPoiAdditionals()) { + String name = type.getKeyName(); + if (name != null && name.startsWith(MapPoiTypes.WIKI_LANG_KEY_PREFFIX)) { + String locale = name.substring(MapPoiTypes.WIKI_LANG_KEY_PREFFIX.length()); + languages.add(new WikiLanguageItem(locale, app.getLangTranslation(locale), false)); + } + } + } + + Collections.sort(languages); + } + + private void setLanguageListEnable(boolean enable) { + int textColorPrimaryId = nightMode ? R.color.text_color_primary_dark : R.color.text_color_primary_light; + int disableColorId = nightMode ? R.color.active_buttons_and_links_text_disabled_dark : R.color.active_buttons_and_links_text_disabled_light; + int profileColorId = appMode.getIconColorInfo().getColor(nightMode); + for (BottomSheetItemWithCompoundButton item : languageItems) { + item.getView().setEnabled(enable); + item.setTitleColorId(enable ? textColorPrimaryId : disableColorId); + CompoundButton cb = item.getCompoundButton(); + if (cb != null) { + cb.setEnabled(enable); + UiUtilities.setupCompoundButton(nightMode, ContextCompat.getColor(app, enable ? profileColorId : disableColorId), cb); + } + } + } + + @Override + protected int getRightBottomButtonTextId() { + return R.string.shared_string_apply; + } + + @Override + protected void onRightBottomButtonClick() { + super.onRightBottomButtonClick(); + List localesForSaving = new ArrayList<>(); + for (WikiLanguageItem language : languages) { + if (language.isChecked()) { + localesForSaving.add(language.getLocale()); + } + } + settings.WIKIPEDIA_POI_ENABLED_LANGUAGES.setStringsListForProfile(appMode, localesForSaving); + settings.GLOBAL_WIKIPEDIA_POI_ENABLED.setModeValue(appMode, isGlobalWikiPoiEnabled); + if (languageChangedCallback != null) { + languageChangedCallback.processResult(true); + } + dismiss(); + } + + private View getCustomButtonView() { + OsmandApplication app = getMyApplication(); + if (app == null) { + return null; + } + View buttonView = UiUtilities.getInflater(getContext(), nightMode).inflate(R.layout.bottom_sheet_item_title_with_swith_56dp, null); + CompoundButton cb = buttonView.findViewById(R.id.compound_button); + + int color = AndroidUtils.getColorFromAttr(app, R.attr.divider_color_basic); + int bgColor = UiUtilities.getColorWithAlpha(color, 0.5f); + + int bgResId = R.drawable.rectangle_rounded_right; + Drawable bgDrawable = app.getUIUtilities().getPaintedIcon(bgResId, bgColor); + AndroidUtils.setBackground(buttonView, bgDrawable); + + int selectedModeColorId = appMode.getIconColorInfo().getColor(nightMode); + UiUtilities.setupCompoundButton(nightMode, selectedModeColorId, cb); + + return buttonView; + } + + public void setAppMode(ApplicationMode appMode) { + this.appMode = appMode; + } + + public void setLanguageChangedCallback(CallbackWithObject languageChangedCallback) { + this.languageChangedCallback = languageChangedCallback; + } + + private class WikiLanguageItem implements Comparable { + private String locale; + private String title; + private boolean checked; + private CallbackWithObject onCheckLanguageCallback; + + public WikiLanguageItem(String locale, String title, boolean checked) { + this.locale = locale; + this.title = title; + this.checked = checked; + } + + public String getLocale() { + return locale; + } + + public boolean isChecked() { + return checked; + } + + public void setChecked(boolean checked) { + this.checked = checked; + if (onCheckLanguageCallback != null) { + onCheckLanguageCallback.processResult(checked); + } + } + + public void setOnCheckLanguageCallback(CallbackWithObject onCheckLanguageCallback) { + this.onCheckLanguageCallback = onCheckLanguageCallback; + } + + public String getTitle() { + return title; + } + + + @Override + public int compareTo(WikiLanguageItem other) { + return this.title.compareToIgnoreCase(other.title); + } + } + + public static void showInstance(@NonNull MapActivity mapActivity, + @NonNull ApplicationMode appMode, + boolean usedOnMap, + CallbackWithObject callback) { + SelectWikiLanguagesBottomSheet fragment = new SelectWikiLanguagesBottomSheet(); + fragment.setAppMode(appMode); + fragment.setUsedOnMap(usedOnMap); + fragment.setLanguageChangedCallback(callback); + fragment.show(mapActivity.getSupportFragmentManager(), SelectWikiLanguagesBottomSheet.TAG); + } +} diff --git a/OsmAnd/src/net/osmand/plus/wikipedia/WikipediaPoiMenu.java b/OsmAnd/src/net/osmand/plus/wikipedia/WikipediaPoiMenu.java new file mode 100644 index 0000000000..58df48ee63 --- /dev/null +++ b/OsmAnd/src/net/osmand/plus/wikipedia/WikipediaPoiMenu.java @@ -0,0 +1,348 @@ +package net.osmand.plus.wikipedia; + +import android.os.Bundle; +import android.view.View; +import android.widget.ArrayAdapter; + +import androidx.annotation.NonNull; + +import net.osmand.AndroidUtils; +import net.osmand.CallbackWithObject; +import net.osmand.plus.ApplicationMode; +import net.osmand.plus.ContextMenuAdapter; +import net.osmand.plus.ContextMenuItem; +import net.osmand.plus.OsmandApplication; +import net.osmand.plus.OsmandSettings; +import net.osmand.plus.R; +import net.osmand.plus.activities.MapActivity; +import net.osmand.plus.download.DownloadActivityType; +import net.osmand.plus.download.DownloadIndexesThread; +import net.osmand.plus.download.DownloadResources; +import net.osmand.plus.download.DownloadValidationManager; +import net.osmand.plus.download.IndexItem; +import net.osmand.plus.poi.PoiFiltersHelper; +import net.osmand.plus.poi.PoiTemplateList; +import net.osmand.plus.poi.PoiUIFilter; +import net.osmand.util.Algorithms; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +public class WikipediaPoiMenu { + + public static final String GLOBAL_WIKI_POI_ENABLED_KEY = "global_wikipedia_poi_enabled_key"; + public static final String ENABLED_WIKI_POI_LANGUAGES_KEY = "enabled_wikipedia_poi_languages_key"; + + private MapActivity mapActivity; + private OsmandApplication app; + private OsmandSettings settings; + private ApplicationMode appMode; + private boolean nightMode; + + public WikipediaPoiMenu(MapActivity mapActivity) { + this.mapActivity = mapActivity; + this.app = mapActivity.getMyApplication(); + this.settings = app.getSettings(); + this.appMode = settings.getApplicationMode(); + this.nightMode = app.getDaynightHelper().isNightModeForMapControls(); + } + + private ContextMenuAdapter createLayersItems() { + final int toggleActionStringId = R.string.shared_string_wikipedia; + final int languageActionStringId = R.string.shared_string_language; + ContextMenuAdapter adapter = new ContextMenuAdapter(); + adapter.setDefaultLayoutId(R.layout.dash_item_with_description_72dp); + adapter.setProfileDependent(true); + adapter.setNightMode(nightMode); + + ContextMenuAdapter.OnRowItemClick l = new ContextMenuAdapter.OnRowItemClick() { + + @Override + public boolean onRowItemClick(ArrayAdapter adapter, + View view, int itemId, int pos) { + return super.onRowItemClick(adapter, view, itemId, pos); + } + + @Override + public boolean onContextMenuClick(final ArrayAdapter adapter, + final int itemId, final int position, final boolean isChecked, int[] viewCoordinates) { + if (itemId == toggleActionStringId) { + app.runInUIThread(new Runnable() { + @Override + public void run() { + toggleWikipediaPoi(mapActivity, !settings.SHOW_WIKIPEDIA_POI.getModeValue(appMode), true); + } + }); + } else if (itemId == languageActionStringId) { + showLanguagesDialog(mapActivity, appMode, true, true); + } + return false; + } + }; + + int toggleIconId = R.drawable.ic_plugin_wikipedia; + int toggleIconColorId; + boolean enabled = settings.SHOW_WIKIPEDIA_POI.getModeValue(appMode); + if (enabled) { + toggleIconColorId = nightMode ? R.color.active_color_primary_dark : R.color.active_color_primary_light; + } else { + toggleIconColorId = ContextMenuItem.INVALID_ID; + } + String summary = mapActivity.getString(enabled ? R.string.shared_string_enabled : R.string.shared_string_disabled); + adapter.addItem(new ContextMenuItem.ItemBuilder() + .setTitleId(toggleActionStringId, mapActivity) + .setDescription(summary) + .setIcon(toggleIconId) + .setColor(toggleIconColorId) + .setListener(l) + .setSelected(enabled).createItem()); + + if (enabled) { + adapter.addItem(new ContextMenuItem.ItemBuilder() + .setLayout(R.layout.list_item_divider) + .createItem()); + + summary = getLanguagesSummary(app); + adapter.addItem(new ContextMenuItem.ItemBuilder() + .setTitleId(languageActionStringId, mapActivity) + .setIcon(R.drawable.ic_action_map_language) + .setDescription(summary) + .hideCompoundButton(true) + .setListener(l) + .createItem()); + } + + final DownloadIndexesThread downloadThread = app.getDownloadThread(); + if (!downloadThread.getIndexes().isDownloadedFromInternet) { + if (settings.isInternetConnectionAvailable()) { + downloadThread.runReloadIndexFiles(); + } + } + final boolean downloadIndexes = settings.isInternetConnectionAvailable() + && !downloadThread.getIndexes().isDownloadedFromInternet + && !downloadThread.getIndexes().downloadFromInternetFailed; + + if (downloadIndexes) { + adapter.addItem(new ContextMenuItem.ItemBuilder() + .setTitleId(R.string.shared_string_download_map, mapActivity) + .setDescription(app.getString(R.string.wiki_menu_download_descr)) + .setCategory(true) + .setLayout(R.layout.list_group_title_with_descr).createItem()); + adapter.addItem(new ContextMenuItem.ItemBuilder() + .setLayout(R.layout.list_item_icon_and_download) + .setTitleId(R.string.downloading_list_indexes, mapActivity) + .setLoading(true) + .setListener(l).createItem()); + } else { + try { + IndexItem currentDownloadingItem = downloadThread.getCurrentDownloadingItem(); + int currentDownloadingProgress = downloadThread.getCurrentDownloadingItemProgress(); + List wikiIndexes = DownloadResources.findIndexItemsAt( + app, mapActivity.getMapLocation(), DownloadActivityType.WIKIPEDIA_FILE); + if (wikiIndexes.size() > 0) { + adapter.addItem(new ContextMenuItem.ItemBuilder() + .setTitleId(R.string.shared_string_download_map, mapActivity) + .setDescription(app.getString(R.string.wiki_menu_download_descr)) + .setCategory(true) + .setLayout(R.layout.list_group_title_with_descr).createItem()); + for (final IndexItem indexItem : wikiIndexes) { + ContextMenuItem.ItemBuilder itemBuilder = new ContextMenuItem.ItemBuilder() + .setLayout(R.layout.list_item_icon_and_download) + .setTitle(indexItem.getVisibleName(app, app.getRegions(), false)) + .setDescription(DownloadActivityType.WIKIPEDIA_FILE.getString(app) + " • " + indexItem.getSizeDescription(app)) + .setIcon(DownloadActivityType.WIKIPEDIA_FILE.getIconResource()) + .setListener(new ContextMenuAdapter.ItemClickListener() { + @Override + public boolean onContextMenuClick(ArrayAdapter adapter, int itemId, int position, boolean isChecked, int[] viewCoordinates) { + ContextMenuItem item = adapter.getItem(position); + if (downloadThread.isDownloading(indexItem)) { + downloadThread.cancelDownload(indexItem); + if (item != null) { + item.setProgress(ContextMenuItem.INVALID_ID); + item.setLoading(false); + item.setSecondaryIcon(R.drawable.ic_action_import); + adapter.notifyDataSetChanged(); + } + } else { + new DownloadValidationManager(app).startDownload(mapActivity, indexItem); + if (item != null) { + item.setProgress(ContextMenuItem.INVALID_ID); + item.setLoading(true); + item.setSecondaryIcon(R.drawable.ic_action_remove_dark); + adapter.notifyDataSetChanged(); + } + } + return false; + } + }) + .setProgressListener(new ContextMenuAdapter.ProgressListener() { + @Override + public boolean onProgressChanged(Object progressObject, int progress, + ArrayAdapter adapter, + int itemId, int position) { + if (progressObject != null && progressObject instanceof IndexItem) { + IndexItem progressItem = (IndexItem) progressObject; + if (indexItem.compareTo(progressItem) == 0) { + ContextMenuItem item = adapter.getItem(position); + if (item != null) { + item.setProgress(progress); + item.setLoading(true); + item.setSecondaryIcon(R.drawable.ic_action_remove_dark); + adapter.notifyDataSetChanged(); + } + return true; + } + } + return false; + } + }); + + if (indexItem == currentDownloadingItem) { + itemBuilder.setLoading(true) + .setProgress(currentDownloadingProgress) + .setSecondaryIcon(R.drawable.ic_action_remove_dark); + } else { + itemBuilder.setSecondaryIcon(R.drawable.ic_action_import); + } + adapter.addItem(itemBuilder.createItem()); + } + } + } catch (IOException e) { + e.printStackTrace(); + } + } + return adapter; + } + + private static void showLanguagesDialog(@NonNull final MapActivity mapActivity, + @NonNull final ApplicationMode appMode, + final boolean usedOnMap, + final boolean refresh) { + final OsmandApplication app = mapActivity.getMyApplication(); + SelectWikiLanguagesBottomSheet.showInstance(mapActivity, appMode, usedOnMap, + new CallbackWithObject() { + @Override + public boolean processResult(Boolean result) { + if (result) { + Bundle wikiPoiSetting = getWikiPoiSettingsForProfile(app, appMode); + if (wikiPoiSetting != null) { + if (refresh) { + refreshWikiPoi(mapActivity, wikiPoiSetting); + } else { + toggleWikipediaPoi(mapActivity, true, usedOnMap); + } + } else { + toggleWikipediaPoi(mapActivity, false, usedOnMap); + } + } + return true; + } + }); + } + + public static Bundle getWikiPoiSettings(OsmandApplication app) { + Bundle wikiSettings = getWikiPoiSettingsForProfile(app, app.getSettings().getApplicationMode()); + if (wikiSettings == null) { + wikiSettings = getWikiPoiSettingsForProfile(app, app.getSettings().DEFAULT_APPLICATION_MODE.get()); + } + return wikiSettings; + } + + private static Bundle getWikiPoiSettingsForProfile(OsmandApplication app, ApplicationMode appMode) { + OsmandSettings settings = app.getSettings(); + boolean globalWikiPoiEnabled = settings.GLOBAL_WIKIPEDIA_POI_ENABLED.getModeValue(appMode); + List enabledWikiPoiLanguages = settings.WIKIPEDIA_POI_ENABLED_LANGUAGES.getStringsListForProfile(appMode); + if (!globalWikiPoiEnabled && Algorithms.isEmpty(enabledWikiPoiLanguages)) { + return null; + } + Bundle bundle = new Bundle(); + bundle.putBoolean(GLOBAL_WIKI_POI_ENABLED_KEY, globalWikiPoiEnabled); + if (enabledWikiPoiLanguages != null) { + bundle.putStringArrayList(ENABLED_WIKI_POI_LANGUAGES_KEY, + new ArrayList<>(enabledWikiPoiLanguages)); + } + return bundle; + } + + public static void toggleWikipediaPoi(final MapActivity mapActivity, boolean enable, boolean usedOnMap) { + OsmandApplication app = mapActivity.getMyApplication(); + OsmandSettings settings = app.getSettings(); + if (enable) { + Bundle wikiPoiSettings = getWikiPoiSettings(app); + if (wikiPoiSettings != null) { + settings.SHOW_WIKIPEDIA_POI.set(true); + showWikiOnMap(app, wikiPoiSettings); + } else { + ApplicationMode appMode = settings.getApplicationMode(); + showLanguagesDialog(mapActivity, appMode, usedOnMap, false); + } + } else { + settings.SHOW_WIKIPEDIA_POI.set(false); + hideWikiFromMap(app); + } + mapActivity.getDashboard().refreshContent(true); + mapActivity.refreshMap(); + } + + public static void refreshWikiPoi(MapActivity mapActivity, @NonNull Bundle wikiPoiSettings) { + OsmandApplication app = mapActivity.getMyApplication(); + hideWikiFromMap(app); + showWikiOnMap(app, wikiPoiSettings); + mapActivity.getDashboard().refreshContent(true); + mapActivity.refreshMap(); + } + + private static void showWikiOnMap(OsmandApplication app, Bundle wikiPoiSettings) { + PoiFiltersHelper ph = app.getPoiFilters(); + boolean globalWikiEnabled = wikiPoiSettings.getBoolean(GLOBAL_WIKI_POI_ENABLED_KEY); + if (globalWikiEnabled) { + ph.addSelectedPoiFilter(PoiTemplateList.WIKI, ph.getGlobalWikiPoiFilter()); + } else { + List filters = ph.getWikiPOIFilters(); + for (PoiUIFilter filter : filters) { + ph.addSelectedPoiFilter(PoiTemplateList.WIKI, filter); + } + } + } + + private static void hideWikiFromMap(OsmandApplication app) { + PoiFiltersHelper ph = app.getPoiFilters(); + for (PoiUIFilter filter : ph.getSelectedPoiFilters(PoiTemplateList.WIKI)) { + ph.removePoiFilter(filter); + } + ph.clearSelectedPoiFilters(PoiTemplateList.WIKI); + } + + private static String getLanguagesSummary(OsmandApplication app) { + Bundle wikiLanguagesSetting = getWikiPoiSettings(app); + if (wikiLanguagesSetting != null) { + boolean globalWikiEnabled = wikiLanguagesSetting.getBoolean(GLOBAL_WIKI_POI_ENABLED_KEY); + List enabledLanguages = wikiLanguagesSetting.getStringArrayList(ENABLED_WIKI_POI_LANGUAGES_KEY); + if (globalWikiEnabled) { + return app.getString(R.string.shared_string_all_languages); + } else if (enabledLanguages != null) { + List translations = new ArrayList<>(); + for (String language : enabledLanguages) { + translations.add(app.getLangTranslation(language)); + } + return AndroidUtils.makeStringFromList(translations, ", "); + } + } + return null; + } + + public static boolean isWikiPoiEnabled(OsmandApplication app) { + OsmandSettings settings = app.getSettings(); + boolean shouldShowWiki = settings.SHOW_WIKIPEDIA_POI.get(); + if (shouldShowWiki && getWikiPoiSettings(app) == null) { + settings.SHOW_WIKIPEDIA_POI.set(false); + shouldShowWiki = false; + } + return shouldShowWiki; + } + + public static ContextMenuAdapter createListAdapter(final MapActivity mapActivity) { + return new WikipediaPoiMenu(mapActivity).createLayersItems(); + } +} From d3cf8b27295913d8bbc531b36d882f9c3cd3b0b0 Mon Sep 17 00:00:00 2001 From: veliymolfar Date: Wed, 1 Apr 2020 10:24:44 +0300 Subject: [PATCH 007/202] drawer configure / work in progress --- OsmAnd/assets/poi_categories.json | 14 + OsmAnd/res/layout/list_item_move_header.xml | 8 +- OsmAnd/res/values/strings.xml | 8 + .../net/osmand/plus/ContextMenuAdapter.java | 8 + .../src/net/osmand/plus/ContextMenuItem.java | 6 +- .../src/net/osmand/plus/OsmandSettings.java | 6 + .../osmand/plus/activities/MapActivity.java | 12 +- .../plus/activities/MapActivityActions.java | 29 ++ .../settings/ConfigureMenuItemsFragment.java | 440 +++++++++++++++++ ...nt.java => ConfigureMenuRootFragment.java} | 6 +- .../settings/ConfigureProfileFragment.java | 2 +- .../plus/settings/MenuItemsAdapter.java | 421 ++++++++++++++++ .../plus/settings/MenuItemsManager.java | 96 ++++ .../settings/UiCustomizationFragment.java | 448 ------------------ .../net/osmand/view/BaseMoveItemAdapter.java | 48 -- 15 files changed, 1045 insertions(+), 507 deletions(-) create mode 100644 OsmAnd/assets/poi_categories.json create mode 100644 OsmAnd/src/net/osmand/plus/settings/ConfigureMenuItemsFragment.java rename OsmAnd/src/net/osmand/plus/settings/{UiCustomizationRootFragment.java => ConfigureMenuRootFragment.java} (97%) create mode 100644 OsmAnd/src/net/osmand/plus/settings/MenuItemsAdapter.java create mode 100644 OsmAnd/src/net/osmand/plus/settings/MenuItemsManager.java delete mode 100644 OsmAnd/src/net/osmand/plus/settings/UiCustomizationFragment.java delete mode 100644 OsmAnd/src/net/osmand/view/BaseMoveItemAdapter.java diff --git a/OsmAnd/assets/poi_categories.json b/OsmAnd/assets/poi_categories.json new file mode 100644 index 0000000000..51afd627af --- /dev/null +++ b/OsmAnd/assets/poi_categories.json @@ -0,0 +1,14 @@ +{ + "categories" : { + "special" : { + "icons" : [ + "special_star", "special_star_stroked", "special_marker", "special_flag_stroke", "special_house", "special_building" + ] + }, + "amenity" : { + "icons": [ + "amenity_bar", "amenity_cafe", "amenity_atm", "amenity_biergarten", "amenity_cinema", "amenity_fire_station", "amenity_parking" + ] + } + } +} \ No newline at end of file diff --git a/OsmAnd/res/layout/list_item_move_header.xml b/OsmAnd/res/layout/list_item_move_header.xml index e319a6d231..6e6c08647e 100644 --- a/OsmAnd/res/layout/list_item_move_header.xml +++ b/OsmAnd/res/layout/list_item_move_header.xml @@ -30,6 +30,8 @@ android:paddingEnd="@dimen/content_padding" android:paddingRight="@dimen/content_padding" android:paddingBottom="@dimen/bottom_sheet_icon_margin" + android:visibility="gone" + tools:visibility="visible" android:src="@drawable/ic_action_item_move" android:tint="?attr/secondary_icon_color" /> @@ -45,7 +47,7 @@ android:paddingRight="@dimen/content_padding"> Custom OsmAnd plugin Snowmobile Ski touring + Developer Plugin + You can move items only inside this category. + You can acsess this actions by taping “Actions” button. + Main actions + Main actions containt only 4 buttons. + Settings will be reset to the original state after hiding. + These items are hidden from the menu, but the represented options or plugins still be working. + Hidden Elements below this point separated by a divider. Divider Reorder or hide items from the %1$s. diff --git a/OsmAnd/src/net/osmand/plus/ContextMenuAdapter.java b/OsmAnd/src/net/osmand/plus/ContextMenuAdapter.java index b164989528..b3c107e71c 100644 --- a/OsmAnd/src/net/osmand/plus/ContextMenuAdapter.java +++ b/OsmAnd/src/net/osmand/plus/ContextMenuAdapter.java @@ -84,6 +84,14 @@ public class ContextMenuAdapter { return items.get(position); } + public List getItems() { + return items; + } + + public void updateItems(List items) { + this.items = items; + } + public void removeItem(int position) { items.remove(position); } diff --git a/OsmAnd/src/net/osmand/plus/ContextMenuItem.java b/OsmAnd/src/net/osmand/plus/ContextMenuItem.java index 0e5b89ab5c..980d255119 100644 --- a/OsmAnd/src/net/osmand/plus/ContextMenuItem.java +++ b/OsmAnd/src/net/osmand/plus/ContextMenuItem.java @@ -31,7 +31,7 @@ public class ContextMenuItem { private final boolean clickable; private final boolean skipPaintingWithoutColor; private final int pos; - private final int order; + private int order; private String description; private final ContextMenuAdapter.ItemClickListener itemClickListener; private final ContextMenuAdapter.OnIntegerValueChangedListener integerListener; @@ -206,6 +206,10 @@ public class ContextMenuItem { this.progress = progress; } + public void setOrder(int order) { + this.order = order; + } + public void setLoading(boolean loading) { this.loading = loading; } diff --git a/OsmAnd/src/net/osmand/plus/OsmandSettings.java b/OsmAnd/src/net/osmand/plus/OsmandSettings.java index 85c93e31f4..640f61ab01 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandSettings.java +++ b/OsmAnd/src/net/osmand/plus/OsmandSettings.java @@ -3386,6 +3386,12 @@ public class OsmandSettings { SELECTED_POI_FILTER_FOR_MAP.set(android.text.TextUtils.join(",", poiFilters)); } + public final ListStringPreference DRAWER_ITEMS_ORDER = (ListStringPreference) + new ListStringPreference("drawer_items_order", null, ",,").makeProfile().cache(); + + public final ListStringPreference HIDDEN_DRAWER_ITEMS = (ListStringPreference) + new ListStringPreference("hidden_drawer_items", null, ",,").makeProfile().cache(); + public final ListStringPreference POI_FILTERS_ORDER = (ListStringPreference) new ListStringPreference("poi_filters_order", null, ",,").makeProfile().cache(); diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java index 615762e724..ed1420014b 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java @@ -137,12 +137,12 @@ import net.osmand.plus.search.QuickSearchDialogFragment.QuickSearchTab; import net.osmand.plus.search.QuickSearchDialogFragment.QuickSearchType; import net.osmand.plus.settings.BaseSettingsFragment; import net.osmand.plus.settings.BaseSettingsFragment.SettingsScreenType; +import net.osmand.plus.settings.ConfigureMenuItemsFragment; import net.osmand.plus.settings.ConfigureProfileFragment; import net.osmand.plus.settings.DataStorageFragment; import net.osmand.plus.settings.ImportCompleteFragment; import net.osmand.plus.settings.ImportSettingsFragment; import net.osmand.plus.settings.ProfileAppearanceFragment; -import net.osmand.plus.settings.UiCustomizationFragment; import net.osmand.plus.views.AddGpxPointBottomSheetHelper.NewGpxPoint; import net.osmand.plus.views.AnimateDraggingMapThread; import net.osmand.plus.views.MapControlsLayer; @@ -751,9 +751,9 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven importCompleteFragment.dismissFragment(); return; } - UiCustomizationFragment uiCustomizationFragment = getUiCustomizationFragment(); - if (uiCustomizationFragment != null) { - uiCustomizationFragment.showExitDialog(); + ConfigureMenuItemsFragment configureMenuItemsFragment = getConfigureMenuItemsFragment(); + if (configureMenuItemsFragment != null) { + configureMenuItemsFragment.showExitDialog(); return; } @@ -2475,6 +2475,10 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven return getFragment(ImportCompleteFragment.TAG); } + public ConfigureMenuItemsFragment getConfigureMenuItemsFragment(){ + return getFragment(ConfigureMenuItemsFragment.TAG); + } + public PointEditorFragmentNew getPointEditorFragmentNew() { PointEditorFragmentNew pointEditorFragmentNew; pointEditorFragmentNew = getFragment(FavoritePointEditor.TAG); diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java index 10463946b8..ffd819eafe 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java @@ -65,6 +65,7 @@ import net.osmand.plus.routepreparationmenu.WaypointsFragment; import net.osmand.plus.routing.RouteProvider.GPXRouteParamsBuilder; import net.osmand.plus.routing.RoutingHelper; import net.osmand.plus.settings.BaseSettingsFragment; +import net.osmand.plus.settings.MenuItemsManager; import net.osmand.plus.views.BaseMapLayer; import net.osmand.plus.views.MapControlsLayer; import net.osmand.plus.views.MapTileLayer; @@ -81,6 +82,7 @@ import java.io.File; import java.text.MessageFormat; import java.util.ArrayList; import java.util.Date; +import java.util.LinkedHashMap; import java.util.List; import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_CONFIGURE_MAP_ID; @@ -986,6 +988,33 @@ public class MapActivityActions implements DialogProvider { divider.setPosition(dividerItemIndex >= 0 ? dividerItemIndex : 8); optionsMenuHelper.addItem(divider.createItem()); + List items = optionsMenuHelper.getItems(); + List newItems = new ArrayList<>(); + List hiddenIds = app.getSettings().HIDDEN_DRAWER_ITEMS.getStringsList(); + + MenuItemsManager manager = new MenuItemsManager(app); + LinkedHashMap order = manager.getDrawerItemsSavedOrder(); + + if (hiddenIds != null){ + for (ContextMenuItem item: items){ + if (!hiddenIds.contains(item.getId())){ + newItems.add(item); + } + } + } else { + newItems.addAll(items); + } + + for (ContextMenuItem item: newItems){ + Integer o = order.get(item.getId()); + if (o == null){ + o = item.getOrder(); + } + item.setOrder(o); + } + + optionsMenuHelper.updateItems(newItems); + optionsMenuHelper.sortItemsByOrder(); return optionsMenuHelper; } diff --git a/OsmAnd/src/net/osmand/plus/settings/ConfigureMenuItemsFragment.java b/OsmAnd/src/net/osmand/plus/settings/ConfigureMenuItemsFragment.java new file mode 100644 index 0000000000..ced31a06bd --- /dev/null +++ b/OsmAnd/src/net/osmand/plus/settings/ConfigureMenuItemsFragment.java @@ -0,0 +1,440 @@ +package net.osmand.plus.settings; + +import android.content.Context; +import android.content.DialogInterface; +import android.os.Build; +import android.os.Bundle; +import android.os.Parcelable; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.ImageButton; +import android.widget.TextView; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.widget.Toolbar; +import androidx.fragment.app.FragmentActivity; +import androidx.fragment.app.FragmentManager; +import androidx.recyclerview.widget.ItemTouchHelper; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; + +import net.osmand.AndroidUtils; +import net.osmand.plus.OsmandApplication; +import net.osmand.plus.R; +import net.osmand.plus.UiUtilities; +import net.osmand.plus.activities.MapActivity; +import net.osmand.plus.base.BaseOsmAndFragment; +import net.osmand.plus.settings.ConfigureMenuRootFragment.ScreenType; +import net.osmand.plus.views.controls.ReorderItemTouchHelperCallback; +import net.osmand.plus.settings.MenuItemsAdapter.AdapterItem; +import net.osmand.plus.settings.MenuItemsAdapter.HeaderItem; +import net.osmand.plus.settings.MenuItemsAdapter.ButtonItem; +import net.osmand.plus.settings.MenuItemsAdapter.MenuItemBase; +import net.osmand.plus.settings.MenuItemsAdapter.MenuItemsAdapterListener; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.List; + +import static net.osmand.plus.settings.MenuItemsAdapter.AdapterItemType.HEADER; +import static net.osmand.plus.settings.MenuItemsAdapter.AdapterItemType.DIVIDER; +import static net.osmand.plus.settings.MenuItemsAdapter.AdapterItemType.DESCRIPTION; +import static net.osmand.plus.settings.MenuItemsAdapter.AdapterItemType.BUTTON; +import static net.osmand.plus.settings.MenuItemsAdapter.AdapterItemType.MENU_ITEM; + +public class ConfigureMenuItemsFragment extends BaseOsmAndFragment { + + public static final String TAG = ConfigureMenuItemsFragment.class.getName(); + private static final String ITEM_TYPE_KEY = "item_type_key"; + private static String ITEMS_ORDER_KEY = "items_order_key"; + private static String HIDDEN_ITEMS_KEY = "hidden_items_key"; + private static String CONFIGURE_MENU_ITEMS_TAG = "configure_menu_items_tag"; + private OsmandApplication app; + private boolean nightMode; + private ScreenType type; + private LayoutInflater mInflater; + private MenuItemsManager menuItemsManager; + private HashMap menuItemsOrder = new LinkedHashMap<>(); + private List hiddenMenuItems = new ArrayList<>(); + + @Override + public void onSaveInstanceState(@NonNull Bundle outState) { + super.onSaveInstanceState(outState); + outState.putSerializable(ITEM_TYPE_KEY, type); + outState.putStringArrayList(HIDDEN_ITEMS_KEY, new ArrayList<>(hiddenMenuItems)); + outState.putSerializable(ITEMS_ORDER_KEY, menuItemsOrder); + } + + public static ConfigureMenuItemsFragment showInstance(@NonNull FragmentManager fm, @NonNull ScreenType type) { + ConfigureMenuItemsFragment fragment = new ConfigureMenuItemsFragment(); + fragment.setType(type); + fm.beginTransaction() + .replace(R.id.fragmentContainer, fragment, TAG) + .addToBackStack(CONFIGURE_MENU_ITEMS_TAG) + .commitAllowingStateLoss(); + return fragment; + } + + @Override + public void onCreate(@Nullable Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + if (savedInstanceState != null + && savedInstanceState.containsKey(ITEM_TYPE_KEY) + && savedInstanceState.containsKey(HIDDEN_ITEMS_KEY) + && savedInstanceState.containsKey(ITEMS_ORDER_KEY)) { + type = (ScreenType) savedInstanceState.getSerializable(ITEM_TYPE_KEY); + hiddenMenuItems = savedInstanceState.getStringArrayList(HIDDEN_ITEMS_KEY); + menuItemsOrder = (HashMap) savedInstanceState.getSerializable(ITEMS_ORDER_KEY); + } + app = requireMyApplication(); + nightMode = !app.getSettings().isLightContent(); + mInflater = UiUtilities.getInflater(app, nightMode); + menuItemsManager = new MenuItemsManager(app); + + List ids = app.getSettings().HIDDEN_DRAWER_ITEMS.getStringsList(); + hiddenMenuItems = new ArrayList<>(); + if (ids != null) { + hiddenMenuItems.addAll(ids); + } + menuItemsOrder = menuItemsManager.getDrawerItemsSavedOrder(); + } + + @Nullable + @Override + public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { + View root = mInflater.inflate(R.layout.edit_arrangement_list_fragment, container, false); + Toolbar toolbar = root.findViewById(R.id.toolbar); + TextView toolbarTitle = root.findViewById(R.id.toolbar_title); + ImageButton toolbarButton = root.findViewById(R.id.close_button); + RecyclerView recyclerView = root.findViewById(R.id.profiles_list); + toolbar.setBackgroundColor(nightMode + ? getResources().getColor(R.color.list_background_color_dark) + : getResources().getColor(R.color.list_background_color_light)); + toolbarTitle.setTextColor(nightMode + ? getResources().getColor(R.color.text_color_primary_dark) + : getResources().getColor(R.color.list_background_color_dark)); + toolbarButton.setImageDrawable(getPaintedContentIcon(R.drawable.ic_arrow_back, getResources().getColor(R.color.text_color_secondary_light))); + toolbarTitle.setText(type.titleRes); + toolbarButton.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + showExitDialog(); + } + }); + + recyclerView.setLayoutManager(new LinearLayoutManager(app)); + + final MenuItemsAdapter adapter = new MenuItemsAdapter(app, getAdapterItems()); + final ItemTouchHelper touchHelper = new ItemTouchHelper(new ReorderItemTouchHelperCallback(adapter)); + touchHelper.attachToRecyclerView(recyclerView); + MenuItemsAdapterListener listener = new MenuItemsAdapterListener() { + private int fromPosition; + private int toPosition; + + @Override + public void onDragStarted(RecyclerView.ViewHolder holder) { + fromPosition = holder.getAdapterPosition(); + touchHelper.startDrag(holder); + } + + @Override + public void onDragOrSwipeEnded(RecyclerView.ViewHolder holder) { + toPosition = holder.getAdapterPosition(); + if (toPosition >= 0 && fromPosition >= 0 && toPosition != fromPosition) { + adapter.notifyDataSetChanged(); + } + } + + @Override + public void onButtonClicked(int position) { + AdapterItem adapterItem = adapter.getItem(position); + if (adapterItem.getValue() instanceof MenuItemBase) { + MenuItemBase menuItemBase = (MenuItemBase) adapterItem.getValue(); + menuItemBase.toggleHidden(); + if (menuItemBase.isHidden()) { + hiddenMenuItems.add(menuItemBase.getId()); + } else { + hiddenMenuItems.remove(menuItemBase.getId()); + } + adapter.updateItems(getAdapterItems()); + } + } + + @Override + public void onItemMoved(String id, int position) { + menuItemsOrder.put(id, position); + } + }; + adapter.setListener(listener); + recyclerView.setAdapter(adapter); + + View cancelButton = root.findViewById(R.id.dismiss_button); + UiUtilities.setupDialogButton(nightMode, cancelButton, UiUtilities.DialogButtonType.SECONDARY, R.string.shared_string_cancel); + cancelButton.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + FragmentActivity fragmentActivity = getActivity(); + if (fragmentActivity != null) { + fragmentActivity.onBackPressed(); + } + } + }); + + root.findViewById(R.id.buttons_divider).setVisibility(View.VISIBLE); + + View applyButton = root.findViewById(R.id.right_bottom_button); + UiUtilities.setupDialogButton(nightMode, applyButton, UiUtilities.DialogButtonType.PRIMARY, R.string.shared_string_apply); + applyButton.setVisibility(View.VISIBLE); + applyButton.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + MapActivity mapActivity = (MapActivity) getActivity(); + if (mapActivity != null) { + OsmandApplication app = mapActivity.getMyApplication(); + app.getSettings().HIDDEN_DRAWER_ITEMS.setStringsList(hiddenMenuItems); + + + List drawerItems = menuItemsManager.getDrawerItemsDefault(); + + for (MenuItemBase menuItemBase : drawerItems) { + Integer order = menuItemsOrder.get(menuItemBase.getId()); + if (order == null) { + order = menuItemBase.getOrder(); + } + menuItemBase.setOrder(order); + + } + + Collections.sort(drawerItems, new Comparator() { + @Override + public int compare(MenuItemBase item1, MenuItemBase item2) { + int order1 = item1.getOrder(); + int order2 = item2.getOrder(); + return (order1 < order2) ? -1 : ((order1 == order2) ? 0 : 1); + } + }); + + List ids = new ArrayList<>(); + for (MenuItemBase menuItemBase : drawerItems) { + ids.add(menuItemBase.getId()); + } + app.getSettings().DRAWER_ITEMS_ORDER.setStringsList(ids); + + dismissFragment(); + } + } + }); + + if (Build.VERSION.SDK_INT >= 21) { + AndroidUtils.addStatusBarPadding21v(app, root); + } + return root; + } + + @Override + public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { + super.onViewCreated(view, savedInstanceState); + } + + public void showExitDialog() { + Context themedContext = UiUtilities.getThemedContext(getActivity(), nightMode); + AlertDialog.Builder dismissDialog = new AlertDialog.Builder(themedContext); + dismissDialog.setTitle(getString(R.string.shared_string_dismiss)); + dismissDialog.setMessage(getString(R.string.exit_without_saving)); + dismissDialog.setNegativeButton(R.string.shared_string_cancel, null); + dismissDialog.setPositiveButton(R.string.shared_string_exit, new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface dialog, int which) { + dismissFragment(); + } + }); + dismissDialog.show(); + } + + private void dismissFragment() { + FragmentManager fm = getFragmentManager(); + if (fm != null && !fm.isStateSaved()) { + getFragmentManager().popBackStack(CONFIGURE_MENU_ITEMS_TAG, FragmentManager.POP_BACK_STACK_INCLUSIVE); + } + } + + public void setType(@NonNull ScreenType type) { + this.type = type; + } + + private List getAdapterItems() { + List items = new ArrayList<>(); + items.add(new AdapterItem(DESCRIPTION, type)); + switch (type) { + case DRAWER: + items.addAll(getDrawerAdapterItems()); + break; + case CONFIGURE_MAP: + items.addAll(getConfigureMapAdapterItems()); + break; + case CONTEXT_MENU_ACTIONS: + items.addAll(getContextMenuActionsAdapterItems()); + break; + } + items.add(new AdapterItem(DIVIDER, 1)); + items.add(new AdapterItem(BUTTON, new ButtonItem( + R.string.reset_to_default, + R.drawable.ic_action_reset_to_default_dark, + new View.OnClickListener() { + @Override + public void onClick(View view) { + switch (type) { + case DRAWER: + app.getSettings().DRAWER_ITEMS_ORDER.setStringsList(null); + app.getSettings().HIDDEN_DRAWER_ITEMS.setStringsList(null); + + break; + case CONFIGURE_MAP: + break; + case CONTEXT_MENU_ACTIONS: + break; + } + } + }))); + items.add(new AdapterItem(BUTTON, new ButtonItem( + R.string.copy_from_other_profile, + R.drawable.ic_action_copy, + new View.OnClickListener() { + @Override + public void onClick(View view) { + + } + }))); + return items; + } + + public List getDrawerItems(boolean hidden) { + + List items = new ArrayList<>(); + List drawerItems = menuItemsManager.getDrawerItemsDefault(); + + for (MenuItemBase menuItemBase : drawerItems) { + Integer order = menuItemsOrder.get(menuItemBase.getId()); + if (order == null) { + order = menuItemBase.getOrder(); + } + menuItemBase.setOrder(order); +// menuItemBase.setHidden(hiddenMenuItems.contains(menuItemBase.getId())); + + } + + Collections.sort(drawerItems, new Comparator() { + @Override + public int compare(MenuItemBase item1, MenuItemBase item2) { + int order1 = item1.getOrder(); + int order2 = item2.getOrder(); + return (order1 < order2) ? -1 : ((order1 == order2) ? 0 : 1); + } + }); + + + for (MenuItemBase drawerItem : drawerItems) { + if (hidden && hiddenMenuItems.contains(drawerItem.getId())) { + drawerItem.setHidden(true); + items.add(drawerItem); + } else if (!hidden && !hiddenMenuItems.contains(drawerItem.getId())) { + drawerItem.setHidden(false); + items.add(drawerItem); + } + } + return items; + } + + private List getDrawerAdapterItems() { + List active = convertToAdapterItems(getDrawerItems(false)); + List hidden = convertToAdapterItems(getDrawerItems(true)); + List items = new ArrayList<>(active); + if (!hidden.isEmpty()) { + items.add(new AdapterItem(HEADER, new HeaderItem( + R.string.shared_string_hidden, + R.string.hidden_items_descr, + false) + )); + items.addAll(hidden); + } + return items; + } + + private List convertToAdapterItems(List itemBaseList) { + List items = new ArrayList<>(); + for (MenuItemBase menuItem : itemBaseList) { + items.add(new AdapterItem(MENU_ITEM, menuItem)); + } + return items; + } + + private List getConfigureMapAdapterItems() { + List items = new ArrayList<>(); + items.add(new AdapterItem(HEADER, new HeaderItem( + R.string.main_actions, + R.string.main_actions_descr, + false) + )); + + items.add(new AdapterItem(HEADER, new HeaderItem( + R.string.additional_actions, + R.string.additional_actions_descr, + false) + )); + + items.add(new AdapterItem(HEADER, new HeaderItem( + R.string.shared_string_hidden, + R.string.hidden_items_descr, + false) + )); + + return items; + } + + private List getContextMenuActionsAdapterItems() { + List items = new ArrayList<>(); + items.add(new AdapterItem(HEADER, new HeaderItem( + R.string.shared_string_show, + R.string.move_inside_category, + false) + )); + + items.add(new AdapterItem(HEADER, new HeaderItem( + R.string.map_widget_map_rendering, + R.string.move_inside_category, + false) + )); + + items.add(new AdapterItem(HEADER, new HeaderItem( + R.string.shared_string_hidden, + R.string.reset_items_descr, + false) + )); + + return items; + } + +// private List getDrawerItems() { +// List items = new ArrayList<>(); +// +// return items; +// } + +// private List getConfigureMapItems() { +// List items = new ArrayList<>(); +// +// return items; +// } + +// private List getContextMenuActionsItems() { +// List items = new ArrayList<>(); +// +// return items; +// } +} diff --git a/OsmAnd/src/net/osmand/plus/settings/UiCustomizationRootFragment.java b/OsmAnd/src/net/osmand/plus/settings/ConfigureMenuRootFragment.java similarity index 97% rename from OsmAnd/src/net/osmand/plus/settings/UiCustomizationRootFragment.java rename to OsmAnd/src/net/osmand/plus/settings/ConfigureMenuRootFragment.java index f179bfdf47..6c7305b8e4 100644 --- a/OsmAnd/src/net/osmand/plus/settings/UiCustomizationRootFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/ConfigureMenuRootFragment.java @@ -39,9 +39,9 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -public class UiCustomizationRootFragment extends BaseOsmAndFragment { +public class ConfigureMenuRootFragment extends BaseOsmAndFragment { - public static final String TAG = UiCustomizationRootFragment.class.getName(); + public static final String TAG = ConfigureMenuRootFragment.class.getName(); private static final Log LOG = PlatformUtil.getLog(TAG); private OsmandApplication app; @@ -88,7 +88,7 @@ public class UiCustomizationRootFragment extends BaseOsmAndFragment { public void onItemClick(ScreenType type) { FragmentManager fm = getFragmentManager(); if (fm != null) { - UiCustomizationFragment.showInstance(fm, type); + ConfigureMenuItemsFragment.showInstance(fm, type); } } }); diff --git a/OsmAnd/src/net/osmand/plus/settings/ConfigureProfileFragment.java b/OsmAnd/src/net/osmand/plus/settings/ConfigureProfileFragment.java index 9d8c2911ac..256c376e42 100644 --- a/OsmAnd/src/net/osmand/plus/settings/ConfigureProfileFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/ConfigureProfileFragment.java @@ -392,7 +392,7 @@ public class ConfigureProfileFragment extends BaseSettingsFragment implements Co Preference uiCustomization = findPreference(UI_CUSTOMIZATION); // TODO change icon uiCustomization.setIcon(getContentIcon(getSelectedAppMode().getIconRes())); - uiCustomization.setFragment(UiCustomizationRootFragment.TAG); + uiCustomization.setFragment(ConfigureMenuRootFragment.TAG); } @Override diff --git a/OsmAnd/src/net/osmand/plus/settings/MenuItemsAdapter.java b/OsmAnd/src/net/osmand/plus/settings/MenuItemsAdapter.java new file mode 100644 index 0000000000..c8a0dbc0db --- /dev/null +++ b/OsmAnd/src/net/osmand/plus/settings/MenuItemsAdapter.java @@ -0,0 +1,421 @@ +package net.osmand.plus.settings; + +import android.annotation.SuppressLint; +import android.graphics.drawable.Drawable; +import android.view.LayoutInflater; +import android.view.MotionEvent; +import android.view.View; +import android.view.ViewGroup; +import android.widget.ImageView; +import android.widget.TextView; + +import androidx.annotation.DrawableRes; +import androidx.annotation.NonNull; +import androidx.annotation.StringRes; +import androidx.core.content.ContextCompat; +import androidx.core.view.MotionEventCompat; +import androidx.recyclerview.widget.RecyclerView; + +import net.osmand.AndroidUtils; +import net.osmand.plus.OsmandApplication; +import net.osmand.plus.R; +import net.osmand.plus.UiUtilities; +import net.osmand.plus.views.controls.ReorderItemTouchHelperCallback; +import net.osmand.plus.settings.ConfigureMenuRootFragment.ScreenType; + + +import java.util.Collections; +import java.util.List; + +import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_DIVIDER_ID; + +public class MenuItemsAdapter extends RecyclerView.Adapter + implements ReorderItemTouchHelperCallback.OnItemMoveCallback { + + private OsmandApplication app; + private UiUtilities uiUtilities; + private boolean nightMode; + private List items; + private MenuItemsAdapterListener listener; + private int activeColorRes; + + + MenuItemsAdapter(OsmandApplication app, + List items) { + this.app = app; + this.items = items; + uiUtilities = app.getUIUtilities(); + nightMode = !app.getSettings().isLightContent(); + activeColorRes = nightMode + ? R.color.active_color_primary_dark + : R.color.active_color_primary_light; + } + + @Override + public int getItemViewType(int position) { + AdapterItem item = items.get(position); + return item.type.ordinal(); + } + + @NonNull + @Override + public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { + LayoutInflater inflater = UiUtilities.getInflater(app, nightMode); + AdapterItemType type = AdapterItemType.values()[viewType]; + View view; + switch (type) { + case DESCRIPTION: + view = inflater.inflate(R.layout.list_item_description_with_image, parent, false); + return new DescriptionHolder(view); + case MENU_ITEM: + view = inflater.inflate(R.layout.profile_edit_list_item, parent, false); + return new ItemHolder(view); + case DIVIDER: + view = inflater.inflate(R.layout.divider, parent, false); + return new DividerHolder(view); + case HEADER: + view = inflater.inflate(R.layout.list_item_move_header, parent, false); + return new HeaderHolder(view); + case BUTTON: + view = inflater.inflate(R.layout.preference_button, parent, false); + return new ButtonHolder(view); + default: + throw new IllegalArgumentException("Unsupported view type"); + } + } + + @SuppressLint("ClickableViewAccessibility") + @Override + public void onBindViewHolder(@NonNull final RecyclerView.ViewHolder holder, int position) { + AdapterItem item = items.get(position); + if (holder instanceof DescriptionHolder) { + DescriptionHolder h = (DescriptionHolder) holder; + ScreenType screenType = (ScreenType) item.value; + h.description.setText(String.format(app.getString(R.string.reorder_or_hide_from), app.getString(screenType.titleRes))); + h.image.setImageResource(nightMode ? screenType.imageNightRes : screenType.imageDayRes); + } else if (holder instanceof ItemHolder) { + final ItemHolder h = (ItemHolder) holder; + MenuItemBase menuItem = (MenuItemBase) item.value; + h.title.setText(menuItem.titleRes); + h.description.setText(String.valueOf(menuItem.order)); + if (DRAWER_DIVIDER_ID.equals(menuItem.id)) { + h.icon.setVisibility(View.GONE); + h.actionIcon.setVisibility(View.GONE); + } else { + h.icon.setImageDrawable(uiUtilities.getIcon(menuItem.iconRes, nightMode)); + h.icon.setVisibility(View.VISIBLE); + h.actionIcon.setVisibility(View.VISIBLE); + } + h.actionIcon.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + int pos = holder.getAdapterPosition(); + if (listener != null && pos != RecyclerView.NO_POSITION) { + listener.onButtonClicked(pos); + } + } + }); + h.moveIcon.setOnTouchListener(new View.OnTouchListener() { + @Override + public boolean onTouch(View view, MotionEvent event) { + if (MotionEventCompat.getActionMasked(event) == MotionEvent.ACTION_DOWN) { + listener.onDragStarted(holder); + } + return false; + } + }); + if (menuItem.hidden) { + h.moveIcon.setVisibility(View.GONE); + h.actionIcon.setImageDrawable(uiUtilities.getIcon(R.drawable.ic_action_undo, R.color.color_osm_edit_create)); + } else { + h.moveIcon.setVisibility(View.VISIBLE); + h.moveIcon.setImageDrawable(uiUtilities.getIcon(R.drawable.ic_action_item_move, nightMode)); + h.actionIcon.setImageDrawable(uiUtilities.getIcon(R.drawable.ic_action_remove, R.color.color_osm_edit_delete)); + } + } else if (holder instanceof HeaderHolder) { + HeaderHolder h = (HeaderHolder) holder; + HeaderItem header = (HeaderItem) item.value; + h.title.setText(header.titleRes); + h.description.setText(header.descrRes); + h.movable = header.movable; + if (header.movable) { + h.moveIcon.setVisibility(View.VISIBLE); + h.moveIcon.setImageDrawable(uiUtilities.getIcon(R.drawable.ic_action_item_move, activeColorRes)); + h.moveIcon.setOnTouchListener(new View.OnTouchListener() { + @Override + public boolean onTouch(View view, MotionEvent event) { + if (MotionEventCompat.getActionMasked(event) == MotionEvent.ACTION_DOWN) { + listener.onDragStarted(holder); + } + return false; + } + }); + } else { + h.moveIcon.setVisibility(View.GONE); + } + } else if (holder instanceof ButtonHolder) { + ButtonHolder h = (ButtonHolder) holder; + ButtonItem button = (ButtonItem) item.value; + h.title.setText(app.getString(button.titleRes)); + h.icon.setImageDrawable(uiUtilities.getIcon(button.iconRes, activeColorRes)); + h.button.setOnClickListener(button.listener); + Drawable drawable = UiUtilities.getColoredSelectableDrawable(app, ContextCompat.getColor(app, activeColorRes), 0.3f); + AndroidUtils.setBackground(h.itemView, drawable); + } + } + + @Override + public int getItemCount() { + return items.size(); + } + + @Override + public boolean onItemMove(int from, int to) { + Object itemFrom = items.get(from).value; + Object itemTo = items.get(to).value; + if (itemFrom instanceof MenuItemBase + && itemTo instanceof MenuItemBase) { + MenuItemBase menuItemFrom = (MenuItemBase) itemFrom; + MenuItemBase menuItemTo = (MenuItemBase) itemTo; + + int orderFrom = menuItemFrom.order; + int orderTo = menuItemTo.order; + + menuItemFrom.order = orderTo; + menuItemTo.order = orderFrom; + + listener.onItemMoved(menuItemFrom.id, orderTo); + listener.onItemMoved(menuItemTo.id, orderFrom); + + Collections.swap(items, from, to); + notifyItemMoved(from, to); + return true; + } + return false; + } + + @Override + public void onItemDismiss(RecyclerView.ViewHolder holder) { + listener.onDragOrSwipeEnded(holder); + } + + private static class DescriptionHolder extends RecyclerView.ViewHolder + implements ReorderItemTouchHelperCallback.UnmovableItem { + private ImageView image; + private TextView description; + + DescriptionHolder(@NonNull View itemView) { + super(itemView); + image = itemView.findViewById(R.id.image); + description = itemView.findViewById(R.id.description); + } + + @Override + public boolean isMovingDisabled() { + return true; + } + } + + private static class ItemHolder extends RecyclerView.ViewHolder + implements ReorderItemTouchHelperCallback.UnmovableItem { + + private TextView title; + private TextView description; + private ImageView icon; + private ImageView actionIcon; + private ImageView moveIcon; + + ItemHolder(@NonNull View itemView) { + super(itemView); + title = itemView.findViewById(R.id.title); + description = itemView.findViewById(R.id.description); + actionIcon = itemView.findViewById(R.id.action_icon); + icon = itemView.findViewById(R.id.icon); + moveIcon = itemView.findViewById(R.id.move_icon); + } + + @Override + public boolean isMovingDisabled() { + return false; + } + } + + private static class DividerHolder extends RecyclerView.ViewHolder + implements ReorderItemTouchHelperCallback.UnmovableItem { + View divider; + + DividerHolder(View itemView) { + super(itemView); + divider = itemView.findViewById(R.id.divider); + } + + @Override + public boolean isMovingDisabled() { + return true; + } + } + + private static class HeaderHolder extends RecyclerView.ViewHolder + implements ReorderItemTouchHelperCallback.UnmovableItem { + private ImageView moveIcon; + private TextView title; + private TextView description; + private boolean movable; + + HeaderHolder(@NonNull View itemView) { + super(itemView); + moveIcon = itemView.findViewById(R.id.move_icon); + title = itemView.findViewById(R.id.title); + description = itemView.findViewById(R.id.summary); + } + + @Override + public boolean isMovingDisabled() { + return !movable; + } + } + + private static class ButtonHolder extends RecyclerView.ViewHolder + implements ReorderItemTouchHelperCallback.UnmovableItem { + private View button; + private ImageView icon; + private TextView title; + + ButtonHolder(@NonNull View itemView) { + super(itemView); + button = itemView; + icon = itemView.findViewById(android.R.id.icon); + title = itemView.findViewById(android.R.id.title); + } + + @Override + public boolean isMovingDisabled() { + return true; + } + } + + static class AdapterItem { + private AdapterItemType type; + private Object value; + + AdapterItem(AdapterItemType type, Object value) { + this.type = type; + this.value = value; + } + + public AdapterItemType getType() { + return type; + } + + public Object getValue() { + return value; + } + } + + public static class MenuItemBase { + private String id; + @StringRes + private int titleRes; + @StringRes + private int descrRes; + @DrawableRes + private int iconRes; + + public void setOrder(int order) { + this.order = order; + } + + public int getOrder() { + return order; + } + + private int order; + + public void setHidden(boolean hidden) { + this.hidden = hidden; + } + + private boolean hidden; + + public MenuItemBase(String id, int titleRes, int descrRes, int iconRes, int order, boolean hidden) { + this.id = id; + this.titleRes = titleRes; + this.descrRes = descrRes; + this.iconRes = iconRes; + this.order = order; + this.hidden = hidden; + } + + public void toggleHidden() { + hidden = !hidden; + } + + public String getId() { + return id; + } + + public boolean isHidden() { + return hidden; + } + } + + static class ButtonItem { + @StringRes + private int titleRes; + @DrawableRes + private int iconRes; + private View.OnClickListener listener; + + ButtonItem(int titleRes, int iconRes, View.OnClickListener listener) { + this.titleRes = titleRes; + this.iconRes = iconRes; + this.listener = listener; + } + } + + static class HeaderItem { + @StringRes + private int titleRes; + @StringRes + private int descrRes; + boolean movable; + + HeaderItem(int titleRes, int descrRes, boolean movable) { + this.titleRes = titleRes; + this.descrRes = descrRes; + this.movable = movable; + } + } + + public enum AdapterItemType { + DESCRIPTION, + MENU_ITEM, + DIVIDER, + HEADER, + BUTTON + } + + public interface MenuItemsAdapterListener { + + void onDragStarted(RecyclerView.ViewHolder holder); + + void onDragOrSwipeEnded(RecyclerView.ViewHolder holder); + + void onButtonClicked(int view); + + void onItemMoved(String id, int position); + } + + public void setListener(MenuItemsAdapterListener listener) { + this.listener = listener; + } + + public AdapterItem getItem(int position) { + return items.get(position); + } + + public void updateItems(List items) { + this.items = items; + notifyDataSetChanged(); + } +} diff --git a/OsmAnd/src/net/osmand/plus/settings/MenuItemsManager.java b/OsmAnd/src/net/osmand/plus/settings/MenuItemsManager.java new file mode 100644 index 0000000000..d6e18ef3ba --- /dev/null +++ b/OsmAnd/src/net/osmand/plus/settings/MenuItemsManager.java @@ -0,0 +1,96 @@ +package net.osmand.plus.settings; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +import net.osmand.plus.OsmandApplication; +import net.osmand.plus.OsmandSettings; +import net.osmand.plus.R; +import net.osmand.plus.Version; +import net.osmand.plus.settings.MenuItemsAdapter.MenuItemBase; +import net.osmand.plus.OsmandSettings.ListStringPreference; +import net.osmand.plus.settings.ConfigureMenuRootFragment.ScreenType; + +import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_BUILDS_ID; +import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_CONFIGURE_MAP_ID; +import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_CONFIGURE_SCREEN_ID; +import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_DASHBOARD_ID; +import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_DIRECTIONS_ID; +import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_DIVIDER_ID; +import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_DOWNLOAD_MAPS_ID; +import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_HELP_ID; +import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_MAP_MARKERS_ID; +import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_MEASURE_DISTANCE_ID; +import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_MY_PLACES_ID; +import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_OSMAND_LIVE_ID; +import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_PLUGINS_ID; +import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_SEARCH_ID; +import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_SETTINGS_ID; +import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_TRAVEL_GUIDES_ID; + +public class MenuItemsManager { + + private OsmandApplication app; + + public MenuItemsManager(OsmandApplication app) { + this.app = app; + } + + List getDrawerItemsDefault() { + List items = new ArrayList<>(); + items.add(new MenuItemBase(DRAWER_DASHBOARD_ID, R.string.home, R.string.app_name_osmand, R.drawable.map_dashboard, 0, false)); + items.add(new MenuItemBase(DRAWER_MAP_MARKERS_ID, R.string.map_markers, R.string.app_name_osmand, R.drawable.ic_action_flag_dark, 1, false)); + items.add(new MenuItemBase(DRAWER_MY_PLACES_ID, R.string.shared_string_my_places, R.string.app_name_osmand, R.drawable.ic_action_fav_dark, 2, false)); + items.add(new MenuItemBase(DRAWER_SEARCH_ID, R.string.shared_string_search, R.string.app_name_osmand, R.drawable.ic_action_search_dark, 3, false)); + items.add(new MenuItemBase(DRAWER_DIRECTIONS_ID, R.string.get_directions, R.string.app_name_osmand, R.drawable.ic_action_gdirections_dark, 4, false)); + items.add(new MenuItemBase(DRAWER_CONFIGURE_MAP_ID, R.string.configure_map, R.string.app_name_osmand, R.drawable.ic_action_layers, 5, false)); + items.add(new MenuItemBase(DRAWER_DOWNLOAD_MAPS_ID, R.string.shared_string_download_map, R.string.app_name_osmand, R.drawable.ic_type_archive, 6, false)); + items.add(new MenuItemBase(DRAWER_OSMAND_LIVE_ID, R.string.osm_live, R.string.app_name_osmand, R.drawable.ic_action_osm_live, 7, false)); + items.add(new MenuItemBase(DRAWER_TRAVEL_GUIDES_ID, R.string.wikivoyage_travel_guide, R.string.app_name_osmand, R.drawable.ic_action_travel, 8, false)); + items.add(new MenuItemBase(DRAWER_MEASURE_DISTANCE_ID, R.string.measurement_tool, R.string.app_name_osmand, R.drawable.ic_action_ruler, 9, false)); + items.add(new MenuItemBase(DRAWER_DIVIDER_ID, R.string.shared_string_divider, R.string.shared_string_divider, 0, 10, false)); + items.add(new MenuItemBase(DRAWER_CONFIGURE_SCREEN_ID, R.string.layer_map_appearance, R.string.app_name_osmand, R.drawable.ic_configure_screen_dark, 11, false)); + items.add(new MenuItemBase(DRAWER_PLUGINS_ID, R.string.plugins_screen, R.string.app_name_osmand, R.drawable.ic_extension_dark, 12, false)); + items.add(new MenuItemBase(DRAWER_SETTINGS_ID, R.string.shared_string_settings, R.string.app_name_osmand, R.drawable.ic_action_settings, 13, false)); + items.add(new MenuItemBase(DRAWER_HELP_ID, R.string.shared_string_help, R.string.app_name_osmand, R.drawable.ic_action_help, 14, false)); + if (Version.isDeveloperVersion(app)) { + items.add(new MenuItemBase(DRAWER_BUILDS_ID, R.string.version_settings, R.string.developer_plugin, R.drawable.ic_action_gabout_dark, 15, false)); + } + return items; + } + + + public List getDrawerIdsDefaultOrder() { + return getMenuItemsIdsDefaultOrder(getDrawerItemsDefault()); + } + + public LinkedHashMap getDrawerItemsSavedOrder() { + return getMenuItemsOrder(app.getSettings().DRAWER_ITEMS_ORDER); + } + + private List getMenuItemsIdsDefaultOrder(List items) { + List itemsIds = new ArrayList<>(); + for (MenuItemBase item : items) { + itemsIds.add(item.getId()); + } + return itemsIds; + } + + private LinkedHashMap getMenuItemsOrder(ListStringPreference preference) { + List ids = preference.getStringsList(); + if (ids == null) { + ids = getDrawerIdsDefaultOrder(); + } + LinkedHashMap result = new LinkedHashMap<>(); + for (int i = 0; i < ids.size(); i++) { + result.put(ids.get(i), i); + } + return result; + } +} diff --git a/OsmAnd/src/net/osmand/plus/settings/UiCustomizationFragment.java b/OsmAnd/src/net/osmand/plus/settings/UiCustomizationFragment.java deleted file mode 100644 index 38b6c5c1e6..0000000000 --- a/OsmAnd/src/net/osmand/plus/settings/UiCustomizationFragment.java +++ /dev/null @@ -1,448 +0,0 @@ -package net.osmand.plus.settings; - -import android.content.Context; -import android.content.DialogInterface; -import android.os.Build; -import android.os.Bundle; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; -import android.widget.ImageButton; -import android.widget.ImageView; -import android.widget.TextView; - -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; -import androidx.appcompat.app.AlertDialog; -import androidx.appcompat.widget.Toolbar; -import androidx.fragment.app.FragmentManager; -import androidx.recyclerview.widget.LinearLayoutManager; -import androidx.recyclerview.widget.RecyclerView; - -import net.osmand.AndroidUtils; -import net.osmand.plus.OsmandApplication; -import net.osmand.plus.R; -import net.osmand.plus.UiUtilities; -import net.osmand.plus.base.BaseOsmAndFragment; -import net.osmand.plus.poi.RearrangePoiFiltersFragment; -import net.osmand.plus.settings.UiCustomizationRootFragment.ScreenType; -import net.osmand.plus.views.controls.ReorderItemTouchHelperCallback; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_DASHBOARD_ID; -import static net.osmand.aidlapi.OsmAndCustomizationConstants.FAVORITES_ID; -import static net.osmand.aidlapi.OsmAndCustomizationConstants.POI_OVERLAY_ID; -import static net.osmand.aidlapi.OsmAndCustomizationConstants.SHOW_CATEGORY_ID; - -public class UiCustomizationFragment extends BaseOsmAndFragment { - - public static final String TAG = UiCustomizationFragment.class.getName(); - private static final String ITEM_TYPE_KEY = "item_type_key"; - private static String ITEMS_ORDER_KEY = "items_order_key"; - - private HashMap itemsOrder = new HashMap<>(); - - private List items = new ArrayList<>(); - - private OsmandApplication app; - private boolean nightMode; - private ScreenType type; - private LayoutInflater mInflater; - - - @Override - public void onSaveInstanceState(@NonNull Bundle outState) { - super.onSaveInstanceState(outState); - outState.putSerializable(ITEM_TYPE_KEY, type); - } - - public static UiCustomizationFragment showInstance(@NonNull FragmentManager fm, @NonNull ScreenType type) { - UiCustomizationFragment fragment = new UiCustomizationFragment(); - fragment.setType(type); - fm.beginTransaction() - .replace(R.id.fragmentContainer, fragment, TAG) - .addToBackStack(null) - .commitAllowingStateLoss(); - return fragment; - } - - @Override - public void onCreate(@Nullable Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - if (savedInstanceState != null) { - type = (ScreenType) savedInstanceState.getSerializable(ITEM_TYPE_KEY); - } - app = requireMyApplication(); - nightMode = !app.getSettings().isLightContent(); - mInflater = UiUtilities.getInflater(app, nightMode); - } - - @Nullable - @Override - public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { - View root = mInflater.inflate(R.layout.edit_arrangement_list_fragment, container, false); - Toolbar toolbar = root.findViewById(R.id.toolbar); - TextView toolbarTitle = root.findViewById(R.id.toolbar_title); - ImageButton toolbarButton = root.findViewById(R.id.close_button); - RecyclerView recyclerView = root.findViewById(R.id.profiles_list); - toolbar.setBackgroundColor(nightMode - ? getResources().getColor(R.color.list_background_color_dark) - : getResources().getColor(R.color.list_background_color_light)); - toolbarTitle.setTextColor(nightMode - ? getResources().getColor(R.color.text_color_primary_dark) - : getResources().getColor(R.color.list_background_color_dark)); - toolbarButton.setImageDrawable(getPaintedContentIcon(R.drawable.ic_arrow_back, getResources().getColor(R.color.text_color_secondary_light))); - toolbarTitle.setText(type.titleRes); - toolbar.setNavigationOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View view) { - showExitDialog(); - } - }); - - recyclerView.setLayoutManager(new LinearLayoutManager(app)); - - UiItemAdapter adapter = new UiItemAdapter(getItems(), new UiItemsAdapterListener() { - @Override - public void onDragStarted(RecyclerView.ViewHolder holder) { - - } - - @Override - public void onDragOrSwipeEnded(RecyclerView.ViewHolder holder) { - - } - - @Override - public void onButtonClicked(int view) { - - } - }); - - recyclerView.setAdapter(adapter); - - -// final ItemTouchHelper touchHelper = new ItemTouchHelper(new ReorderItemTouchHelperCallback(adapter)); -// touchHelper.attachToRecyclerView(recyclerView); - - if (Build.VERSION.SDK_INT >= 21) { - AndroidUtils.addStatusBarPadding21v(app, root); - } - return root; - } - - private List getItems() { - - - List items = new ArrayList<>(); - items.add(new ListItem(AdapterItemType.DESCRIPTION, type)); - items.addAll(getDrawerListItems()); - items.add(new ListItem(AdapterItemType.DIVIDER, 1)); - return items; - } - - private class ListItem { - AdapterItemType type; - Object value; - - public ListItem(AdapterItemType type, Object value) { - this.type = type; - this.value = value; - } - } - - - @Override - public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { - super.onViewCreated(view, savedInstanceState); - } - - public void showExitDialog() { - Context themedContext = UiUtilities.getThemedContext(getActivity(), nightMode); - AlertDialog.Builder dismissDialog = new AlertDialog.Builder(themedContext); - dismissDialog.setTitle(getString(R.string.shared_string_dismiss)); - dismissDialog.setMessage(getString(R.string.exit_without_saving)); - dismissDialog.setNegativeButton(R.string.shared_string_cancel, null); - dismissDialog.setPositiveButton(R.string.shared_string_exit, new DialogInterface.OnClickListener() { - @Override - public void onClick(DialogInterface dialog, int which) { - dismissFragment(); - } - }); - dismissDialog.show(); - } - - private void dismissFragment() { - FragmentManager fm = getFragmentManager(); - if (fm != null && !fm.isStateSaved()) { - getFragmentManager().popBackStack(); - } - } - - public void setType(ScreenType type) { - this.type = type; - } - - public interface UiItemsAdapterListener { - - void onDragStarted(RecyclerView.ViewHolder holder); - - void onDragOrSwipeEnded(RecyclerView.ViewHolder holder); - - void onButtonClicked(int view); - } - - private enum AdapterItemType { - DESCRIPTION, - UI_ITEM, - MOVE_DIVIDER, - DIVIDER, - HEADER, - BUTTON - } - - private class UiItemAdapter extends RecyclerView.Adapter - implements ReorderItemTouchHelperCallback.OnItemMoveCallback { - - private List items; - private UiItemsAdapterListener listener; - - public UiItemAdapter(List items, UiItemsAdapterListener listener) { - this.items = items; - this.listener = listener; - } - - @Override - public int getItemViewType(int position) { - ListItem listItem = items.get(position); - return listItem.type.ordinal(); - } - - @NonNull - @Override - public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { - AdapterItemType itemType = AdapterItemType.values()[viewType]; - View view; - switch (itemType) { - case DESCRIPTION: - view = mInflater.inflate(R.layout.list_item_description_with_image, parent, false); - return new DescriptionHolder(view); - case UI_ITEM: - view = mInflater.inflate(R.layout.change_order_item, parent, false); - return new ItemHolder(view); - case MOVE_DIVIDER: - view = mInflater.inflate(R.layout.list_item_move_header, parent, false); - return new MoveDividerHolder(view); - case DIVIDER: - view = mInflater.inflate(R.layout.divider, parent, false); - return new DividerHolder(view); - case HEADER: - view = mInflater.inflate(R.layout.preference_category_with_descr, parent, false); - return new HeaderHolder(view); - case BUTTON: - view = mInflater.inflate(R.layout.preference_button, parent, false); - return new ButtonHolder(view); - default: - throw new IllegalArgumentException("Unsupported view type"); - } - } - - @Override - public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) { - ListItem item = items.get(position); - if (holder instanceof DescriptionHolder) { - DescriptionHolder h = (DescriptionHolder) holder; - ScreenType screenType = (ScreenType) item.value; - h.description.setText(String.format(getString(R.string.reorder_or_hide_from), getString(screenType.titleRes))); - h.image.setImageResource(nightMode ? screenType.imageNightRes : screenType.imageDayRes); - } else if (holder instanceof ItemHolder) { - ItemHolder h = (ItemHolder) holder; - } else if (holder instanceof HeaderHolder) { - HeaderHolder h = (HeaderHolder) holder; - } else if (holder instanceof MoveDividerHolder) { - MoveDividerHolder h = (MoveDividerHolder) holder; - } else if (holder instanceof ButtonHolder) { - ButtonHolder h = (ButtonHolder) holder; - } - } - - @Override - public int getItemCount() { - return items.size(); - } - - @Override - public boolean onItemMove(int from, int to) { - return false; - } - - @Override - public void onItemDismiss(RecyclerView.ViewHolder holder) { - listener.onDragOrSwipeEnded(holder); - } - - private class DescriptionHolder extends RecyclerView.ViewHolder implements ReorderItemTouchHelperCallback.UnmovableItem { - private ImageView image; - private TextView description; - - public DescriptionHolder(@NonNull View itemView) { - super(itemView); - image = itemView.findViewById(R.id.image); - description = itemView.findViewById(R.id.description); - } - - @Override - public boolean isMovingDisabled() { - return true; - } - } - - private class ItemHolder extends RecyclerView.ViewHolder implements ReorderItemTouchHelperCallback.UnmovableItem { - - private TextView title; - private TextView description; - private ImageView icon; - private ImageView actionIcon; - private ImageView moveIcon; - private View itemsContainer; - - public ItemHolder(@NonNull View itemView) { - super(itemView); - title = itemView.findViewById(R.id.title); - actionIcon = itemView.findViewById(R.id.action_icon); - icon = itemView.findViewById(R.id.icon); - moveIcon = itemView.findViewById(R.id.move_icon); - itemsContainer = itemView.findViewById(R.id.selectable_list_item); - } - - @Override - public boolean isMovingDisabled() { -// int position = getAdapterPosition(); -// if (position != RecyclerView.NO_POSITION) { -// RearrangePoiFiltersFragment.ListItem item = items.get(position); -// if (item.value instanceof RearrangePoiFiltersFragment.PoiUIFilterDataObject) { -// RearrangePoiFiltersFragment.PoiUIFilterDataObject pdo = (RearrangePoiFiltersFragment.PoiUIFilterDataObject) item.value; -// return !pdo.isActive; -// } -// } - return true; - } - } - - private class MoveDividerHolder extends RecyclerView.ViewHolder implements ReorderItemTouchHelperCallback.UnmovableItem { - - public MoveDividerHolder(@NonNull View itemView) { - super(itemView); - } - - @Override - public boolean isMovingDisabled() { - return false; - } - } - - private class DividerHolder extends RecyclerView.ViewHolder implements ReorderItemTouchHelperCallback.UnmovableItem { - View divider; - - public DividerHolder(View itemView) { - super(itemView); - divider = itemView.findViewById(R.id.divider); - } - - @Override - public boolean isMovingDisabled() { - return true; - } - } - - private class HeaderHolder extends RecyclerView.ViewHolder implements ReorderItemTouchHelperCallback.UnmovableItem { - private TextView title; - private TextView description; - - public HeaderHolder(@NonNull View itemView) { - super(itemView); - title = itemView.findViewById(android.R.id.title); - description = itemView.findViewById(android.R.id.summary); - } - - @Override - public boolean isMovingDisabled() { - return true; - } - } - - private class ButtonHolder extends RecyclerView.ViewHolder implements ReorderItemTouchHelperCallback.UnmovableItem { - private View button; - private ImageView icon; - private TextView title; - - public ButtonHolder(@NonNull View itemView) { - super(itemView); - button = itemView; - icon = itemView.findViewById(android.R.id.icon); - title = itemView.findViewById(android.R.id.title); - } - - @Override - public boolean isMovingDisabled() { - return true; - } - } - } - - private List getDrawerItems() { - List list = new ArrayList<>(); - list.add(new UiItemBase(FAVORITES_ID, R.string.shared_string_favorites, R.string.shared_string_favorites, R.drawable.ic_action_fav_dark, 0)); - list.add(new UiItemBase(POI_OVERLAY_ID, R.string.layer_poi, R.string.layer_poi, R.drawable.ic_action_info_dark, 1)); - return list; - } - - private List getDrawerListItems() { - List itemBases = getDrawerItems(); - List listItems = new ArrayList<>(); - for (UiItemBase itemBase : itemBases) { - listItems.add(new ListItem(AdapterItemType.UI_ITEM, itemBase)); - } - return listItems; - } - - - private class UiItemBase { - private String id; - private int titleRes; - private int descrRes; - private int iconRes; - private int order; - - public UiItemBase(String id, int titleRes, int descrRes, int iconRes, int order) { - this.id = id; - this.titleRes = titleRes; - this.descrRes = descrRes; - this.iconRes = iconRes; - this.order = order; - } - - public String getId() { - return id; - } - - public int getTitleRes() { - return titleRes; - } - - public int getDescrRes() { - return descrRes; - } - - public int getIconRes() { - return iconRes; - } - - public int getOrder() { - return order; - } - } -} diff --git a/OsmAnd/src/net/osmand/view/BaseMoveItemAdapter.java b/OsmAnd/src/net/osmand/view/BaseMoveItemAdapter.java deleted file mode 100644 index f1f90a5ec8..0000000000 --- a/OsmAnd/src/net/osmand/view/BaseMoveItemAdapter.java +++ /dev/null @@ -1,48 +0,0 @@ -package net.osmand.view; - -import android.view.ViewGroup; - -import androidx.annotation.NonNull; -import androidx.recyclerview.widget.RecyclerView; - -import net.osmand.plus.settings.UiCustomizationFragment; -import net.osmand.plus.views.controls.ReorderItemTouchHelperCallback; - -import java.util.List; - -public abstract class BaseMoveItemAdapter - extends RecyclerView.Adapter - implements ReorderItemTouchHelperCallback.OnItemMoveCallback { - -// private List - - - @NonNull - @Override - public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { - return null; - } - - @Override - public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) { - - } - -// private class ListItem { -// UiCustomizationFragment.AdapterItemType type; -// Object value; -// -// public ListItem(UiCustomizationFragment.AdapterItemType type, Object value) { -// this.type = type; -// this.value = value; -// } -// } - - public enum ItemType { - DESCRIPTION, - UI_ITEM, - DIVIDER, - HEADER, - BUTTON - } -} From 07cc37f791dbd24a7acf715248f0ab08d567a06f Mon Sep 17 00:00:00 2001 From: veliymolfar Date: Wed, 1 Apr 2020 17:00:15 +0300 Subject: [PATCH 008/202] wip --- .../list_item_description_with_image.xml | 2 + OsmAnd/res/values/strings.xml | 1 + .../src/net/osmand/plus/OsmandSettings.java | 9 +- .../settings/ConfigureMenuItemsFragment.java | 94 ++++++------------ .../settings/ConfigureMenuRootFragment.java | 41 ++++++-- .../plus/settings/MenuItemsManager.java | 98 ++++++++++++++++++- 6 files changed, 168 insertions(+), 77 deletions(-) diff --git a/OsmAnd/res/layout/list_item_description_with_image.xml b/OsmAnd/res/layout/list_item_description_with_image.xml index 2c362c3e19..200ffd6107 100644 --- a/OsmAnd/res/layout/list_item_description_with_image.xml +++ b/OsmAnd/res/layout/list_item_description_with_image.xml @@ -17,6 +17,8 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="@dimen/content_padding" + android:letterSpacing="0.02" + android:lineSpacingExtra="@dimen/line_spacing_extra_description" android:textColor="?android:textColorSecondary" android:textSize="@dimen/default_desc_text_size" tools:text="@string/ui_customization_description" /> diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index d5dedffc1a..a0e3bae0de 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -11,6 +11,7 @@ Thx - Hardy --> + Items Custom OsmAnd plugin Snowmobile Ski touring diff --git a/OsmAnd/src/net/osmand/plus/OsmandSettings.java b/OsmAnd/src/net/osmand/plus/OsmandSettings.java index 640f61ab01..afce0f0e89 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandSettings.java +++ b/OsmAnd/src/net/osmand/plus/OsmandSettings.java @@ -3385,7 +3385,14 @@ public class OsmandSettings { public void setSelectedPoiFilters(final Set poiFilters) { SELECTED_POI_FILTER_FOR_MAP.set(android.text.TextUtils.join(",", poiFilters)); } - + + public final ListStringPreference HIDDEN_CONTEXT_MENU_ACTIONS_ITEMS = (ListStringPreference) + new ListStringPreference("hidden_context_menu_actions_items", null, ",,").makeProfile().cache(); + + public final ListStringPreference HIDDEN_CONFIGURE_MAP_ITEMS = (ListStringPreference) + new ListStringPreference("hidden_configure_map_items", null, ",,").makeProfile().cache(); + + public final ListStringPreference DRAWER_ITEMS_ORDER = (ListStringPreference) new ListStringPreference("drawer_items_order", null, ",,").makeProfile().cache(); diff --git a/OsmAnd/src/net/osmand/plus/settings/ConfigureMenuItemsFragment.java b/OsmAnd/src/net/osmand/plus/settings/ConfigureMenuItemsFragment.java index ced31a06bd..c9be548385 100644 --- a/OsmAnd/src/net/osmand/plus/settings/ConfigureMenuItemsFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/ConfigureMenuItemsFragment.java @@ -26,6 +26,7 @@ import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; import net.osmand.plus.UiUtilities; import net.osmand.plus.activities.MapActivity; +import net.osmand.plus.activities.MapActivityActions; import net.osmand.plus.base.BaseOsmAndFragment; import net.osmand.plus.settings.ConfigureMenuRootFragment.ScreenType; import net.osmand.plus.views.controls.ReorderItemTouchHelperCallback; @@ -60,8 +61,9 @@ public class ConfigureMenuItemsFragment extends BaseOsmAndFragment { private ScreenType type; private LayoutInflater mInflater; private MenuItemsManager menuItemsManager; - private HashMap menuItemsOrder = new LinkedHashMap<>(); - private List hiddenMenuItems = new ArrayList<>(); + private HashMap menuItemsOrder; + private List hiddenMenuItems; + private MenuItemsAdapter adapter; @Override public void onSaveInstanceState(@NonNull Bundle outState) { @@ -84,6 +86,12 @@ public class ConfigureMenuItemsFragment extends BaseOsmAndFragment { @Override public void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); + app = requireMyApplication(); + nightMode = !app.getSettings().isLightContent(); + mInflater = UiUtilities.getInflater(app, nightMode); + menuItemsManager = new MenuItemsManager(app); +// MapActivityActions mapActivityActions = new MapActivityActions(getActivity()) + if (savedInstanceState != null && savedInstanceState.containsKey(ITEM_TYPE_KEY) && savedInstanceState.containsKey(HIDDEN_ITEMS_KEY) @@ -91,18 +99,11 @@ public class ConfigureMenuItemsFragment extends BaseOsmAndFragment { type = (ScreenType) savedInstanceState.getSerializable(ITEM_TYPE_KEY); hiddenMenuItems = savedInstanceState.getStringArrayList(HIDDEN_ITEMS_KEY); menuItemsOrder = (HashMap) savedInstanceState.getSerializable(ITEMS_ORDER_KEY); + } else { + hiddenMenuItems = menuItemsManager.getHiddenItemsIds(type); +// TODO + menuItemsOrder = menuItemsManager.getDrawerItemsSavedOrder(); } - app = requireMyApplication(); - nightMode = !app.getSettings().isLightContent(); - mInflater = UiUtilities.getInflater(app, nightMode); - menuItemsManager = new MenuItemsManager(app); - - List ids = app.getSettings().HIDDEN_DRAWER_ITEMS.getStringsList(); - hiddenMenuItems = new ArrayList<>(); - if (ids != null) { - hiddenMenuItems.addAll(ids); - } - menuItemsOrder = menuItemsManager.getDrawerItemsSavedOrder(); } @Nullable @@ -127,10 +128,8 @@ public class ConfigureMenuItemsFragment extends BaseOsmAndFragment { showExitDialog(); } }); - recyclerView.setLayoutManager(new LinearLayoutManager(app)); - - final MenuItemsAdapter adapter = new MenuItemsAdapter(app, getAdapterItems()); + adapter = new MenuItemsAdapter(app, getAdapterItems()); final ItemTouchHelper touchHelper = new ItemTouchHelper(new ReorderItemTouchHelperCallback(adapter)); touchHelper.attachToRecyclerView(recyclerView); MenuItemsAdapterListener listener = new MenuItemsAdapterListener() { @@ -173,7 +172,6 @@ public class ConfigureMenuItemsFragment extends BaseOsmAndFragment { }; adapter.setListener(listener); recyclerView.setAdapter(adapter); - View cancelButton = root.findViewById(R.id.dismiss_button); UiUtilities.setupDialogButton(nightMode, cancelButton, UiUtilities.DialogButtonType.SECONDARY, R.string.shared_string_cancel); cancelButton.setOnClickListener(new View.OnClickListener() { @@ -185,52 +183,25 @@ public class ConfigureMenuItemsFragment extends BaseOsmAndFragment { } } }); - root.findViewById(R.id.buttons_divider).setVisibility(View.VISIBLE); - View applyButton = root.findViewById(R.id.right_bottom_button); UiUtilities.setupDialogButton(nightMode, applyButton, UiUtilities.DialogButtonType.PRIMARY, R.string.shared_string_apply); applyButton.setVisibility(View.VISIBLE); applyButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { - MapActivity mapActivity = (MapActivity) getActivity(); - if (mapActivity != null) { - OsmandApplication app = mapActivity.getMyApplication(); - app.getSettings().HIDDEN_DRAWER_ITEMS.setStringsList(hiddenMenuItems); - - - List drawerItems = menuItemsManager.getDrawerItemsDefault(); - - for (MenuItemBase menuItemBase : drawerItems) { - Integer order = menuItemsOrder.get(menuItemBase.getId()); - if (order == null) { - order = menuItemBase.getOrder(); - } - menuItemBase.setOrder(order); - - } - - Collections.sort(drawerItems, new Comparator() { - @Override - public int compare(MenuItemBase item1, MenuItemBase item2) { - int order1 = item1.getOrder(); - int order2 = item2.getOrder(); - return (order1 < order2) ? -1 : ((order1 == order2) ? 0 : 1); - } - }); - - List ids = new ArrayList<>(); - for (MenuItemBase menuItemBase : drawerItems) { - ids.add(menuItemBase.getId()); - } - app.getSettings().DRAWER_ITEMS_ORDER.setStringsList(ids); - - dismissFragment(); + menuItemsManager.saveHiddenItemsIds(type, hiddenMenuItems); + List defaultItems; + defaultItems = menuItemsManager.getDrawerItemsDefault(); + menuItemsManager.reorderMenuItems(defaultItems, menuItemsOrder); + List ids = new ArrayList<>(); + for (MenuItemBase item : defaultItems) { + ids.add(item.getId()); } + menuItemsManager.saveItemsIdsOrder(type, ids); + dismissFragment(); } }); - if (Build.VERSION.SDK_INT >= 21) { AndroidUtils.addStatusBarPadding21v(app, root); } @@ -289,17 +260,10 @@ public class ConfigureMenuItemsFragment extends BaseOsmAndFragment { new View.OnClickListener() { @Override public void onClick(View view) { - switch (type) { - case DRAWER: - app.getSettings().DRAWER_ITEMS_ORDER.setStringsList(null); - app.getSettings().HIDDEN_DRAWER_ITEMS.setStringsList(null); - - break; - case CONFIGURE_MAP: - break; - case CONTEXT_MENU_ACTIONS: - break; - } + hiddenMenuItems.clear(); + menuItemsOrder.clear(); + menuItemsManager.resetMenuItems(type); + adapter.updateItems(getAdapterItems()); } }))); items.add(new AdapterItem(BUTTON, new ButtonItem( @@ -308,7 +272,7 @@ public class ConfigureMenuItemsFragment extends BaseOsmAndFragment { new View.OnClickListener() { @Override public void onClick(View view) { - + //TODO } }))); return items; diff --git a/OsmAnd/src/net/osmand/plus/settings/ConfigureMenuRootFragment.java b/OsmAnd/src/net/osmand/plus/settings/ConfigureMenuRootFragment.java index 6c7305b8e4..50e3bb2de8 100644 --- a/OsmAnd/src/net/osmand/plus/settings/ConfigureMenuRootFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/ConfigureMenuRootFragment.java @@ -31,6 +31,8 @@ import net.osmand.plus.R; import net.osmand.plus.UiUtilities; import net.osmand.plus.activities.PluginsActivity; import net.osmand.plus.base.BaseOsmAndFragment; +import net.osmand.plus.helpers.FontCache; +import net.osmand.plus.widgets.style.CustomTypefaceSpan; import org.apache.commons.logging.Log; @@ -47,6 +49,7 @@ public class ConfigureMenuRootFragment extends BaseOsmAndFragment { private OsmandApplication app; private LayoutInflater mInflater; private boolean nightMode; + private MenuItemsManager menuItemsManager; @Override public void onCreate(Bundle savedInstanceState) { @@ -54,9 +57,7 @@ public class ConfigureMenuRootFragment extends BaseOsmAndFragment { app = requireMyApplication(); nightMode = !app.getSettings().isLightContent(); mInflater = UiUtilities.getInflater(app, nightMode); -// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { -// getActivity().getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR); -// } + menuItemsManager = new MenuItemsManager(app); } @Nullable @@ -77,6 +78,15 @@ public class ConfigureMenuRootFragment extends BaseOsmAndFragment { : getResources().getColor(R.color.list_background_color_dark)); toolbarSubTitle.setTextColor(getResources().getColor(R.color.text_color_secondary_light)); toolbarButton.setImageDrawable(getPaintedContentIcon(R.drawable.ic_arrow_back, getResources().getColor(R.color.text_color_secondary_light))); + toolbarButton.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + FragmentManager fm = getFragmentManager(); + if (fm != null) { + fm.popBackStack(); + } + } + }); toolbarTitle.setText(R.string.ui_customization); toolbarSubTitle.setText(profile.toHumanString()); toolbarSubTitle.setVisibility(View.VISIBLE); @@ -102,7 +112,7 @@ public class ConfigureMenuRootFragment extends BaseOsmAndFragment { @Override public int getStatusBarColorId() { - return nightMode ? R.color.list_background_color_dark : R.color.list_background_color_light; + return nightMode ? R.color.activity_background_dark : R.color.activity_background_light; } @@ -156,6 +166,7 @@ public class ConfigureMenuRootFragment extends BaseOsmAndFragment { ItemHolder itemHolder = (ItemHolder) holder; itemHolder.icon.setImageResource(item.iconRes); itemHolder.title.setText(item.titleRes); + itemHolder.subTitle.setText(getSubTitleText(item)); itemHolder.itemView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { @@ -180,6 +191,7 @@ public class ConfigureMenuRootFragment extends BaseOsmAndFragment { }; try { int startIndex = text.indexOf(clickableText); + spannableString.setSpan(new CustomTypefaceSpan(FontCache.getRobotoMedium(app)), startIndex, startIndex + clickableText.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); spannableString.setSpan(clickableSpan, startIndex, startIndex + clickableText.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); textView.setText(spannableString); textView.setMovementMethod(LinkMovementMethod.getInstance()); @@ -191,6 +203,23 @@ public class ConfigureMenuRootFragment extends BaseOsmAndFragment { } } + private String getSubTitleText(ScreenType type) { + int allCount = 0; + int hiddenCount = 0; + switch (type) { + case DRAWER: + allCount = menuItemsManager.getDrawerIdsDefaultOrder().size(); + hiddenCount = menuItemsManager.getHiddenItemsIds(type).size(); + break; + case CONFIGURE_MAP: + break; + case CONTEXT_MENU_ACTIONS: + break; + } + String amount = getString(R.string.n_items_of_z, String.valueOf(allCount - hiddenCount), String.valueOf(allCount)); + return getString(R.string.ltr_or_rtl_combine_via_colon, getString(R.string.shared_string_items), amount); + } + class DescriptionHolder extends RecyclerView.ViewHolder { ImageView image; TextView description; @@ -217,9 +246,9 @@ public class ConfigureMenuRootFragment extends BaseOsmAndFragment { } public enum ScreenType { - DRAWER(R.string.shared_string_drawer, R.drawable.ic_action_layers, R.drawable.img_settings_customize_drawer_day, R.drawable.img_settings_customize_drawer_night), + DRAWER(R.string.shared_string_drawer, R.drawable.ic_action_drawer, R.drawable.img_settings_customize_drawer_day, R.drawable.img_settings_customize_drawer_night), CONFIGURE_MAP(R.string.configure_map, R.drawable.ic_action_layers, R.drawable.img_settings_customize_configure_map_day, R.drawable.img_settings_customize_configure_map_night), - CONTEXT_MENU_ACTIONS(R.string.context_menu_actions, R.drawable.ic_action_layers, R.drawable.img_settings_customize_context_menu_day, R.drawable.img_settings_customize_context_menu_night); + CONTEXT_MENU_ACTIONS(R.string.context_menu_actions, R.drawable.ic_action_context_menu, R.drawable.img_settings_customize_context_menu_day, R.drawable.img_settings_customize_context_menu_night); @StringRes public int titleRes; diff --git a/OsmAnd/src/net/osmand/plus/settings/MenuItemsManager.java b/OsmAnd/src/net/osmand/plus/settings/MenuItemsManager.java index d6e18ef3ba..ba77cbbcab 100644 --- a/OsmAnd/src/net/osmand/plus/settings/MenuItemsManager.java +++ b/OsmAnd/src/net/osmand/plus/settings/MenuItemsManager.java @@ -1,21 +1,22 @@ package net.osmand.plus.settings; + import androidx.annotation.NonNull; import androidx.annotation.Nullable; import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.List; -import java.util.Map; import net.osmand.plus.OsmandApplication; -import net.osmand.plus.OsmandSettings; import net.osmand.plus.R; import net.osmand.plus.Version; import net.osmand.plus.settings.MenuItemsAdapter.MenuItemBase; -import net.osmand.plus.OsmandSettings.ListStringPreference; import net.osmand.plus.settings.ConfigureMenuRootFragment.ScreenType; +import net.osmand.plus.OsmandSettings.ListStringPreference; import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_BUILDS_ID; import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_CONFIGURE_MAP_ID; @@ -33,6 +34,21 @@ import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_PLUGINS_ID; import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_SEARCH_ID; import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_SETTINGS_ID; import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_TRAVEL_GUIDES_ID; +import static net.osmand.aidlapi.OsmAndCustomizationConstants.MAP_CONTEXT_MENU_ADD_GPX_WAYPOINT; +import static net.osmand.aidlapi.OsmAndCustomizationConstants.MAP_CONTEXT_MENU_AVOID_ROAD; +import static net.osmand.aidlapi.OsmAndCustomizationConstants.MAP_CONTEXT_MENU_CHANGE_MARKER_POSITION; +import static net.osmand.aidlapi.OsmAndCustomizationConstants.MAP_CONTEXT_MENU_CREATE_POI; +import static net.osmand.aidlapi.OsmAndCustomizationConstants.MAP_CONTEXT_MENU_DIRECTIONS_FROM_ID; +import static net.osmand.aidlapi.OsmAndCustomizationConstants.MAP_CONTEXT_MENU_DOWNLOAD_MAP; +import static net.osmand.aidlapi.OsmAndCustomizationConstants.MAP_CONTEXT_MENU_EDIT_GPX_WP; +import static net.osmand.aidlapi.OsmAndCustomizationConstants.MAP_CONTEXT_MENU_MARK_AS_PARKING_LOC; +import static net.osmand.aidlapi.OsmAndCustomizationConstants.MAP_CONTEXT_MENU_MEASURE_DISTANCE; +import static net.osmand.aidlapi.OsmAndCustomizationConstants.MAP_CONTEXT_MENU_MODIFY_OSM_CHANGE; +import static net.osmand.aidlapi.OsmAndCustomizationConstants.MAP_CONTEXT_MENU_MODIFY_OSM_NOTE; +import static net.osmand.aidlapi.OsmAndCustomizationConstants.MAP_CONTEXT_MENU_MODIFY_POI; +import static net.osmand.aidlapi.OsmAndCustomizationConstants.MAP_CONTEXT_MENU_OPEN_OSM_NOTE; +import static net.osmand.aidlapi.OsmAndCustomizationConstants.MAP_CONTEXT_MENU_SEARCH_NEARBY; +import static net.osmand.aidlapi.OsmAndCustomizationConstants.MAP_CONTEXT_MENU_UPDATE_MAP; public class MenuItemsManager { @@ -54,10 +70,10 @@ public class MenuItemsManager { items.add(new MenuItemBase(DRAWER_OSMAND_LIVE_ID, R.string.osm_live, R.string.app_name_osmand, R.drawable.ic_action_osm_live, 7, false)); items.add(new MenuItemBase(DRAWER_TRAVEL_GUIDES_ID, R.string.wikivoyage_travel_guide, R.string.app_name_osmand, R.drawable.ic_action_travel, 8, false)); items.add(new MenuItemBase(DRAWER_MEASURE_DISTANCE_ID, R.string.measurement_tool, R.string.app_name_osmand, R.drawable.ic_action_ruler, 9, false)); - items.add(new MenuItemBase(DRAWER_DIVIDER_ID, R.string.shared_string_divider, R.string.shared_string_divider, 0, 10, false)); + items.add(new MenuItemBase(DRAWER_DIVIDER_ID, R.string.shared_string_divider, R.string.divider_descr, 0, 10, false)); items.add(new MenuItemBase(DRAWER_CONFIGURE_SCREEN_ID, R.string.layer_map_appearance, R.string.app_name_osmand, R.drawable.ic_configure_screen_dark, 11, false)); items.add(new MenuItemBase(DRAWER_PLUGINS_ID, R.string.plugins_screen, R.string.app_name_osmand, R.drawable.ic_extension_dark, 12, false)); - items.add(new MenuItemBase(DRAWER_SETTINGS_ID, R.string.shared_string_settings, R.string.app_name_osmand, R.drawable.ic_action_settings, 13, false)); + items.add(new MenuItemBase(DRAWER_SETTINGS_ID + ".new", R.string.shared_string_settings, R.string.app_name_osmand, R.drawable.ic_action_settings, 13, false)); items.add(new MenuItemBase(DRAWER_HELP_ID, R.string.shared_string_help, R.string.app_name_osmand, R.drawable.ic_action_help, 14, false)); if (Version.isDeveloperVersion(app)) { items.add(new MenuItemBase(DRAWER_BUILDS_ID, R.string.version_settings, R.string.developer_plugin, R.drawable.ic_action_gabout_dark, 15, false)); @@ -65,6 +81,78 @@ public class MenuItemsManager { return items; } + @NonNull + public List getHiddenItemsIds(@NonNull ScreenType type) { + List hiddenItemsIds = null; + switch (type) { + case DRAWER: + hiddenItemsIds = app.getSettings().HIDDEN_DRAWER_ITEMS.getStringsList(); + break; + case CONFIGURE_MAP: + hiddenItemsIds = app.getSettings().HIDDEN_CONFIGURE_MAP_ITEMS.getStringsList(); + break; + case CONTEXT_MENU_ACTIONS: + hiddenItemsIds = app.getSettings().HIDDEN_CONTEXT_MENU_ACTIONS_ITEMS.getStringsList(); + break; + } + return hiddenItemsIds != null ? hiddenItemsIds : new ArrayList(); + } + + public void saveHiddenItemsIds(@NonNull ScreenType type, @Nullable List hiddenItemsIds) { + switch (type) { + case DRAWER: + app.getSettings().HIDDEN_DRAWER_ITEMS.setStringsList(hiddenItemsIds); + break; + case CONFIGURE_MAP: + app.getSettings().HIDDEN_CONFIGURE_MAP_ITEMS.setStringsList(hiddenItemsIds); + break; + case CONTEXT_MENU_ACTIONS: + app.getSettings().HIDDEN_CONTEXT_MENU_ACTIONS_ITEMS.setStringsList(hiddenItemsIds); + break; + } + } + + public void saveItemsIdsOrder(@NonNull ScreenType type, @Nullable List itemsIdsOrder) { + switch (type) { + case DRAWER: + app.getSettings().DRAWER_ITEMS_ORDER.setStringsList(itemsIdsOrder); + break; + case CONFIGURE_MAP: + break; + case CONTEXT_MENU_ACTIONS: + break; + } + } + + public void reorderMenuItems(@NonNull List defaultItems, @NonNull HashMap itemsOrder) { + for (MenuItemBase item : defaultItems) { + Integer order = itemsOrder.get(item.getId()); + if (order != null) { + item.setOrder(order); + } + } + Collections.sort(defaultItems, new Comparator() { + @Override + public int compare(MenuItemBase item1, MenuItemBase item2) { + int order1 = item1.getOrder(); + int order2 = item2.getOrder(); + return (order1 < order2) ? -1 : ((order1 == order2) ? 0 : 1); + } + }); + } + + public void resetMenuItems(@NonNull ScreenType type) { + switch (type) { + case DRAWER: + app.getSettings().DRAWER_ITEMS_ORDER.setStringsList(null); + app.getSettings().HIDDEN_DRAWER_ITEMS.setStringsList(null); + break; + case CONFIGURE_MAP: + break; + case CONTEXT_MENU_ACTIONS: + break; + } + } public List getDrawerIdsDefaultOrder() { return getMenuItemsIdsDefaultOrder(getDrawerItemsDefault()); From 065f281f92198a6128bbac1a9b721675b0a44829 Mon Sep 17 00:00:00 2001 From: veliymolfar Date: Thu, 2 Apr 2020 20:23:48 +0300 Subject: [PATCH 009/202] initial rearrange menu items implementation --- OsmAnd/res/layout/profile_edit_list_item.xml | 9 + .../net/osmand/plus/ContextMenuAdapter.java | 103 ++++- .../src/net/osmand/plus/ContextMenuItem.java | 9 + .../src/net/osmand/plus/OsmandSettings.java | 5 + .../plus/activities/MapActivityActions.java | 29 -- .../settings/ConfigureMenuItemsFragment.java | 352 ++++++++---------- .../settings/ConfigureMenuRootFragment.java | 12 +- .../plus/settings/MenuItemsManager.java | 184 --------- ...er.java => RearrangeMenuItemsAdapter.java} | 156 +++----- 9 files changed, 345 insertions(+), 514 deletions(-) delete mode 100644 OsmAnd/src/net/osmand/plus/settings/MenuItemsManager.java rename OsmAnd/src/net/osmand/plus/settings/{MenuItemsAdapter.java => RearrangeMenuItemsAdapter.java} (76%) diff --git a/OsmAnd/res/layout/profile_edit_list_item.xml b/OsmAnd/res/layout/profile_edit_list_item.xml index 3075e66982..08c2880c37 100644 --- a/OsmAnd/res/layout/profile_edit_list_item.xml +++ b/OsmAnd/res/layout/profile_edit_list_item.xml @@ -4,9 +4,18 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" + android:orientation="vertical" android:background="?attr/list_background_color" android:gravity="center_vertical"> + + items) { + for (int i = 0; i < items.size(); i++) { + items.get(i).setOrder(i); + } + } + + public List getItemsForRearrangeAdapter(@NonNull ScreenType screenType, @Nullable List hiddenItemsIds, @Nullable HashMap itemsOrderIds, boolean hidden) { + String idScheme = ""; + switch (screenType) { + case DRAWER: + idScheme = DRAWER_ITEM_ID_SCHEME; + break; + case CONFIGURE_MAP: + idScheme = CONFIGURE_MAP_ITEM_ID_SCHEME; + break; + case CONTEXT_MENU_ACTIONS: + idScheme = MAP_CONTEXT_MENU_ACTIONS; + break; + } + if (itemsOrderIds == null || itemsOrderIds.isEmpty()) { + initDefaultOrders(items); + } else { + reorderMenuItems(items, itemsOrderIds); + } + List visibleItems = new ArrayList<>(); + List hiddenItems = new ArrayList<>(); + for (ContextMenuItem item : items) { + String id = item.getId(); + if (id != null && id.startsWith(idScheme) && !APP_PROFILES_ID.equals(id)) { + if (hiddenItemsIds != null && hiddenItemsIds.contains(id)) { + item.setHidden(true); + hiddenItems.add(new AdapterItem(MENU_ITEM, item)); + } else { + item.setHidden(false); + visibleItems.add(new AdapterItem(MENU_ITEM, item)); + } + } + } + return hidden ? hiddenItems : visibleItems; + } + + public List getDefaultItems(ScreenType screenType) { + String idScheme = ""; + switch (screenType) { + case DRAWER: + idScheme = DRAWER_ITEM_ID_SCHEME; + break; + case CONFIGURE_MAP: + idScheme = CONFIGURE_MAP_ITEM_ID_SCHEME; + break; + case CONTEXT_MENU_ACTIONS: + idScheme = MAP_CONTEXT_MENU_ACTIONS; + break; + } + List items = new ArrayList<>(); + for (ContextMenuItem item : this.items) { + String id = item.getId(); + if (id != null && id.startsWith(idScheme) && !APP_PROFILES_ID.equals(id)) { + items.add(item); + } + } + return items; + } + + public void reorderMenuItems(@NonNull List defaultItems, @NonNull HashMap itemsOrder) { + for (ContextMenuItem item : defaultItems) { + Integer order = itemsOrder.get(item.getId()); + if (order != null) { + item.setOrder(order); + } + } + Collections.sort(defaultItems, new Comparator() { + @Override + public int compare(ContextMenuItem item1, ContextMenuItem item2) { + int order1 = item1.getOrder(); + int order2 = item2.getOrder(); + return (order1 < order2) ? -1 : ((order1 == order2) ? 0 : 1); + } + }); + } + + public HashMap getMenuItemsOrder(@NonNull List ids) { + HashMap result = new HashMap<>(); + for (int i = 0; i < ids.size(); i++) { + result.put(ids.get(i), i); + } + return result; + } + } \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/ContextMenuItem.java b/OsmAnd/src/net/osmand/plus/ContextMenuItem.java index 980d255119..dcdd7894f3 100644 --- a/OsmAnd/src/net/osmand/plus/ContextMenuItem.java +++ b/OsmAnd/src/net/osmand/plus/ContextMenuItem.java @@ -30,6 +30,7 @@ public class ContextMenuItem { private final boolean category; private final boolean clickable; private final boolean skipPaintingWithoutColor; + private boolean hidden; private final int pos; private int order; private String description; @@ -150,6 +151,10 @@ public class ContextMenuItem { return clickable; } + public boolean isHidden() { + return hidden; + } + public int getPos() { return pos; } @@ -182,6 +187,10 @@ public class ContextMenuItem { return hideDivider; } + public void setHidden(boolean hidden) { + this.hidden = hidden; + } + public void setTitle(String title) { this.title = title; } diff --git a/OsmAnd/src/net/osmand/plus/OsmandSettings.java b/OsmAnd/src/net/osmand/plus/OsmandSettings.java index afce0f0e89..2e231954e3 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandSettings.java +++ b/OsmAnd/src/net/osmand/plus/OsmandSettings.java @@ -3389,9 +3389,14 @@ public class OsmandSettings { public final ListStringPreference HIDDEN_CONTEXT_MENU_ACTIONS_ITEMS = (ListStringPreference) new ListStringPreference("hidden_context_menu_actions_items", null, ",,").makeProfile().cache(); + public final ListStringPreference CONTEXT_MENU_ACTIONS_ITEMS_ORDER = (ListStringPreference) + new ListStringPreference("context_menu_actions_items_order", null, ",,").makeProfile().cache(); + public final ListStringPreference HIDDEN_CONFIGURE_MAP_ITEMS = (ListStringPreference) new ListStringPreference("hidden_configure_map_items", null, ",,").makeProfile().cache(); + public final ListStringPreference CONFIGURE_MAP_ITEMS_ORDER = (ListStringPreference) + new ListStringPreference("configure_map_items_order", null, ",,").makeProfile().cache(); public final ListStringPreference DRAWER_ITEMS_ORDER = (ListStringPreference) new ListStringPreference("drawer_items_order", null, ",,").makeProfile().cache(); diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java index ffd819eafe..10463946b8 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java @@ -65,7 +65,6 @@ import net.osmand.plus.routepreparationmenu.WaypointsFragment; import net.osmand.plus.routing.RouteProvider.GPXRouteParamsBuilder; import net.osmand.plus.routing.RoutingHelper; import net.osmand.plus.settings.BaseSettingsFragment; -import net.osmand.plus.settings.MenuItemsManager; import net.osmand.plus.views.BaseMapLayer; import net.osmand.plus.views.MapControlsLayer; import net.osmand.plus.views.MapTileLayer; @@ -82,7 +81,6 @@ import java.io.File; import java.text.MessageFormat; import java.util.ArrayList; import java.util.Date; -import java.util.LinkedHashMap; import java.util.List; import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_CONFIGURE_MAP_ID; @@ -988,33 +986,6 @@ public class MapActivityActions implements DialogProvider { divider.setPosition(dividerItemIndex >= 0 ? dividerItemIndex : 8); optionsMenuHelper.addItem(divider.createItem()); - List items = optionsMenuHelper.getItems(); - List newItems = new ArrayList<>(); - List hiddenIds = app.getSettings().HIDDEN_DRAWER_ITEMS.getStringsList(); - - MenuItemsManager manager = new MenuItemsManager(app); - LinkedHashMap order = manager.getDrawerItemsSavedOrder(); - - if (hiddenIds != null){ - for (ContextMenuItem item: items){ - if (!hiddenIds.contains(item.getId())){ - newItems.add(item); - } - } - } else { - newItems.addAll(items); - } - - for (ContextMenuItem item: newItems){ - Integer o = order.get(item.getId()); - if (o == null){ - o = item.getOrder(); - } - item.setOrder(o); - } - - optionsMenuHelper.updateItems(newItems); - optionsMenuHelper.sortItemsByOrder(); return optionsMenuHelper; } diff --git a/OsmAnd/src/net/osmand/plus/settings/ConfigureMenuItemsFragment.java b/OsmAnd/src/net/osmand/plus/settings/ConfigureMenuItemsFragment.java index c9be548385..0ecfe40248 100644 --- a/OsmAnd/src/net/osmand/plus/settings/ConfigureMenuItemsFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/ConfigureMenuItemsFragment.java @@ -1,10 +1,10 @@ package net.osmand.plus.settings; +import android.app.Activity; import android.content.Context; import android.content.DialogInterface; import android.os.Build; import android.os.Bundle; -import android.os.Parcelable; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -22,60 +22,59 @@ import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import net.osmand.AndroidUtils; +import net.osmand.plus.ContextMenuAdapter; +import net.osmand.plus.ContextMenuItem; import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; import net.osmand.plus.UiUtilities; import net.osmand.plus.activities.MapActivity; import net.osmand.plus.activities.MapActivityActions; import net.osmand.plus.base.BaseOsmAndFragment; +import net.osmand.plus.dialogs.ConfigureMapMenu; import net.osmand.plus.settings.ConfigureMenuRootFragment.ScreenType; import net.osmand.plus.views.controls.ReorderItemTouchHelperCallback; -import net.osmand.plus.settings.MenuItemsAdapter.AdapterItem; -import net.osmand.plus.settings.MenuItemsAdapter.HeaderItem; -import net.osmand.plus.settings.MenuItemsAdapter.ButtonItem; -import net.osmand.plus.settings.MenuItemsAdapter.MenuItemBase; -import net.osmand.plus.settings.MenuItemsAdapter.MenuItemsAdapterListener; +import net.osmand.plus.settings.RearrangeMenuItemsAdapter.AdapterItem; +import net.osmand.plus.settings.RearrangeMenuItemsAdapter.MenuItemsAdapterListener; import java.util.ArrayList; import java.util.Collections; -import java.util.Comparator; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.List; -import static net.osmand.plus.settings.MenuItemsAdapter.AdapterItemType.HEADER; -import static net.osmand.plus.settings.MenuItemsAdapter.AdapterItemType.DIVIDER; -import static net.osmand.plus.settings.MenuItemsAdapter.AdapterItemType.DESCRIPTION; -import static net.osmand.plus.settings.MenuItemsAdapter.AdapterItemType.BUTTON; -import static net.osmand.plus.settings.MenuItemsAdapter.AdapterItemType.MENU_ITEM; +import static net.osmand.plus.settings.RearrangeMenuItemsAdapter.AdapterItemType.BUTTON; +import static net.osmand.plus.settings.RearrangeMenuItemsAdapter.AdapterItemType.DESCRIPTION; +import static net.osmand.plus.settings.RearrangeMenuItemsAdapter.AdapterItemType.DIVIDER; +import static net.osmand.plus.settings.RearrangeMenuItemsAdapter.AdapterItemType.HEADER; public class ConfigureMenuItemsFragment extends BaseOsmAndFragment { public static final String TAG = ConfigureMenuItemsFragment.class.getName(); private static final String ITEM_TYPE_KEY = "item_type_key"; - private static String ITEMS_ORDER_KEY = "items_order_key"; - private static String HIDDEN_ITEMS_KEY = "hidden_items_key"; - private static String CONFIGURE_MENU_ITEMS_TAG = "configure_menu_items_tag"; - private OsmandApplication app; - private boolean nightMode; - private ScreenType type; - private LayoutInflater mInflater; - private MenuItemsManager menuItemsManager; + private static final String ITEMS_ORDER_KEY = "items_order_key"; + private static final String HIDDEN_ITEMS_KEY = "hidden_items_key"; + private static final String CONFIGURE_MENU_ITEMS_TAG = "configure_menu_items_tag"; + private RearrangeMenuItemsAdapter rearrangeAdapter; private HashMap menuItemsOrder; + private ContextMenuAdapter contextMenuAdapter; private List hiddenMenuItems; - private MenuItemsAdapter adapter; + private LayoutInflater mInflater; + private OsmandApplication app; + private ScreenType screenType; + private boolean nightMode; + private boolean wasReset = false; @Override public void onSaveInstanceState(@NonNull Bundle outState) { super.onSaveInstanceState(outState); - outState.putSerializable(ITEM_TYPE_KEY, type); outState.putStringArrayList(HIDDEN_ITEMS_KEY, new ArrayList<>(hiddenMenuItems)); outState.putSerializable(ITEMS_ORDER_KEY, menuItemsOrder); + outState.putSerializable(ITEM_TYPE_KEY, screenType); } public static ConfigureMenuItemsFragment showInstance(@NonNull FragmentManager fm, @NonNull ScreenType type) { ConfigureMenuItemsFragment fragment = new ConfigureMenuItemsFragment(); - fragment.setType(type); + fragment.setScreenType(type); fm.beginTransaction() .replace(R.id.fragmentContainer, fragment, TAG) .addToBackStack(CONFIGURE_MENU_ITEMS_TAG) @@ -89,20 +88,31 @@ public class ConfigureMenuItemsFragment extends BaseOsmAndFragment { app = requireMyApplication(); nightMode = !app.getSettings().isLightContent(); mInflater = UiUtilities.getInflater(app, nightMode); - menuItemsManager = new MenuItemsManager(app); -// MapActivityActions mapActivityActions = new MapActivityActions(getActivity()) - + Activity activity = getActivity(); + if (activity instanceof MapActivity) { + switch (screenType) { + case DRAWER: + MapActivityActions mapActivityActions = new MapActivityActions((MapActivity) activity); + contextMenuAdapter = mapActivityActions.createMainOptionsMenu(); + break; + case CONFIGURE_MAP: + ConfigureMapMenu configureMapMenu = new ConfigureMapMenu(); + contextMenuAdapter = configureMapMenu.createListAdapter((MapActivity) activity); + break; + case CONTEXT_MENU_ACTIONS: + break; + } + } if (savedInstanceState != null && savedInstanceState.containsKey(ITEM_TYPE_KEY) && savedInstanceState.containsKey(HIDDEN_ITEMS_KEY) && savedInstanceState.containsKey(ITEMS_ORDER_KEY)) { - type = (ScreenType) savedInstanceState.getSerializable(ITEM_TYPE_KEY); + screenType = (ScreenType) savedInstanceState.getSerializable(ITEM_TYPE_KEY); hiddenMenuItems = savedInstanceState.getStringArrayList(HIDDEN_ITEMS_KEY); - menuItemsOrder = (HashMap) savedInstanceState.getSerializable(ITEMS_ORDER_KEY); + menuItemsOrder = (HashMap) savedInstanceState.getSerializable(ITEMS_ORDER_KEY); } else { - hiddenMenuItems = menuItemsManager.getHiddenItemsIds(type); -// TODO - menuItemsOrder = menuItemsManager.getDrawerItemsSavedOrder(); + hiddenMenuItems = getHiddenItemsIds(screenType); + menuItemsOrder = contextMenuAdapter.getMenuItemsOrder(getItemsIdsOrder(screenType)); } } @@ -121,16 +131,18 @@ public class ConfigureMenuItemsFragment extends BaseOsmAndFragment { ? getResources().getColor(R.color.text_color_primary_dark) : getResources().getColor(R.color.list_background_color_dark)); toolbarButton.setImageDrawable(getPaintedContentIcon(R.drawable.ic_arrow_back, getResources().getColor(R.color.text_color_secondary_light))); - toolbarTitle.setText(type.titleRes); + toolbarTitle.setText(screenType.titleRes); toolbarButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { showExitDialog(); } }); + + + rearrangeAdapter = new RearrangeMenuItemsAdapter(app, getAdapterItems()); recyclerView.setLayoutManager(new LinearLayoutManager(app)); - adapter = new MenuItemsAdapter(app, getAdapterItems()); - final ItemTouchHelper touchHelper = new ItemTouchHelper(new ReorderItemTouchHelperCallback(adapter)); + final ItemTouchHelper touchHelper = new ItemTouchHelper(new ReorderItemTouchHelperCallback(rearrangeAdapter)); touchHelper.attachToRecyclerView(recyclerView); MenuItemsAdapterListener listener = new MenuItemsAdapterListener() { private int fromPosition; @@ -146,32 +158,34 @@ public class ConfigureMenuItemsFragment extends BaseOsmAndFragment { public void onDragOrSwipeEnded(RecyclerView.ViewHolder holder) { toPosition = holder.getAdapterPosition(); if (toPosition >= 0 && fromPosition >= 0 && toPosition != fromPosition) { - adapter.notifyDataSetChanged(); + rearrangeAdapter.notifyDataSetChanged(); } } @Override public void onButtonClicked(int position) { - AdapterItem adapterItem = adapter.getItem(position); - if (adapterItem.getValue() instanceof MenuItemBase) { - MenuItemBase menuItemBase = (MenuItemBase) adapterItem.getValue(); - menuItemBase.toggleHidden(); + AdapterItem adapterItem = rearrangeAdapter.getItem(position); + if (adapterItem.getValue() instanceof ContextMenuItem) { + ContextMenuItem menuItemBase = (ContextMenuItem) adapterItem.getValue(); + menuItemBase.setHidden(!menuItemBase.isHidden()); if (menuItemBase.isHidden()) { hiddenMenuItems.add(menuItemBase.getId()); } else { hiddenMenuItems.remove(menuItemBase.getId()); } - adapter.updateItems(getAdapterItems()); + wasReset = false; + rearrangeAdapter.updateItems(getAdapterItems()); } } @Override public void onItemMoved(String id, int position) { menuItemsOrder.put(id, position); + wasReset = false; } }; - adapter.setListener(listener); - recyclerView.setAdapter(adapter); + rearrangeAdapter.setListener(listener); + recyclerView.setAdapter(rearrangeAdapter); View cancelButton = root.findViewById(R.id.dismiss_button); UiUtilities.setupDialogButton(nightMode, cancelButton, UiUtilities.DialogButtonType.SECONDARY, R.string.shared_string_cancel); cancelButton.setOnClickListener(new View.OnClickListener() { @@ -190,15 +204,18 @@ public class ConfigureMenuItemsFragment extends BaseOsmAndFragment { applyButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { - menuItemsManager.saveHiddenItemsIds(type, hiddenMenuItems); - List defaultItems; - defaultItems = menuItemsManager.getDrawerItemsDefault(); - menuItemsManager.reorderMenuItems(defaultItems, menuItemsOrder); - List ids = new ArrayList<>(); - for (MenuItemBase item : defaultItems) { - ids.add(item.getId()); + if (wasReset) { + resetMenuItems(screenType); + } else { + saveHiddenItemsIds(screenType, hiddenMenuItems); + List defItems = contextMenuAdapter.getDefaultItems(screenType); + contextMenuAdapter.reorderMenuItems(defItems, menuItemsOrder); + List ids = new ArrayList<>(); + for (ContextMenuItem item : defItems) { + ids.add(item.getId()); + } + saveItemsIdsOrder(screenType, ids); } - menuItemsManager.saveItemsIdsOrder(type, ids); dismissFragment(); } }); @@ -208,9 +225,40 @@ public class ConfigureMenuItemsFragment extends BaseOsmAndFragment { return root; } - @Override - public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { - super.onViewCreated(view, savedInstanceState); + private List getAdapterItems() { + List items = new ArrayList<>(); + items.add(new AdapterItem(DESCRIPTION, screenType)); + + List visible = contextMenuAdapter.getItemsForRearrangeAdapter(screenType, hiddenMenuItems, wasReset ? null : menuItemsOrder, false); + List hiddenItems = contextMenuAdapter.getItemsForRearrangeAdapter(screenType, hiddenMenuItems, wasReset ? null : menuItemsOrder, true); + items.addAll(visible); + if (!hiddenItems.isEmpty()) { + items.add(new AdapterItem(HEADER, new RearrangeMenuItemsAdapter.HeaderItem(R.string.shared_string_hidden, R.string.hidden_items_descr))); + items.addAll(hiddenItems); + } + items.add(new AdapterItem(DIVIDER, 1)); + items.add(new AdapterItem(BUTTON, new RearrangeMenuItemsAdapter.ButtonItem( + R.string.reset_to_default, + R.drawable.ic_action_reset_to_default_dark, + new View.OnClickListener() { + @Override + public void onClick(View view) { + hiddenMenuItems.clear(); + menuItemsOrder.clear(); + wasReset = true; + rearrangeAdapter.updateItems(getAdapterItems()); + } + }))); + items.add(new AdapterItem(BUTTON, new RearrangeMenuItemsAdapter.ButtonItem( + R.string.copy_from_other_profile, + R.drawable.ic_action_copy, + new View.OnClickListener() { + @Override + public void onClick(View view) { + + } + }))); + return items; } public void showExitDialog() { @@ -235,170 +283,74 @@ public class ConfigureMenuItemsFragment extends BaseOsmAndFragment { } } - public void setType(@NonNull ScreenType type) { - this.type = type; + private void setScreenType(@NonNull ScreenType screenType) { + this.screenType = screenType; } - private List getAdapterItems() { - List items = new ArrayList<>(); - items.add(new AdapterItem(DESCRIPTION, type)); + private void resetMenuItems(@NonNull ScreenType screenType) { + saveHiddenItemsIds(screenType, null); + saveItemsIdsOrder(screenType, null); + } + + @NonNull + private List getHiddenItemsIds(@NonNull ScreenType type) { + List hiddenItemsIds = null; switch (type) { case DRAWER: - items.addAll(getDrawerAdapterItems()); + hiddenItemsIds = app.getSettings().HIDDEN_DRAWER_ITEMS.getStringsList(); break; case CONFIGURE_MAP: - items.addAll(getConfigureMapAdapterItems()); + hiddenItemsIds = app.getSettings().HIDDEN_CONFIGURE_MAP_ITEMS.getStringsList(); break; case CONTEXT_MENU_ACTIONS: - items.addAll(getContextMenuActionsAdapterItems()); + hiddenItemsIds = app.getSettings().HIDDEN_CONTEXT_MENU_ACTIONS_ITEMS.getStringsList(); break; } - items.add(new AdapterItem(DIVIDER, 1)); - items.add(new AdapterItem(BUTTON, new ButtonItem( - R.string.reset_to_default, - R.drawable.ic_action_reset_to_default_dark, - new View.OnClickListener() { - @Override - public void onClick(View view) { - hiddenMenuItems.clear(); - menuItemsOrder.clear(); - menuItemsManager.resetMenuItems(type); - adapter.updateItems(getAdapterItems()); - } - }))); - items.add(new AdapterItem(BUTTON, new ButtonItem( - R.string.copy_from_other_profile, - R.drawable.ic_action_copy, - new View.OnClickListener() { - @Override - public void onClick(View view) { - //TODO - } - }))); - return items; + return hiddenItemsIds != null ? new ArrayList<>(hiddenItemsIds) : new ArrayList(); } - public List getDrawerItems(boolean hidden) { - - List items = new ArrayList<>(); - List drawerItems = menuItemsManager.getDrawerItemsDefault(); - - for (MenuItemBase menuItemBase : drawerItems) { - Integer order = menuItemsOrder.get(menuItemBase.getId()); - if (order == null) { - order = menuItemBase.getOrder(); - } - menuItemBase.setOrder(order); -// menuItemBase.setHidden(hiddenMenuItems.contains(menuItemBase.getId())); - + @NonNull + private List getItemsIdsOrder(@NonNull ScreenType type) { + List hiddenItemsIds = null; + switch (type) { + case DRAWER: + hiddenItemsIds = app.getSettings().DRAWER_ITEMS_ORDER.getStringsList(); + break; + case CONFIGURE_MAP: + hiddenItemsIds = app.getSettings().CONFIGURE_MAP_ITEMS_ORDER.getStringsList(); + break; + case CONTEXT_MENU_ACTIONS: + hiddenItemsIds = app.getSettings().CONTEXT_MENU_ACTIONS_ITEMS_ORDER.getStringsList(); + break; } + return hiddenItemsIds != null ? new ArrayList<>(hiddenItemsIds) : new ArrayList(); + } - Collections.sort(drawerItems, new Comparator() { - @Override - public int compare(MenuItemBase item1, MenuItemBase item2) { - int order1 = item1.getOrder(); - int order2 = item2.getOrder(); - return (order1 < order2) ? -1 : ((order1 == order2) ? 0 : 1); - } - }); - - - for (MenuItemBase drawerItem : drawerItems) { - if (hidden && hiddenMenuItems.contains(drawerItem.getId())) { - drawerItem.setHidden(true); - items.add(drawerItem); - } else if (!hidden && !hiddenMenuItems.contains(drawerItem.getId())) { - drawerItem.setHidden(false); - items.add(drawerItem); - } + private void saveHiddenItemsIds(@NonNull ScreenType type, @Nullable List hiddenItemsIds) { + switch (type) { + case DRAWER: + app.getSettings().HIDDEN_DRAWER_ITEMS.setStringsList(hiddenItemsIds); + break; + case CONFIGURE_MAP: + app.getSettings().HIDDEN_CONFIGURE_MAP_ITEMS.setStringsList(hiddenItemsIds); + break; + case CONTEXT_MENU_ACTIONS: + app.getSettings().HIDDEN_CONTEXT_MENU_ACTIONS_ITEMS.setStringsList(hiddenItemsIds); + break; } - return items; } - private List getDrawerAdapterItems() { - List active = convertToAdapterItems(getDrawerItems(false)); - List hidden = convertToAdapterItems(getDrawerItems(true)); - List items = new ArrayList<>(active); - if (!hidden.isEmpty()) { - items.add(new AdapterItem(HEADER, new HeaderItem( - R.string.shared_string_hidden, - R.string.hidden_items_descr, - false) - )); - items.addAll(hidden); + private void saveItemsIdsOrder(@NonNull ScreenType type, @Nullable List itemsIdsOrder) { + switch (type) { + case DRAWER: + app.getSettings().DRAWER_ITEMS_ORDER.setStringsList(itemsIdsOrder); + break; + case CONFIGURE_MAP: + app.getSettings().CONFIGURE_MAP_ITEMS_ORDER.setStringsList(itemsIdsOrder); + break; + case CONTEXT_MENU_ACTIONS: + app.getSettings().CONTEXT_MENU_ACTIONS_ITEMS_ORDER.setStringsList(itemsIdsOrder); + break; } - return items; } - - private List convertToAdapterItems(List itemBaseList) { - List items = new ArrayList<>(); - for (MenuItemBase menuItem : itemBaseList) { - items.add(new AdapterItem(MENU_ITEM, menuItem)); - } - return items; - } - - private List getConfigureMapAdapterItems() { - List items = new ArrayList<>(); - items.add(new AdapterItem(HEADER, new HeaderItem( - R.string.main_actions, - R.string.main_actions_descr, - false) - )); - - items.add(new AdapterItem(HEADER, new HeaderItem( - R.string.additional_actions, - R.string.additional_actions_descr, - false) - )); - - items.add(new AdapterItem(HEADER, new HeaderItem( - R.string.shared_string_hidden, - R.string.hidden_items_descr, - false) - )); - - return items; - } - - private List getContextMenuActionsAdapterItems() { - List items = new ArrayList<>(); - items.add(new AdapterItem(HEADER, new HeaderItem( - R.string.shared_string_show, - R.string.move_inside_category, - false) - )); - - items.add(new AdapterItem(HEADER, new HeaderItem( - R.string.map_widget_map_rendering, - R.string.move_inside_category, - false) - )); - - items.add(new AdapterItem(HEADER, new HeaderItem( - R.string.shared_string_hidden, - R.string.reset_items_descr, - false) - )); - - return items; - } - -// private List getDrawerItems() { -// List items = new ArrayList<>(); -// -// return items; -// } - -// private List getConfigureMapItems() { -// List items = new ArrayList<>(); -// -// return items; -// } - -// private List getContextMenuActionsItems() { -// List items = new ArrayList<>(); -// -// return items; -// } } diff --git a/OsmAnd/src/net/osmand/plus/settings/ConfigureMenuRootFragment.java b/OsmAnd/src/net/osmand/plus/settings/ConfigureMenuRootFragment.java index 50e3bb2de8..238bb5ac9e 100644 --- a/OsmAnd/src/net/osmand/plus/settings/ConfigureMenuRootFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/ConfigureMenuRootFragment.java @@ -49,7 +49,6 @@ public class ConfigureMenuRootFragment extends BaseOsmAndFragment { private OsmandApplication app; private LayoutInflater mInflater; private boolean nightMode; - private MenuItemsManager menuItemsManager; @Override public void onCreate(Bundle savedInstanceState) { @@ -57,7 +56,6 @@ public class ConfigureMenuRootFragment extends BaseOsmAndFragment { app = requireMyApplication(); nightMode = !app.getSettings().isLightContent(); mInflater = UiUtilities.getInflater(app, nightMode); - menuItemsManager = new MenuItemsManager(app); } @Nullable @@ -204,18 +202,20 @@ public class ConfigureMenuRootFragment extends BaseOsmAndFragment { } private String getSubTitleText(ScreenType type) { - int allCount = 0; - int hiddenCount = 0; + List hiddenItems = null; switch (type) { case DRAWER: - allCount = menuItemsManager.getDrawerIdsDefaultOrder().size(); - hiddenCount = menuItemsManager.getHiddenItemsIds(type).size(); + hiddenItems = app.getSettings().HIDDEN_DRAWER_ITEMS.getStringsList(); break; case CONFIGURE_MAP: + hiddenItems = app.getSettings().HIDDEN_CONFIGURE_MAP_ITEMS.getStringsList(); break; case CONTEXT_MENU_ACTIONS: + hiddenItems = app.getSettings().HIDDEN_CONTEXT_MENU_ACTIONS_ITEMS.getStringsList(); break; } + int hiddenCount = hiddenItems != null ? hiddenItems.size() : 0; + int allCount = 0; String amount = getString(R.string.n_items_of_z, String.valueOf(allCount - hiddenCount), String.valueOf(allCount)); return getString(R.string.ltr_or_rtl_combine_via_colon, getString(R.string.shared_string_items), amount); } diff --git a/OsmAnd/src/net/osmand/plus/settings/MenuItemsManager.java b/OsmAnd/src/net/osmand/plus/settings/MenuItemsManager.java deleted file mode 100644 index ba77cbbcab..0000000000 --- a/OsmAnd/src/net/osmand/plus/settings/MenuItemsManager.java +++ /dev/null @@ -1,184 +0,0 @@ -package net.osmand.plus.settings; - - -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.Comparator; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.List; - -import net.osmand.plus.OsmandApplication; -import net.osmand.plus.R; -import net.osmand.plus.Version; -import net.osmand.plus.settings.MenuItemsAdapter.MenuItemBase; -import net.osmand.plus.settings.ConfigureMenuRootFragment.ScreenType; -import net.osmand.plus.OsmandSettings.ListStringPreference; - -import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_BUILDS_ID; -import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_CONFIGURE_MAP_ID; -import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_CONFIGURE_SCREEN_ID; -import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_DASHBOARD_ID; -import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_DIRECTIONS_ID; -import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_DIVIDER_ID; -import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_DOWNLOAD_MAPS_ID; -import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_HELP_ID; -import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_MAP_MARKERS_ID; -import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_MEASURE_DISTANCE_ID; -import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_MY_PLACES_ID; -import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_OSMAND_LIVE_ID; -import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_PLUGINS_ID; -import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_SEARCH_ID; -import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_SETTINGS_ID; -import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_TRAVEL_GUIDES_ID; -import static net.osmand.aidlapi.OsmAndCustomizationConstants.MAP_CONTEXT_MENU_ADD_GPX_WAYPOINT; -import static net.osmand.aidlapi.OsmAndCustomizationConstants.MAP_CONTEXT_MENU_AVOID_ROAD; -import static net.osmand.aidlapi.OsmAndCustomizationConstants.MAP_CONTEXT_MENU_CHANGE_MARKER_POSITION; -import static net.osmand.aidlapi.OsmAndCustomizationConstants.MAP_CONTEXT_MENU_CREATE_POI; -import static net.osmand.aidlapi.OsmAndCustomizationConstants.MAP_CONTEXT_MENU_DIRECTIONS_FROM_ID; -import static net.osmand.aidlapi.OsmAndCustomizationConstants.MAP_CONTEXT_MENU_DOWNLOAD_MAP; -import static net.osmand.aidlapi.OsmAndCustomizationConstants.MAP_CONTEXT_MENU_EDIT_GPX_WP; -import static net.osmand.aidlapi.OsmAndCustomizationConstants.MAP_CONTEXT_MENU_MARK_AS_PARKING_LOC; -import static net.osmand.aidlapi.OsmAndCustomizationConstants.MAP_CONTEXT_MENU_MEASURE_DISTANCE; -import static net.osmand.aidlapi.OsmAndCustomizationConstants.MAP_CONTEXT_MENU_MODIFY_OSM_CHANGE; -import static net.osmand.aidlapi.OsmAndCustomizationConstants.MAP_CONTEXT_MENU_MODIFY_OSM_NOTE; -import static net.osmand.aidlapi.OsmAndCustomizationConstants.MAP_CONTEXT_MENU_MODIFY_POI; -import static net.osmand.aidlapi.OsmAndCustomizationConstants.MAP_CONTEXT_MENU_OPEN_OSM_NOTE; -import static net.osmand.aidlapi.OsmAndCustomizationConstants.MAP_CONTEXT_MENU_SEARCH_NEARBY; -import static net.osmand.aidlapi.OsmAndCustomizationConstants.MAP_CONTEXT_MENU_UPDATE_MAP; - -public class MenuItemsManager { - - private OsmandApplication app; - - public MenuItemsManager(OsmandApplication app) { - this.app = app; - } - - List getDrawerItemsDefault() { - List items = new ArrayList<>(); - items.add(new MenuItemBase(DRAWER_DASHBOARD_ID, R.string.home, R.string.app_name_osmand, R.drawable.map_dashboard, 0, false)); - items.add(new MenuItemBase(DRAWER_MAP_MARKERS_ID, R.string.map_markers, R.string.app_name_osmand, R.drawable.ic_action_flag_dark, 1, false)); - items.add(new MenuItemBase(DRAWER_MY_PLACES_ID, R.string.shared_string_my_places, R.string.app_name_osmand, R.drawable.ic_action_fav_dark, 2, false)); - items.add(new MenuItemBase(DRAWER_SEARCH_ID, R.string.shared_string_search, R.string.app_name_osmand, R.drawable.ic_action_search_dark, 3, false)); - items.add(new MenuItemBase(DRAWER_DIRECTIONS_ID, R.string.get_directions, R.string.app_name_osmand, R.drawable.ic_action_gdirections_dark, 4, false)); - items.add(new MenuItemBase(DRAWER_CONFIGURE_MAP_ID, R.string.configure_map, R.string.app_name_osmand, R.drawable.ic_action_layers, 5, false)); - items.add(new MenuItemBase(DRAWER_DOWNLOAD_MAPS_ID, R.string.shared_string_download_map, R.string.app_name_osmand, R.drawable.ic_type_archive, 6, false)); - items.add(new MenuItemBase(DRAWER_OSMAND_LIVE_ID, R.string.osm_live, R.string.app_name_osmand, R.drawable.ic_action_osm_live, 7, false)); - items.add(new MenuItemBase(DRAWER_TRAVEL_GUIDES_ID, R.string.wikivoyage_travel_guide, R.string.app_name_osmand, R.drawable.ic_action_travel, 8, false)); - items.add(new MenuItemBase(DRAWER_MEASURE_DISTANCE_ID, R.string.measurement_tool, R.string.app_name_osmand, R.drawable.ic_action_ruler, 9, false)); - items.add(new MenuItemBase(DRAWER_DIVIDER_ID, R.string.shared_string_divider, R.string.divider_descr, 0, 10, false)); - items.add(new MenuItemBase(DRAWER_CONFIGURE_SCREEN_ID, R.string.layer_map_appearance, R.string.app_name_osmand, R.drawable.ic_configure_screen_dark, 11, false)); - items.add(new MenuItemBase(DRAWER_PLUGINS_ID, R.string.plugins_screen, R.string.app_name_osmand, R.drawable.ic_extension_dark, 12, false)); - items.add(new MenuItemBase(DRAWER_SETTINGS_ID + ".new", R.string.shared_string_settings, R.string.app_name_osmand, R.drawable.ic_action_settings, 13, false)); - items.add(new MenuItemBase(DRAWER_HELP_ID, R.string.shared_string_help, R.string.app_name_osmand, R.drawable.ic_action_help, 14, false)); - if (Version.isDeveloperVersion(app)) { - items.add(new MenuItemBase(DRAWER_BUILDS_ID, R.string.version_settings, R.string.developer_plugin, R.drawable.ic_action_gabout_dark, 15, false)); - } - return items; - } - - @NonNull - public List getHiddenItemsIds(@NonNull ScreenType type) { - List hiddenItemsIds = null; - switch (type) { - case DRAWER: - hiddenItemsIds = app.getSettings().HIDDEN_DRAWER_ITEMS.getStringsList(); - break; - case CONFIGURE_MAP: - hiddenItemsIds = app.getSettings().HIDDEN_CONFIGURE_MAP_ITEMS.getStringsList(); - break; - case CONTEXT_MENU_ACTIONS: - hiddenItemsIds = app.getSettings().HIDDEN_CONTEXT_MENU_ACTIONS_ITEMS.getStringsList(); - break; - } - return hiddenItemsIds != null ? hiddenItemsIds : new ArrayList(); - } - - public void saveHiddenItemsIds(@NonNull ScreenType type, @Nullable List hiddenItemsIds) { - switch (type) { - case DRAWER: - app.getSettings().HIDDEN_DRAWER_ITEMS.setStringsList(hiddenItemsIds); - break; - case CONFIGURE_MAP: - app.getSettings().HIDDEN_CONFIGURE_MAP_ITEMS.setStringsList(hiddenItemsIds); - break; - case CONTEXT_MENU_ACTIONS: - app.getSettings().HIDDEN_CONTEXT_MENU_ACTIONS_ITEMS.setStringsList(hiddenItemsIds); - break; - } - } - - public void saveItemsIdsOrder(@NonNull ScreenType type, @Nullable List itemsIdsOrder) { - switch (type) { - case DRAWER: - app.getSettings().DRAWER_ITEMS_ORDER.setStringsList(itemsIdsOrder); - break; - case CONFIGURE_MAP: - break; - case CONTEXT_MENU_ACTIONS: - break; - } - } - - public void reorderMenuItems(@NonNull List defaultItems, @NonNull HashMap itemsOrder) { - for (MenuItemBase item : defaultItems) { - Integer order = itemsOrder.get(item.getId()); - if (order != null) { - item.setOrder(order); - } - } - Collections.sort(defaultItems, new Comparator() { - @Override - public int compare(MenuItemBase item1, MenuItemBase item2) { - int order1 = item1.getOrder(); - int order2 = item2.getOrder(); - return (order1 < order2) ? -1 : ((order1 == order2) ? 0 : 1); - } - }); - } - - public void resetMenuItems(@NonNull ScreenType type) { - switch (type) { - case DRAWER: - app.getSettings().DRAWER_ITEMS_ORDER.setStringsList(null); - app.getSettings().HIDDEN_DRAWER_ITEMS.setStringsList(null); - break; - case CONFIGURE_MAP: - break; - case CONTEXT_MENU_ACTIONS: - break; - } - } - - public List getDrawerIdsDefaultOrder() { - return getMenuItemsIdsDefaultOrder(getDrawerItemsDefault()); - } - - public LinkedHashMap getDrawerItemsSavedOrder() { - return getMenuItemsOrder(app.getSettings().DRAWER_ITEMS_ORDER); - } - - private List getMenuItemsIdsDefaultOrder(List items) { - List itemsIds = new ArrayList<>(); - for (MenuItemBase item : items) { - itemsIds.add(item.getId()); - } - return itemsIds; - } - - private LinkedHashMap getMenuItemsOrder(ListStringPreference preference) { - List ids = preference.getStringsList(); - if (ids == null) { - ids = getDrawerIdsDefaultOrder(); - } - LinkedHashMap result = new LinkedHashMap<>(); - for (int i = 0; i < ids.size(); i++) { - result.put(ids.get(i), i); - } - return result; - } -} diff --git a/OsmAnd/src/net/osmand/plus/settings/MenuItemsAdapter.java b/OsmAnd/src/net/osmand/plus/settings/RearrangeMenuItemsAdapter.java similarity index 76% rename from OsmAnd/src/net/osmand/plus/settings/MenuItemsAdapter.java rename to OsmAnd/src/net/osmand/plus/settings/RearrangeMenuItemsAdapter.java index c8a0dbc0db..ec90689e9d 100644 --- a/OsmAnd/src/net/osmand/plus/settings/MenuItemsAdapter.java +++ b/OsmAnd/src/net/osmand/plus/settings/RearrangeMenuItemsAdapter.java @@ -17,6 +17,7 @@ import androidx.core.view.MotionEventCompat; import androidx.recyclerview.widget.RecyclerView; import net.osmand.AndroidUtils; +import net.osmand.plus.ContextMenuItem; import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; import net.osmand.plus.UiUtilities; @@ -28,8 +29,12 @@ import java.util.Collections; import java.util.List; import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_DIVIDER_ID; +import static net.osmand.aidlapi.OsmAndCustomizationConstants.MAP_RENDERING_CATEGORY_ID; +import static net.osmand.aidlapi.OsmAndCustomizationConstants.RENDERING_ITEMS_ID_SCHEME; +import static net.osmand.aidlapi.OsmAndCustomizationConstants.SHOW_CATEGORY_ID; +import static net.osmand.aidlapi.OsmAndCustomizationConstants.SHOW_ITEMS_ID_SCHEME; -public class MenuItemsAdapter extends RecyclerView.Adapter +public class RearrangeMenuItemsAdapter extends RecyclerView.Adapter implements ReorderItemTouchHelperCallback.OnItemMoveCallback { private OsmandApplication app; @@ -40,8 +45,8 @@ public class MenuItemsAdapter extends RecyclerView.Adapter items) { + public RearrangeMenuItemsAdapter(OsmandApplication app, + List items) { this.app = app; this.items = items; uiUtilities = app.getUIUtilities(); @@ -95,16 +100,34 @@ public class MenuItemsAdapter extends RecyclerView.Adapter Només per wi-fi Seleccioneu una guia de viatges Guia de viatges - "La pàgina només es pot consultar en línia. La voleu obrir en un navegador?" + La pàgina només es pot consultar en línia. La voleu obrir en un navegador\? Memòria cau d\'imatges Esborra l\'historial de cerca Baixa imatges From c07bb96f9c30e953088d887badfcb57d14cb9c93 Mon Sep 17 00:00:00 2001 From: josep constanti Date: Fri, 3 Apr 2020 17:34:30 +0000 Subject: [PATCH 011/202] Translated using Weblate (Catalan) Currently translated at 97.0% (3153 of 3249 strings) --- OsmAnd/res/values-ca/strings.xml | 124 ++++++++++++++++--------------- 1 file changed, 63 insertions(+), 61 deletions(-) diff --git a/OsmAnd/res/values-ca/strings.xml b/OsmAnd/res/values-ca/strings.xml index b9bc9cc674..3e8c98c001 100644 --- a/OsmAnd/res/values-ca/strings.xml +++ b/OsmAnd/res/values-ca/strings.xml @@ -186,7 +186,7 @@ Utilitza el ratolí de bola per controlar el zoom Es van pujar {0} PDI/notes PDIs/notes d\'OSM desades al dispositiu - Mostra i gestiona els PDI/notes d\'OSM anotats a la base de dades del dispositiu. + Mostra i gestiona els PDI/notes d\'OSM de la vostra base de dades local. Informació de dia/nit Carrils Sense ferris @@ -213,7 +213,7 @@ Inicia l\'animació Ja existeix un fitxer amb aquest nom. Ruta GPX - No hi ha dades locals per cercar els PDI. + Baixeu dades locals per cercar els PDI. Cerca pel nom Nominatim en línia S\'està cercant la posició… @@ -233,7 +233,7 @@ Estil del mapa Minimapa de ruta Velocitat de simulació de la ruta: - Seleccioneu el mitjà de transport + Mitjà de transport: Edició fora de línia Utilitza sempre l\'edició fora de línia. Edició asincrònica de l\'OSM: @@ -243,7 +243,7 @@ Memòria assignada Memòria nativa total assignada a l\'aplicació %1$s MB (Dalvik %2$s MB, altres %3$s MB). \nMemòria proporcional %4$s MB (límit de l\'Android %5$s MB, Dalvik %6$s MB). - No s\'ha trobat cap mapa de vectors fora de línia per aquesta localització. Baixeu-ne un a Configuració (\'Gestió de fitxers de mapes\') o canvieu al connector \'Mapes en línia\'. + Baixeu un mapa vectorial local per aquesta localització des de \'Configuració\' (\'Gestió de fitxers de mapes\') o canvieu al connector \'Mapes en línia\'. Paràmetres globals de l\'aplicació És necessari per a les trameses a openstreetmap.org. El fitxer de dades de PDI «%1$s» és redundant i serà suprimit. @@ -273,11 +273,11 @@ Dades de mapes Desactivat Indicacions de veu (TTS) - Indicacions de veu (gravades) + Indicacions de veu (enregistrades) Dades dels PDI Veu sintetitzada TTS Una altra cerca - Seleccioneu la mida del text dels noms al mapa. + Mida del text dels noms al mapa: Mida de la lletra al mapa S\'estan descomprimint dades noves… La llengua no està suportada @@ -333,7 +333,7 @@ \n \nPremeu contínuament per veure les opcions" No hi ha ítems per %1$s - S\'ha seleccionat un servei de navegació en línia però no esteu connectat a Internet. + El servei de navegació en línia no funciona sense connexió. Falten dades Àudio d\'avís Àudio de multimèdia/navegació @@ -391,25 +391,26 @@ \n \nOsmAnd es desenvolupa activament i el nostre projecte i el seu progrés continu depenen de donacions pel desenvolupament i proves de noves funcions. Si us plau, considereu la compra d\'OsmAnd+ o patrocinar una nova característica concreta, o fer una donació genèrica a la pàgina https\\\\osmand.net. "OsmAnd+ (OSM Automated Navigation Directions) -\n -\nL\'OsmAnd+ és un programari de navegació de codi obert amb accés a una gran varietat de dades globals de OpenStreetMap. Totes les dades de mapes (mapes de tessel·les o vectorials) poden emmagatzemar-se a la targeta de memòria del telèfon pel seu ús sense connexió. També proporciona la funcionalitat de càlcul de rutes sigui amb connexió o sense, incloent orientació per veu. -\n +\n +\nL\'OsmAnd+ és un programari de navegació de codi obert amb accés a una gran varietat de dades globals de OSM. Totes les dades de mapes (mapes de tessel·les o vectorials) poden emmagatzemar-se a la targeta de memòria del telèfon pel seu ús sense connexió. També proporciona la funcionalitat de càlcul de rutes sigui amb connexió o sense, incloent orientació per veu. +\n \nL\'OsmAnd+ és la versió de pagament; comprant-la esteu donant suport al projecte, financeu el desenvolupament de noves funcions i rebreu les darreres actualitzacions. -\n +\n \nAlgunes de les característiques centrals són: \n- Funcionalitat completa fora de línia (desa en el dispositiu d\'emmagatzemament els mapes vectorials i de mosaic baixats) \n- Mapes vectorials compactes de tot el món disponibles \n- Baixada il·limitada de mapes nacionals o regionals directament des de l\'aplicació \n- Disponibilitat sense connexió dels PDI baixats prèviament de Viquipèdia, ideal per fer turisme \n- Possibilitat de superposar diverses capes de mapes simultànies, com traces GPX o de navegació, Punts d\'interès, Favorits, corbes de nivell, parades de transport públic, mapes addicionals amb nivell de transparència ajustable -\n +\n \n- Cerca fora de línia d\'adreces i llocs (PDIs) \n- Càlcul de rutes fora de línia per distàncies d\'abast mitjà \n- Modalitats opcionals de cotxe, ciclista i vianant \n- Ajust automàtic de representació diürna/nocturna \n- Escala automàtica del mapa segons la velocitat \n- Orientació del mapa segons la brúixola o la direcció del moviment -\n- Indicacions de carril, velocitat màxima permesa, veus enregistrades i sintetitzades" +\n- Indicacions de carril, velocitat màxima permesa, veus enregistrades i sintetitzades +\n" Seleccioneu el nivell mínim de zoom per mostrar el mapa si està disponible. Caldrà el fitxer SRTM separat: Aquest connector mostra la configuració de característiques per al desenvolupament i depuració com la verificació o simulació de rutes, el rendiment del renderitzat o les indicacions de veu. Aquestes configuracions s\'adrecen a desenvolupadors i no són d\'utilitat per a un usuari normal. En consonància amb la configuració del sistema Android @@ -538,7 +539,7 @@ Regió Cancel·la Crea un PDI - S\'han trobat unes quantes categories coincidents amb la consulta: + S\'han trobat unes quantes categories de PDI relacionades. Sortida de guiat per veu Ajusteu la transparència del mapa base. Opacitat del mapa base @@ -615,9 +616,9 @@ Direccions S\'està carregant el PDI… S\'estan carregant els carrers… - No s\'ha pogut calcular la ruta + No s\'ha pogut calcular la ruta. S\'estan carregant els codis postals… - Heu arribat a la vostra destinació + Heu arribat. Coordenades no vàlides S\'estan desant el fitxer GPX… Edició d\'OpenStreetMap @@ -656,7 +657,7 @@ No s\'ha trobat res No s\'ha pogut buscar la llista de regions de https://osmand.net. fallada - No s\'ha pogut desar el fitxer GPX + No s\'ha pogut desar el fitxer GPX. Especifiqueu els paràmetres d\'Openstreetmap.org (OSM) que calen per les trameses a OSM. Edifici Edifici @@ -671,7 +672,7 @@ Barri Llogaret Vila - Esteu a punt de suprimir %1$d Preferits i %2$d grups de Preferits. N\'esteu segurs? + Confirmeu la supressió de %1$d Preferits i de %2$d grups de Preferits\? Baixeu el mapa base mundial per tenir una vista que abasti tot el món a gran escala. Baixeu («fora de línia») dades per utilitzar mapes sense connexió. Voleu anar a la botiga d\'aplicacions per baixar el llenguatge seleccionat? @@ -706,16 +707,16 @@ Emergències Restaurants "Amb aquest connector d\'OsmAnd es poden fer contribucions a OSM com la creació o modificació de PDIs d\'OSM, obrir o comentar anotacions OSM o contribuir amb fitxers GPX enregistrats. OSM és un projecte gestionat per una comunitat, de domini públic i de cartografia global,. Per més detalls dirigiu-vos a https://openstreetmap.org. La participació activa s\'agraeix i aquestes contribucions es poden fer directament des OsmAnd, si heu indicat les vostres credencials personals d\'OSM a l\'aplicació." - La llengua seleccionada no està suportada per el motor de TTS (text a veu) d\'Android instal·lat. Voleu buscar altres motors TTS a la botiga d\'aplicacions? Altrament s\'usarà la llengua del TTS per defecte. + "La llengua seleccionada no està suportada per el motor de TTS (text a veu) d\'Android instal·lat, s\'usarà la llengua del TTS per defecte. Voleu buscar un altre motor TTS a la botiga\?" Comparteix l\'ubicació usant Format de mapa «{0}» obsolet, no s\'admet Màxim zoom en precàrrega Trieu l\'aparença de dibuixat Resultats de transport (cap destí): Resultats de transport ({0} al destí): - Les dades de veu seleccionades no estan disponibles + La llibreria seleccionada de missatges de veu no està disponible Esperant el senyal… - El format d\'horaris d\'obertura no es pot modificar + No es pot canviar el format d\'horaris d\'obertura prioritza distancia Aplicació de navegació OsmAnd Accediu a diferents tipus de mapa (anomenats de tessel·les o de bits), des de les tessel·les predefinides d\'OSM (com Mapnik) a imatges de satèl·lit i capes específiques com mapes meteorològics, climàtics, geològics, de relleu, etc. @@ -776,19 +777,19 @@ Enviant… Cerca una adreça utilitzant OSM Nominatim Cerca en línia: Núm. de la casa, carrer, ciutat - No mostris tessel·les de mapes en línia per un nivell de zoom més enllà d\'aquest. + No mostris mapes en línia per un nivell de zoom més enllà d\'aquest. "Distància total %1$s, temps de viatge %2$d h %3$d min." - Escolliu un servei de navegació en línia o fora de línia. + Servei de navegació en línia o local. Voleu baixar {0} - {1} ? Ja existeixen dades locals ({1}) per {0}. Voleu actualitzar-les ({2}) ? S\'ha editat un punt preferit Mostra la ruta - Primer de tot cal que seleccioneu una destinació + Primer de tot cal que establiu una destinació Ha fallat l\'autorització S\'estan carregant els carrers/edificis… - No s\'ha pogut calcular la ruta - La ruta calculada és buida - Torna enrere al mapa de l\'OsmAnd + No s\'ha pogut calcular la ruta. + La ruta calculada està buida. + Torna al mapa S\'estan llegint les dades locals… Utilitzeu Internet per calcular una ruta. Desa la traça actual @@ -797,7 +798,7 @@ Objectiu El filtre \'%1$s\' s\'ha eliminat Les dades dels PDI s\'han actualitzat (se n\'han carregat {0}) - No s\'han pogut carregar les dades del servidor + No s\'han pogut carregar dades del servidor Acostar el zoom us permet actualitzar els PDIs Voleu actualitzar les dades locals des d\'Internet? Edificis: {0}, {1}, {2} @@ -897,8 +898,8 @@ S\'estan obrint les modificacions… Utilitza els noms anglesos als mapes Introduïu la latitud i la longitud en el format seleccionat (G - graus, M - minuts, S - segons) - GGG.GG - GGG MM.MM + GGG.GGGGG + GGG MM.MMM GGG MM SS.S Voleu eliminar el punt Preferit \'%s\'? El punt preferit {0} eliminat. @@ -936,7 +937,7 @@ Feu un donatiu per veure noves funcionalitats implementades a l\'aplicació. Lateral (8 sectors) Sentit horari (12 sectors) - La carpeta d\'emmagatzematge a la targeta de memòria no és accessible! + No es pot accedir a la carpeta d\'emmagatzematge de la targeta de memòria! Seleccioneu primer un municipi o carrer Cerca un carrer en els municipis propers Ordenació porta a porta @@ -1036,7 +1037,7 @@ No s\'han pogut desar els canvis d\'OSM Desa com un canvi OSM OpenMaps.eu - Reprodueix un so en fer una foto + Reprodueix el so en fer una foto Enfocament de nitidesa màxima Enfocament automàtic No s\'ha pogut afegir el comentari. @@ -1117,7 +1118,7 @@ Evita autopistes Límit de pes Especifica el límit de pes permès del vehicle a les rutes. - Trieu l\'interval d\'activació que seguirà el servei en segon pla. + Interval d\'activació que seguirà el servei en segon pla: Estableix un so o el silenci en fer fotos. La càmera intenta enfocar de manera contínua Mode macro (per a enfocar de prop) @@ -1126,12 +1127,12 @@ Mode d\'enfocament de la càmera: Tipus d\'enfocament No s\'ha pogut fer l\'acció {0}. - Trieu l\'origen de les tessel·les, sigui en línia o de la memòria cau + Trieu l\'origen de les tessel·les, sigui en línia o de la memòria cau. La darrera execució de l\'OsmAnd ha fallat. El fitxer log és a {0}. Si us plau informeu del problema i adjunteu el fitxer log. Trieu aturada per sortir Endavant El servei de navegació en segon pla necessita tenir un sistema d\'ubicació activat. - Trieu el sistema d\'ubicació que utilitzarà el servei en segon pla. + Sistema d\'ubicació que utilitzarà el servei en segon pla: Selecciona una traça GPX… Establiu un destí Selecciona al mapa @@ -2142,15 +2143,15 @@ Per retornar a l\'estil habitual dels mapes d\'OsmAnd, només cal desactivar aqu Segur que voleu esborrar l\'acció \"%s\"? Mostra el diàleg Favorits Configuració de nom - Prement aquest botó d\'acció s\'afegeix un marcador de mapa a la posició central de la pantalla. + Un botó per afegir un marcador de mapa a la posició central de la pantalla. Un botó per afegir una fita GPX al centre de la pantalla. Un botó per afegir una nota d\'àudio en el centre de la pantalla. - Prement aquest botó d\'acció afegiu una nota de vídeo en el centre de la pantalla. - Prement el botó d\'acció s\'afegeix una nota fotogràfica en el centre de la pantalla. - Prement aquest botó d\'acció afegiu una nota OSM al centre de la pantalla. - Prement aquest botó d\'acció afegiu un PDI al centre de la pantalla. - Prement aquest botó d\'acció activeu o desactiveu la orientació de veu durant la navegació. - Prement aquest botó d\'acció afegiu una posició d\'aparcament al centre de la pantalla. + Un botó per afegir una nota de vídeo en el centre de la pantalla. + Un botó per afegir una nota fotogràfica en el centre de la pantalla. + Un botó per afegir una nota OSM al centre de la pantalla. + Un botó per afegir un PDI al centre de la pantalla. + Un botó per activar o desactivar la orientació de veu durant la navegació. + Un botó per afegir una posició d\'aparcament al centre de la pantalla. " s\'ha desat a " Lloc El nom d\'acció directa indicat ja s\'està utilitzant, s\'ha canviat pel de %1$s per evitar duplicats. @@ -2352,35 +2353,36 @@ Abasta l\'àrea: %1$s x %2$s \n• Admet punts de pas intermedis \n• Revisió automàtica de la ruta quan us aparteu de la ruta proposada \n• Cerca de llocs per adreça, tipus (per exemple: restaurant, hotel, gasolinera, museu) o coordenades geogràfiques - OsmAnd + (OSM Automated Navigation Directions) és una aplicació per consulta de mapes i de navegació, amb accés a les dades obertes d\'OpenStreetMap (OSM), d\'abast mundial i gran qualitat. + OsmAnd + (OSM Automated Navigation Directions) és una aplicació per consulta de mapes i de navegació, amb accés a les dades obertes d\'OSM, d\'abast mundial i gran qualitat. \nFruïu la navegació amb indicacions visuals i de veu, mostrant PDIs (punts d\'interès), creant i gestionant traces GPX, disposant de corbes de nivell i cotes puntuals, seleccioneu la navegació per vehicle, bicicleta o com a vianant, editeu OSM i molt més. -\n +\n \nOsmAnd + és la versió de pagament de l\'aplicació. En comprar-la, recolzareu el projecte, finançant el desenvolupament de noves característiques i rebreu les darreres actualitzacions. -\n +\n \nCaracterístiques principals: Introduïu ciutat/població/localitat Introduïu el codi postal Ciutats més properes Selecciona el municipi Cerca pel codi postal - Consulta del mapa -\n• Mostra la vostra posició i orientació -\n• Té l\'opció d\'orientar la imatge segons la vostra pròpia orientació o en la direcció en que us moveu -\n• Deseu els vostres llocs més importants com Preferits -\n• Mostra els PDIs (punts d\'interès) al vostre voltant -\n• Mostra variants especials disponibles en línia, imatges de satèl·lit (de Bing), superposicions variades com traces de GPX turístiques/rutes i capes addicionals amb una transparència que es pot ajustar -\n• Com opció, mostra els noms dels llocs en anglès, llengua local o ortografia fonètica + Consulta del mapa +\n• Mostra la vostra posició i orientació +\n• Té l\'opció d\'orientar la imatge segons la vostra pròpia orientació o en la direcció en que us moveu +\n• Deseu els vostres llocs més importants com Preferits +\n• Mostra els PDIs (punts d\'interès) al vostre voltant +\n• Mostra variants especials disponibles en línia, imatges de satèl·lit (de Bing), superposicions variades com traces de GPX turístiques/rutes i capes addicionals amb una transparència que es pot ajustar +\n• Com opció, mostra els noms dels llocs en anglès, llengua local o ortografia fonètica +\n Selecciona el carrer dins %1$s Indiqueu l\'adreça - Utilitza les dades d\'OSM i de la Viquipèdia -\n• Informació de qualitat dels millors projectes col·laboratius del món -\n• Les dades OSM estan disponibles per país o regió -\n• Els PDI\'s de la Viquipèdia són perfectes per fer turisme -\n• Baixades il·limitades i gratuïtes, directament des de l\'aplicació -\n• Mapes vectorials compactes en local que s\'actualitzen un cop al mes, com a mínim -\n -\n• Selecció entre les dades completes d\'una regió o només la xarxa viària (Exemple: tot el Japó ocupa 700 MB però només 200 MB per a la xarxa viària) + Utilitza les dades d\'OSM i de la Viquipèdia +\n• Informació de qualitat dels millors projectes col·laboratius del món +\n• Les dades OSM estan disponibles per país o regió +\n• Els PDI\'s de la Viquipèdia són perfectes per fer turisme +\n• Baixades il·limitades i gratuïtes, directament des de l\'aplicació +\n• Mapes vectorials compactes en local que s\'actualitzen un cop al mes, com a mínim +\n +\n• Opció entre dades completes d\'una regió o només la xarxa viària (Exemple: tot el Japó ocupa 700 MB però només 200 MB per a la xarxa viària) "Característiques de seguretat \n• Canvi automàtic entre el mode diürn/nocturn (opcional) \n• Indicacions del límit de velocitat i notificació d\'excés (opcional) @@ -2887,7 +2889,7 @@ Abasta l\'àrea: %1$s x %2$s "Esteu utilitzant el mapa {0} mitjançant OsmAnd. Voleu iniciar la versió sencera d\'OsmAnd \?" Voleu iniciar OsmAnd\? Guaraní - Prement aquest botó d\'acció es canvia entre el modes Diürn i Nocturn d\'OsmAnd + Un botó per canviar entre els modes diürn i nocturn d\'OsmAnd. Mode Diürn Mode Nocturn Canvia mode Diürn/Nocturn From 9cd12973d4440491a6324f26dfc4de2f8687bc06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Allan=20Nordh=C3=B8y?= Date: Fri, 3 Apr 2020 17:12:48 +0000 Subject: [PATCH 012/202] Translated using Weblate (Romanian) Currently translated at 67.4% (2190 of 3249 strings) --- OsmAnd/res/values-ro/strings.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/OsmAnd/res/values-ro/strings.xml b/OsmAnd/res/values-ro/strings.xml index 81f34c5594..d6a727c9d3 100644 --- a/OsmAnd/res/values-ro/strings.xml +++ b/OsmAnd/res/values-ro/strings.xml @@ -2252,7 +2252,7 @@ Căutați strada Selectați mai întâi orașul Restaurați - "Acordați OsmAnd acces la locație pentru a continua." + Acordați OsmAnd acces la locație pentru a continua. Mulțumim pentru părerea dvs Creșteți raza de căutare la %1$s Lume @@ -2341,7 +2341,7 @@ Există deja un profil cu un astfel de nume Nu puteți șterge profile de bază OsmAnd Salvați modificările - "Trebuie să salvați modificările profilului înainte de a continua" + Trebuie să salvați modificările profilului înainte de a continua Ștergeți profilul Sigur doriți să ștergeți profilul %s Selectați profilul cu care să începeți @@ -2400,7 +2400,7 @@ Alb Punct de plecare Modifica stilul implicit pentru a crește contrastul dintre drumurile pietonale și biciclete. Utilizează culori Mapnik. - "Trimite o copie a ecranului al acestei notificări către suport@osmand.net" + Trimite o copie a ecranului al acestei notificări către suport@osmand.net Ai adăugat puncte%1$s. Scrie un nume de fișier și apăsați \"Salvează\". Cererea de căutare va fi trimisă la: \"%1$s\", împreună cu locația dumneavoastră. \nInformaţiile personale nu sunt colectate, doar datele de căutare necesare pentru a îmbunătăţi căutarea. @@ -2542,15 +2542,15 @@ Blocat Ultima data OsnAnd s-a blocat. Varog săAjutati OsmAnd prin a trimite eroarea. OZN - "• Creaza profile: creează un profil personalizat pentru nevoile tale, cu o pictogramă și o culoare personalizate + • Creaza profile: creează un profil personalizat pentru nevoile tale, cu o pictogramă și o culoare personalizate \n \n • Personalizați acum orice profil implicit și viteze min / max \n \n • A fost adăugat un widget pentru coordonatele actuale \n -\n • Opțiuni adăugate pentru a afișa busola și o riglă pe hartă +\n • Opțiuni adăugate pentru a afișa busola și o riglă pe hartă \n -\n • Remediat jurnalul de cale in fundal +\n • Remediat jurnalul de cale in fundal \n \n • Descărcări de hărți de fundal îmbunătățite \n @@ -2562,7 +2562,7 @@ \n \n • Alte bug-uri \n -\n" +\n Transportator personal Monoroată Scuter From 7fb3f9df37a84921262038b302323347e277f123 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Allan=20Nordh=C3=B8y?= Date: Fri, 3 Apr 2020 17:01:04 +0000 Subject: [PATCH 013/202] Translated using Weblate (Portuguese) Currently translated at 88.4% (2873 of 3249 strings) --- OsmAnd/res/values-pt/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/res/values-pt/strings.xml b/OsmAnd/res/values-pt/strings.xml index b62dc5bc29..fcf2f79637 100644 --- a/OsmAnd/res/values-pt/strings.xml +++ b/OsmAnd/res/values-pt/strings.xml @@ -689,7 +689,7 @@ Polígonos Modo de Visualização Otimizar mapa para - "Mostrar desde o nível de ampliação (requer dados de contorno):" + Mostrar desde o nível de ampliação (requer dados de contorno): Mostrar curvas de nível Aumentar a quantidade de detalhe no mapa. Ver mais detalhes no mapa From 4d3a8d2fdfaec5b922bf4de251b3b3382890f2ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Allan=20Nordh=C3=B8y?= Date: Fri, 3 Apr 2020 17:00:10 +0000 Subject: [PATCH 014/202] Translated using Weblate (Persian) Currently translated at 99.8% (3243 of 3249 strings) --- OsmAnd/res/values-fa/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/res/values-fa/strings.xml b/OsmAnd/res/values-fa/strings.xml index cabfea30a1..0c61214618 100644 --- a/OsmAnd/res/values-fa/strings.xml +++ b/OsmAnd/res/values-fa/strings.xml @@ -3273,7 +3273,7 @@ سورتمه سراشیبی برای سورتمه‌سواری. مسیرهای آماده‌شده برای سبک آزاد یا فقط-اسکیت. بدون مسیرهای کلاسیک. - "مسیرهایی که فقط برای سبک کلاسیک آماده شده و مسیر اسکیت ندارند. مسیرهای سُست‌تر و آماده‌شده با برف‌روهای کوچک‌تر و مسیرهای دست‌ساز اسکی‌بازان را نیز شامل می‌شود." + مسیرهایی که فقط برای سبک کلاسیک آماده شده و مسیر اسکیت ندارند. مسیرهای سُست‌تر و آماده‌شده با برف‌روهای کوچک‌تر و مسیرهای دست‌ساز اسکی‌بازان را نیز شامل می‌شود. یک دستگاه کنترل خارجی، مانند صفحه‌کلید یا WunderLINQ را انتخاب کنید. ‏OsmAnd از قالب UTM Standard استفاده می‌کند که مشابه (اما نه یکسان) با UTM Nato است. به‌کارگیری فقط برای «%1$s» From 5af515e9924eae932d922b31ac52023abfb073d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Allan=20Nordh=C3=B8y?= Date: Fri, 3 Apr 2020 17:10:35 +0000 Subject: [PATCH 015/202] Translated using Weblate (Galician) Currently translated at 98.7% (3209 of 3249 strings) --- OsmAnd/res/values-gl/strings.xml | 65 +++++++++++++++++++++----------- 1 file changed, 43 insertions(+), 22 deletions(-) diff --git a/OsmAnd/res/values-gl/strings.xml b/OsmAnd/res/values-gl/strings.xml index eb6d1c6a36..24962ac115 100644 --- a/OsmAnd/res/values-gl/strings.xml +++ b/OsmAnd/res/values-gl/strings.xml @@ -507,45 +507,66 @@ Deter a música Mapas e navegación OsmAnd Visualización e navegación móbil de mapas globais do OSM con e sen conexión - "OsmAnd (Indicacións de navegación automatizadas do OSM) + "OsmAnd (Indicacións de navegación automatizadas do OSM) \n -\n -\n O OsmAnd é unha aplicación de navegación de código aberto con acceso a unha ampla variedade de datos globais do OSM. Tódolos mapas dos datos (mapas vectoriais ou teselas) poden seren almacenados no cartón de memoria do teléfono móbil para empregalos sen conexión. O OsmAnd tamen fornece a funcionalidade de cálculo de rotas sen conexión, incluíndo a guía por voz paso a paso. \n -\n -\n Algunhas das funcións principais: \n -\n - Funcionalidade completa sen conexión (os mapas vectoriais ou de teselas baixados almacénanse no cartafol que se escolla) \n -\n - Mapas vectoriais compactos sen conexión para todo o mundo +\n O OsmAnd é unha aplicación de navegación de código aberto con acceso a unha ampla variedade de datos globais do OSM. Tódolos mapas dos datos (mapas vectoriais ou teselas) poden seren almacenados no cartón de memoria do teléfono móbil para empregalos sen conexión. O OsmAnd tamen fornece a funcionalidade de cálculo de rotas sen conexión, incluíndo a guía por voz paso a paso. \n -\n - Pódense baixar mapas de países ou rexións de xeito directo dende a aplicación \n -\n - É posíbel sobrepór varias capas de mapas, coma pistas de GPX ou de navegación, puntos de interese (PDI), favoritos, curvas do nivel, paraxes de transporte público ou mapas adicionais con transparencia regulábel. \n -\n - Procura sen conexión dos enderezos e lugares (PDI) \n -\n - Cálculo de rotas sen conexión para distancias curtas (experimental) +\n Algunhas das funcións principais: \n -\n - Modos para automóbil, bicicleta e peóns, con: \n -\n - Vistas de día e noite automatizadas opcionais +\n - Funcionalidade completa sen conexión (os mapas vectoriais ou de teselas baixados almacénanse no cartafol que se escolla) \n -\n - Achegamento opcional do mapa dependendo da velocidade \n -\n - Aliñamento opcional do mapa dependendo do compás ou da dirección do movemento +\n - Mapas vectoriais compactos sen conexión para todo o mundo \n -\n - Guía opcional de faixas ou carrís da estrada, límites de velocidade, voces gravadas e TTS \n -\n -\n Limitacións desta versión de balde do OsmAnd: +\n - Pódense baixar mapas de países ou rexións de xeito directo dende a aplicación \n -\n - O número de mapas a baixar está limitado \n -\n - Non hai acceso ós puntos de interese (PDI) da Wikipedia sen conexión +\n - É posíbel sobrepór varias capas de mapas, coma pistas de GPX ou de navegación, puntos de interese (PDI), favoritos, curvas do nivel, paraxes de transporte público ou mapas adicionais con transparencia regulábel. \n -\n -\n O OsmAnd está a ser desenvolvido activamente e o noso proxecto e o seu progreso futuro depende da contribución financeira para financia-lo desenvolvemento e as probas das funcionalidades novas. Coida a posibilidade de merca-lo OsmAnd+ ou de financiar funcións novas específicas ou de facer unha doazón xeral no osmand.net." +\n +\n - Procura sen conexión dos enderezos e lugares (PDI) +\n +\n +\n - Cálculo de rotas sen conexión para distancias curtas (experimental) +\n +\n +\n - Modos para automóbil, bicicleta e peóns, con: +\n +\n +\n - Vistas de día e noite automatizadas opcionais +\n +\n +\n - Achegamento opcional do mapa dependendo da velocidade +\n +\n +\n - Aliñamento opcional do mapa dependendo do compás ou da dirección do movemento +\n +\n +\n - Guía opcional de faixas ou carrís da estrada, límites de velocidade, voces gravadas e TTS +\n +\n +\n +\n +\n Limitacións desta versión de balde do OsmAnd: +\n +\n +\n - O número de mapas a baixar está limitado +\n +\n +\n - Non hai acceso ós puntos de interese (PDI) da Wikipedia sen conexión +\n +\n +\n +\n +\n O OsmAnd está a ser desenvolvido activamente e o noso proxecto e o seu progreso futuro depende da contribución financeira para financia-lo desenvolvemento e as probas das funcionalidades novas. Coida a posibilidade de merca-lo OsmAnd+ ou de financiar funcións novas específicas ou de facer unha doazón xeral no osmand.net." Mapas e navegación de OsmAnd+ Visualización e navegación móbil de mapas globais para mapas de OSM con e sen conexión O OsmAnd+ (Indicacións da navegación automatizadas do OSM) é un aplicativo de navegación de código aberto con acceso a unha ampla variedade de datos globais do OSM. Tódolos mapas dos datos (mapas vectoriais ou teselas) poden seren almacenados no cartón de memoria do teléfono para empregalos sen conexión. O OsmAnd tamén fornece funcionalidade de cálculo de rotas sen conexión, incluíndo a guía por voz paso a paso. From 28e640fd98278ecfae23f4dc77b223c8083c1dfa Mon Sep 17 00:00:00 2001 From: Hinagiku Zeppeki Date: Fri, 3 Apr 2020 12:08:14 +0000 Subject: [PATCH 016/202] Translated using Weblate (Japanese) Currently translated at 99.7% (3787 of 3798 strings) --- OsmAnd/res/values-ja/phrases.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/OsmAnd/res/values-ja/phrases.xml b/OsmAnd/res/values-ja/phrases.xml index 635f8cdce4..7d6258253c 100644 --- a/OsmAnd/res/values-ja/phrases.xml +++ b/OsmAnd/res/values-ja/phrases.xml @@ -3800,4 +3800,8 @@ 水位:干潮時などは冠水 水位:覆われること有り 水位:部分的に水没 + 障害物 + 水位:平均水位より低め + 水位:平均水位より高め + 水位:浮遊物 \ No newline at end of file From cb130e20b7019fd93c95a628ebc90026d22f9df1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Allan=20Nordh=C3=B8y?= Date: Fri, 3 Apr 2020 17:13:05 +0000 Subject: [PATCH 017/202] Translated using Weblate (Telugu) Currently translated at 1.7% (56 of 3249 strings) --- OsmAnd/res/values-te/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/res/values-te/strings.xml b/OsmAnd/res/values-te/strings.xml index 2dd06451f6..1eff111193 100644 --- a/OsmAnd/res/values-te/strings.xml +++ b/OsmAnd/res/values-te/strings.xml @@ -39,7 +39,7 @@ తాత్కాలిక హడ్డులు ఎంచుకో తాత్కాలిక హద్దులు ఎన్నుకో ఫైల్ నుండి దిగుమతి చేయండి - "రూటింగ్ ఫైలు దిగుమతి చేయండి" + రూటింగ్ ఫైలు దిగుమతి చేయండి ప్రొఫైల్ ను దిగుమతి చేయండి చిత్ర పరిమాణం, ఆడియో మరియు వీడియో నాణ్యత లాగిన్, పాస్‌వర్డ్, ఆఫ్‌లైన్ ఎడిటింగ్ From 332bbb04b1302782a3c2607792f9824ef02128c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Allan=20Nordh=C3=B8y?= Date: Fri, 3 Apr 2020 16:59:23 +0000 Subject: [PATCH 018/202] Translated using Weblate (Serbian) Currently translated at 71.7% (2726 of 3798 strings) --- OsmAnd/res/values-sr/phrases.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/res/values-sr/phrases.xml b/OsmAnd/res/values-sr/phrases.xml index 27c8dcf23e..c7a830f3f8 100644 --- a/OsmAnd/res/values-sr/phrases.xml +++ b/OsmAnd/res/values-sr/phrases.xml @@ -2562,7 +2562,7 @@ Приступ коњем: шумски Приступ за пешаке: да Приступ за пешаке: приватни - "Приступ за пешаке: не" + Приступ за пешаке: не Приступ за пешаке: само до одредишта Приступ за пешаке: одобрен Приступ за пешаке: за муштерије From be0bed25bf99033632882fbe4309801e4a3ab601 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Allan=20Nordh=C3=B8y?= Date: Fri, 3 Apr 2020 17:00:50 +0000 Subject: [PATCH 019/202] Translated using Weblate (Burmese) Currently translated at 10.4% (339 of 3249 strings) --- OsmAnd/res/values-my/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/res/values-my/strings.xml b/OsmAnd/res/values-my/strings.xml index 0c5390199f..0213e847ac 100644 --- a/OsmAnd/res/values-my/strings.xml +++ b/OsmAnd/res/values-my/strings.xml @@ -37,7 +37,7 @@ နှင်းပန်းခြံ ခရီးဝေးလမ်းရှောက် တောင်ဂုံးဆင်း - "နှင်းတောင်ပေါ် ski စီးလမ်းအမြိုး" + နှင်းတောင်ပေါ် ski စီးလမ်းအမြိုး လွယ်တယ် မြေပုံ orientation ကန့်သတ်နေရာ ဒီနေ့ From 0eaf7035d2e9bebc57376b8bdc2f12f613f73358 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Allan=20Nordh=C3=B8y?= Date: Fri, 3 Apr 2020 17:07:38 +0000 Subject: [PATCH 020/202] Translated using Weblate (Dutch) Currently translated at 96.9% (3149 of 3249 strings) --- OsmAnd/res/values-nl/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/res/values-nl/strings.xml b/OsmAnd/res/values-nl/strings.xml index 87795446e2..c77a028671 100644 --- a/OsmAnd/res/values-nl/strings.xml +++ b/OsmAnd/res/values-nl/strings.xml @@ -633,7 +633,7 @@ Activeer in een land waar men links rijdt. Vertrekpunt is nog niet bepaald. Downloaden afbreken? - "De basiskaart, nodig voor de goede werking van OsmAnd, is al geselecteerd om te downloaden." + De basiskaart, nodig voor de goede werking van OsmAnd, is al geselecteerd om te downloaden. Activeer de \'Online Kaarten\' plug-in om andere kaartbronnen te kunnen selecteren Online (raster-) kaarten Gebruik online kaarten (download en bewaar deze op SD-kaart). From 0179852f4bde6be7833c76d14633ec144be3b482 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Allan=20Nordh=C3=B8y?= Date: Fri, 3 Apr 2020 16:59:36 +0000 Subject: [PATCH 021/202] Translated using Weblate (Basque) Currently translated at 76.4% (204 of 267 strings) Translation: OsmAnd/Telegram Translate-URL: https://hosted.weblate.org/projects/osmand/telegram/eu/ --- OsmAnd-telegram/res/values-eu/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd-telegram/res/values-eu/strings.xml b/OsmAnd-telegram/res/values-eu/strings.xml index 200be3dc54..11a630ab45 100644 --- a/OsmAnd-telegram/res/values-eu/strings.xml +++ b/OsmAnd-telegram/res/values-eu/strings.xml @@ -202,7 +202,7 @@ OsmAnd Tracker-en egoera Atzera OsmAnd-era Azken erantzuna: %1$s - "Telegram-en azken eguneraketa duela %1$s" + Telegram-en azken eguneraketa duela %1$s Azken erantzuna duela %1$s duela %1$s \ No newline at end of file From 0f73412e03b8a42c0534e57a4231df3d388247e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Allan=20Nordh=C3=B8y?= Date: Fri, 3 Apr 2020 17:07:32 +0000 Subject: [PATCH 022/202] Translated using Weblate (Occitan) Currently translated at 11.7% (381 of 3249 strings) --- OsmAnd/res/values-oc/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/res/values-oc/strings.xml b/OsmAnd/res/values-oc/strings.xml index 8db78dec1f..6df44d7459 100644 --- a/OsmAnd/res/values-oc/strings.xml +++ b/OsmAnd/res/values-oc/strings.xml @@ -508,7 +508,7 @@ Error d\'importacion de %1$s: %2$s %1$s es estat importat correctament. Blanc - "Inversar %1$s e %2$s" + Inversar %1$s e %2$s Ponch de partença Traça enregistrada Lo fichier es pas nommat From b69cff8370161b94c157ac9cf7b542edc1edf16c Mon Sep 17 00:00:00 2001 From: Ldm Public Date: Fri, 3 Apr 2020 20:46:41 +0000 Subject: [PATCH 023/202] Translated using Weblate (French) Currently translated at 100.0% (3254 of 3254 strings) --- OsmAnd/res/values-fr/strings.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/OsmAnd/res/values-fr/strings.xml b/OsmAnd/res/values-fr/strings.xml index e89271b4e5..be5110f8f7 100644 --- a/OsmAnd/res/values-fr/strings.xml +++ b/OsmAnd/res/values-fr/strings.xml @@ -3581,4 +3581,9 @@ représentant la zone : %1$s x %2$s Ski de randonnée Motoneige Greffon OsmAnd personnalisé + Remplacer un point par celui-ci + Modifications appliquées au profil %1$s. + Impossible de lire %1$s. + Impossible d\'écrire %1$s. + Impossible d\'importer %1$s. \ No newline at end of file From a8dba4531e713457cf6a6a9ac950bfb72450ea2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?O=C4=9Fuz=20Ersen?= Date: Fri, 3 Apr 2020 20:39:46 +0000 Subject: [PATCH 024/202] Translated using Weblate (Turkish) Currently translated at 100.0% (3254 of 3254 strings) --- OsmAnd/res/values-tr/strings.xml | 125 ++++++++++++++++++++++--------- 1 file changed, 88 insertions(+), 37 deletions(-) diff --git a/OsmAnd/res/values-tr/strings.xml b/OsmAnd/res/values-tr/strings.xml index 1bc18430b1..0eb8e5e9aa 100644 --- a/OsmAnd/res/values-tr/strings.xml +++ b/OsmAnd/res/values-tr/strings.xml @@ -131,7 +131,7 @@ Mesafe ölçümü Konuma bir not eklemek için \'Konumu kullan…\' düğmesine dokunun. Sesli notlar - Bir harita butonu veya konum içerik menüsünü kullanarak yolculuk sırasında ses/fotoğraf/video notları alın. + Bir harita düğmesi veya konum içerik menüsünü kullanarak yolculuk sırasında ses/fotoğraf/video notları alın. Ses/video notları bölümler Eş yükselti eğrileri @@ -383,7 +383,7 @@ Ara POI seç Daha fazla bul - Varsayılan + Haritaya göz at Araba sürme Bisiklet sürme Yürüme @@ -1262,7 +1262,7 @@ Dakika/kilometre Mil/saat Lütfen doğru POI türünü belirtin veya bu aşamayı atlayın. - Menü butonu, menü yerine gösterge panelini başlatır + Menü düğmesi, menü yerine gösterge panelini başlatır Haritadan Erişim \'Off\' doğrudan haritayı başlatır. Başlangıçta göster @@ -1645,8 +1645,8 @@ Önce uzun dokunarak bir GPX dosyası belirtin. Bir izlenen yol seçin Bölünmüş aralık - Navigasyon sırasında yakınlaştırma butonlarını göster. - Yakınlaştırma butonlarını göster + Navigasyon sırasında yakınlaştırma düğmelerini göster. + Yakınlaştırma düğmelerini göster Sık Kullanılanlar grubu olarak kaydet Android 4.4\'ten (KitKat) sonra, eski depolama klasörü (%s) kullanımdan kaldırıldı. Tüm OsmAnd dosyaları yeni depolama konumuna kopyalansın mı\? \n Not 1: Eski dosyalarınız dokunulmadan kalacaktır (ancak manuel olarak silinebilir). @@ -2000,9 +2000,9 @@ 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 buton. + OSM notlarını haritada göstermek veya gizlemek için bir düğme. Mesafeye göre sıralandı - Butona uzunca basıp sürüklemek, ekrandaki konumunu değiştirir. + Düğmeye uzunca basıp sürüklemek, ekrandaki konumunu değiştirir. Aramayı yeniden başlat Arama yarıçapını artır Hiçbir şey bulunamadı @@ -2027,8 +2027,8 @@ Genel bakış Sokağı seçin Adresi yazın - Buton konumunu değiştir - Kayıtlı parçaları, kayıt ayına (2018-01 gibi) alt klasörler halinde depolayın. + Düğme konumunu değiştir + Kaydedilen izlenen yolları, kayıt ayına (2018-01 gibi) göre alt klasörler halinde depolayın. Yeniden başlat Tekrar yükle Güncel verileri görmek için döşemeleri yeniden yükleyin. @@ -2119,7 +2119,7 @@ Grup ekle Grupları Sık Kullanılanlar ya da GPX referans noktalarından içe aktarın. Harita işaretleyicileri oluştur! - Uzun ya da kısa olarak \'Yerler\'e, ardından işaretçi bayrağı butonuna dokunun. + Uzun ya da kısa olarak \'Yerler\'e, ardından işaretçi bayrağı düğmesine dokunun. Grupları al İki Bir @@ -2174,10 +2174,10 @@ Harita işaretleyici Geçmiş\'e taşındı Tümünü Geçmiş\'e taşı Navigasyonu duraklat/sürdür - Navigasyonu duraklatma veya devam ettirme butonu. + Navigasyonu duraklatma veya devam ettirme düğmesi. \'Navigasyon tamamlandı\' iletisi göster Navigasyonu başlat/durdur - Navigasyonu başlatmak ya da sonlandırmak için buton. + Navigasyonu başlatmak ya da sonlandırmak için düğme. Buradan Kullanıcı adı İzinler @@ -2237,7 +2237,7 @@ Geçmişe taşı Harita üzerinde göstermeye devam et Aktif işaretleyicilere olan uzaklığın nasıl gösterileceğini seçin. - Harita üzerine dokunarak basmak, kontrol butonları ve widget\'lara geçiş yapmayı sağlar. + Harita üzerine dokunarak basmak kontrol düğmeleri ve widget\'lara geçiş yapmayı sağlar. Waypoint\'ler harita işaretleyicilerine eklendi İşaretleyicilerinizi şu GPX dosyasına aktarın: GPX dosyası olarak kaydet @@ -2245,7 +2245,7 @@ OsmAnd seçilmiş profil için rotalı noktalara bağlanacak. Lütfen en az bir nokta ekleyiniz. Haritayı görüntüle ve nokta ekle - Kaydedilmiş track\'ları aylık klasörlerde depola + Kaydedilmiş izlenen yolları aylık klasörlerde depola Resimleri göndericiye, tarihe ya da türüne göre filtreleyin. Sadece yakınlaştırılmış zoomda etkin. Düzeltilmiş uzaklık Mapillary görüntüsü @@ -2302,11 +2302,11 @@ Yarıçap cetveli Sokak düzeyinde görüşünüzü Mapillary ile paylaşın. Şehir/kasaba/bölgeyi yazın - Hız kontrollü otomatik yakınlaştırma özelliğini açmak veya kapatmak için buton. + Hız kontrollü otomatik yakınlaştırma özelliğini açmak veya kapatmak için düğme. Seyahatteki ilk ara-noktayı ekleyin - Ekranın rota hedefini ortalamasını sağlayan bir buton, önceden seçilen bir hedef son ara hedef haline gelecektir. - Ekranın, (varsa) daha önce seçilen hedefi değiştirerek yeni rota hedefini ortalamasını sağlamak için bir buton. - Ekranın, ilk ara hedefi ortalamasını sağlamak için bir buton. + Ekranın rota hedefini ortalamasını sağlayan bir düğme, önceden seçilen bir hedef son ara hedef haline gelecektir. + Ekranın, (varsa) daha önce seçilen hedefi değiştirerek yeni rota hedefini ortalamasını sağlamak için bir düğme. + Ekranın, ilk ara hedefi ortalamasını sağlamak için bir düğme. Sağdan akan trafik Tepelikli Az tepelikli @@ -2332,7 +2332,7 @@ Henüz GPX dosyanız yok Ayrıca klasöre GPX dosyaları ekleyebilirsiniz Daha fazla ekle… - Görünüş + Görünüm Hızlı kaydı aç Kayıt-tutma minimum hızı Filtre: Bu hızın altında nokta kaydı yok. @@ -2649,7 +2649,7 @@ \n \n • Pusulayı ve haritadaki yarıçap cetvelini göstermek için seçenekler eklendi \n -\n • Arkaplan izleme kaydı düzeltildi +\n • Arka plan izleme kaydı düzeltildi \n \n • Arka plan harita indirmeleri iyileştirildi \n @@ -2657,7 +2657,7 @@ \n \n • Wikipedia dil seçimi düzeltildi \n -\n • Navigasyon sırasında pusula butonu davranışı düzeltildi +\n • Navigasyon sırasında pusula düğmesi davranışı düzeltildi \n \n • Diğer hata düzeltmeleri \n @@ -2934,7 +2934,7 @@ Adım adım Burada çık Durakta bin - Seçilen GPX yollarını haritada göstermek veya gizlemek için bir buton. + Seçilen GPX yollarını haritada göstermek veya gizlemek için bir düğme. Lütfen önce hedefi ayarlayın • Yeni \'Yol Tarifleri\' ekranı: Ev ve İş hedefi düğmelerini, \'önceki rota\' kısayolunu, etkin GPX yol-izlerinin ve işaretleyicilerin listesini, arama geçmişini görüntüler \n @@ -3037,15 +3037,15 @@ Harita kaynakları Harita kaynağı ekle Harita kaynağı \"%s\" olarak değiştirildi. - Ekranın merkez konumuna bir harita işaretleyici eklemek için bir buton. - Ekranın ortasına bir GPX ara noktası eklemek için bir buton. - Ekranın ortasına bir sesli not eklemek için bir buton. - Ekranın ortasına bir video notu eklemek için bir buton. - Ekranın ortasına bir fotoğraf notu eklemek için bir buton. - Ekranın ortasına bir OSM notu eklemek için bir buton. - Ekranın ortasına bir POI eklemek için bir buton. + Ekranın merkez konumuna bir harita işaretleyici eklemek için bir düğme. + Ekranın ortasına bir GPX ara noktası eklemek için bir düğme. + Ekranın ortasına bir sesli not eklemek için bir düğme. + Ekranın ortasına bir video notu eklemek için bir düğme. + Ekranın ortasına bir fotoğraf notu eklemek için bir düğme. + Ekranın ortasına bir OSM notu eklemek için bir düğme. + Ekranın ortasına bir POI eklemek için bir düğme. Navigasyon sırasında sesli yönlendirmeyi açmak veya kapatmak için bir geçiş. - Ekranın ortasına bir park yeri eklemek için bir buton. + Ekranın ortasına bir park yeri eklemek için bir düğme. Harita üzerinde \'Favori\' noktalarını göstermek veya gizlemek için bir geçiş. Haritada POI\'leri göstermek veya gizlemek için bir geçiş. Bu mesaj yorum alanına dahil edilmiştir. @@ -3055,7 +3055,7 @@ Geçici bir iletişim kutusu göster Harita üst katmanı \"%s\" olarak değiştirildi. Harita alt katmanı \"%s\" olarak değiştirildi. - Aşağıdaki listede gezinmek için bir buton. + Aşağıdaki listede gezinmek için bir düğme. OsmAnd (OSM Automated Navigation Directions) özgür, dünya çapında ve yüksek kaliteli OSM verilerine erişim sağlayan bir harita ve navigasyon uygulamasıdır. \n \n Sesli ve optik yönlendiricinin, POI\'leri (ilgi çekici noktaları) görüntülemenin, GPX yolları oluşturma ve yönetmenin, eş yükselti eğrileri görselleştirme ve irtifa bilgilerinin (eklenti aracılığıyla), sürüş, bisiklet, yaya modları arasında seçim yapmanın, OSM düzenleme ve daha pek çok seçeneğin tadını çıkarın. @@ -3195,7 +3195,7 @@ Wikipedia makaleleri nasıl açılır\? Orta varış zamanı Orta zaman - Bir butona dokunun ve eksik veya hatalı olup olmadığını duymak için ilgili sesli uyarıyı dinleyin + Bir düğmeye dokunun ve eksik veya hatalı olup olmadığını duymak için ilgili sesli uyarıyı dinleyin OsmAnd tarafından desteklenen {0} Haritasını kullanıyorsunuz. OsmAnd\'ın tam sürümünü başlatmak ister misiniz\? OsmAnd\'ı başlat\? \'Gündüz\' ve \'Gece\' modu arasında değişiklik yapmak için bir geçiş. @@ -3317,11 +3317,11 @@ Asfaltsız yolları tercih et Yönlendirme için asfaltsız yolları asfaltlılara tercih et. OSM düzenlemeleri - Eş yükselti eğrilerini haritada gösterme veya gizleme butonu. + 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 buton. + 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 @@ -3342,7 +3342,7 @@ Yol izi kaydedildi Dosya adı boş Eski haline döndür - Ekranın, kalkış noktasını ortalamasını sağlamak için bir buton. Daha sonra hedef belirlemeyi veya rota hesaplamasını tetiklemeyi isteyecektir. + Ekranın, kalkış noktasını ortalamasını sağlamak için bir düğme. Daha sonra hedef belirlemeyi veya rota hesaplamasını tetiklemeyi isteyecektir. Düğüm ağı bisiklet rotalarını göster %1$s\'i temizle\? Harita indirme iletişim kutusu @@ -3436,7 +3436,7 @@ Kamera deklanşör sesi Yetkilendirme başarılı Kategorileri yeniden düzenle - Özel kategoriler ekleyebilir, gerekli bulmadığınız kategorileri gizleyebilir ve listenin sıralama düzenini değiştirebilirsiniz. Liste, profillerle içe ve dışa aktarılabilir. + Listenin sıralama düzenini değiştirin, gereksiz kategorileri gizleyin. Profillerle tüm değişiklikleri içe veya dışa aktarabilirsiniz. Bir veya birkaç gerekli kategori seçerek yeni bir özel kategori ekleyebilirsiniz. Mevcut Özel kategori ekle @@ -3512,11 +3512,62 @@ Geçerli ögeler, dosyadaki ögelerle değiştirilecek Hepsini değiştir Her ikisini de sakla - İçe aktarılan ögeler ön ek ile eklenecek + İçe aktarılan ögelere ön ek eklenecek OsmAnd\'da içe aktarılanlarla aynı isme sahip ögeler zaten var. \n \nBir eylem seçin. Bazı ögeler zaten var İçe aktarılacak verileri seçin. Görselleştirme stili + Görselleştirme dosyasını içe aktar + Arazi + Yamaçları, zirveleri ve ovaları göstermek için koyu tonları kullanan tepe gölgesi haritası. + Yamaç, arazide renklendirilmiş görselleştirmelerdir. + Katmanın görüntüleneceği minimum ve maksimum zoom seviyelerini ayarlayın. + Harita üzerinde tepe gölgesi görüntülemek için ek haritalara ihtiyaç vardır. + Harita üzerinde yamaçları görüntülemek için ek haritalara ihtiyaç vardır. + %1$s\'de yamaçlar hakkında daha fazla bilgi edinebilirsiniz. + Şeffaflık + Zoom seviyeleri + Lejand + Tepe gölgesi veya yamaç haritasını görüntülemeyi etkinleştir. Bu harita türleri hakkında daha fazla bilgiyi sitemizde okuyabilirsiniz + Tepe gölgesi + %1$s\'deki tüm veriler içe aktarıldı, yönetmek amacıyla uygulamanın gerekli bölümünü açmak için aşağıdaki düğmeleri kullanabilirsiniz. + İçe aktarma tamamlandı + Eklenen ögeler + OsmAns, uygulamadaki mevcut ögelerle yinelenme durumu için %1$s\'i kontrol ediyor. +\n +\nBu biraz zaman alabilir. + İçe aktarılıyor + Veriler %1$s\'den içe aktarılıyor + Profil yedeklenemedi. + Yeni profil kaydediliyor + Tüm profil ayarları geri yüklensin mi\? + Bu profili oluşturduktan/ içe aktardıktan sonra tüm profil ayarları orijinal değerlerine geri yüklenecektir. + Kayıtlı verileri silmek istediğinize emin misiniz\? + Sapma durumunda rotayı yeniden hesapla + Rotanın yeniden hesaplanacağı mesafeyi seçin. + Rotadan geçerli konuma olan mesafe seçilen değerden fazla ise rota yeniden hesaplanacaktır. + %1$s / %2$s + Yamaçlar + Araziyi göster/gizle + Araziyi gizle + Araziyi göster + Haritada arazi katmanını göstermek veya gizlemek için bir düğme. + Açıklamayı sil + Açıklama ekle + Grup seç + Şekil seç + Daire + Sekizgen + Kare + Min + Başka bir noktayı bununla değiştirin + Kayak turu + Kar arabası + Özel OsmAnd eklentisi + %1$s profiline değişiklikler uygulandı. + %1$s okunamadı. + %1$s yazılamadı. + %1$s içe aktarılamadı. \ No newline at end of file From 797c68da1a356991ad9bbf04b1490338ce45cc9a Mon Sep 17 00:00:00 2001 From: iman Date: Fri, 3 Apr 2020 22:29:15 +0000 Subject: [PATCH 025/202] Translated using Weblate (Persian) Currently translated at 99.8% (3248 of 3254 strings) --- OsmAnd/res/values-fa/strings.xml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/OsmAnd/res/values-fa/strings.xml b/OsmAnd/res/values-fa/strings.xml index 0c61214618..b9485bb340 100644 --- a/OsmAnd/res/values-fa/strings.xml +++ b/OsmAnd/res/values-fa/strings.xml @@ -3047,7 +3047,7 @@ %1$d فایل منتقل شد (%2$s). %1$d فایل کپی شد (%2$s). نمی‌توان %1$d فایل (%2$s) را کپی کرد. - %1$d فایل (%2$s) در مکان قبلی وجود دارد. + %1$d فایل (%2$s) در مکان قبلی وجود دارد: \n\'%3$s\' نقشه‌ها را منتقل کن منتقل نکن @@ -3639,4 +3639,9 @@ تور اسکی برف‌رو افزونهٔ سفارشی OsmAnd + نقطهٔ دیگری را جانشین این کنید + تغییرات روی پروفایل %1$s به کار رفت. + خواندن %1$s ناموفق بود. + نوشتن %1$s ناموفق بود. + درون‌برد %1$s ناموفق بود. \ No newline at end of file From 2ec9bff1176092f565643761c43d45eaed6a6bcf Mon Sep 17 00:00:00 2001 From: iman Date: Fri, 3 Apr 2020 22:36:30 +0000 Subject: [PATCH 026/202] Translated using Weblate (Persian) Currently translated at 34.0% (1292 of 3798 strings) --- OsmAnd/res/values-fa/phrases.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/res/values-fa/phrases.xml b/OsmAnd/res/values-fa/phrases.xml index b10559f09b..187f8db1c8 100644 --- a/OsmAnd/res/values-fa/phrases.xml +++ b/OsmAnd/res/values-fa/phrases.xml @@ -306,7 +306,7 @@ کوهنوردی کریکت زمین کروکت - پیست دوچرخه سواری + دوچرخه سواری غواصی غواصی در عمق مسابقات حیوانات From 3c969c5671dbe701866173d3834954c71ad41eb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Allan=20Nordh=C3=B8y?= Date: Fri, 3 Apr 2020 23:24:29 +0000 Subject: [PATCH 027/202] =?UTF-8?q?Translated=20using=20Weblate=20(Norwegi?= =?UTF-8?q?an=20Bokm=C3=A5l)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently translated at 34.4% (1309 of 3798 strings) --- OsmAnd/res/values-nb/phrases.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/res/values-nb/phrases.xml b/OsmAnd/res/values-nb/phrases.xml index 0b5afb250f..a45d52ea10 100644 --- a/OsmAnd/res/values-nb/phrases.xml +++ b/OsmAnd/res/values-nb/phrases.xml @@ -753,7 +753,7 @@ Kraftverk Kjøletårn Gjenbruk - Container + Beholder Glass Klær Aluminium From 27fb787e7ff44ef637f340b91a3fa63a61b2d4de Mon Sep 17 00:00:00 2001 From: Eduardo Addad de Oliveira Date: Sat, 4 Apr 2020 01:37:09 +0000 Subject: [PATCH 028/202] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (3254 of 3254 strings) --- OsmAnd/res/values-pt-rBR/strings.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/OsmAnd/res/values-pt-rBR/strings.xml b/OsmAnd/res/values-pt-rBR/strings.xml index 80c42db18c..b018ccd3c0 100644 --- a/OsmAnd/res/values-pt-rBR/strings.xml +++ b/OsmAnd/res/values-pt-rBR/strings.xml @@ -3597,4 +3597,9 @@ Pôr do Sol: %2$s Passeio de esqui Moto de neve Plug-in OsmAnd personalizado + Substitua outro ponto por este + Alterações aplicadas ao perfil %1$s. + Não foi possível ler %1$s. + Não foi possível escrever %1$s. + Não foi possível importar %1$s. \ No newline at end of file From 66b49ca449827225871cdd089c91079297d49a7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?O=C4=9Fuz=20Ersen?= Date: Fri, 3 Apr 2020 21:38:06 +0000 Subject: [PATCH 029/202] Translated using Weblate (Turkish) Currently translated at 60.5% (2299 of 3798 strings) --- OsmAnd/res/values-tr/phrases.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OsmAnd/res/values-tr/phrases.xml b/OsmAnd/res/values-tr/phrases.xml index a21db8b09e..176a96f3b6 100644 --- a/OsmAnd/res/values-tr/phrases.xml +++ b/OsmAnd/res/values-tr/phrases.xml @@ -1152,8 +1152,8 @@ Pediatri İnternet erişimi: evet İnternet erişimi: hayır - İnternet erişimi - ücretli - İnternet erişimi - ücretsiz + İnternet erişimi: ücretli + İnternet erişimi: ücretsiz Uçak yakıtı istasyonu Tarihi uçak Bal dükkanı From aff3e1a8cdcd90deab7f173f619bdcc89e6c6dfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?O=C4=9Fuz=20Ersen?= Date: Fri, 3 Apr 2020 20:48:29 +0000 Subject: [PATCH 030/202] Translated using Weblate (Turkish) Currently translated at 100.0% (267 of 267 strings) Translation: OsmAnd/Telegram Translate-URL: https://hosted.weblate.org/projects/osmand/telegram/tr/ --- OsmAnd-telegram/res/values-tr/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd-telegram/res/values-tr/strings.xml b/OsmAnd-telegram/res/values-tr/strings.xml index 3160ac48d4..7c0ef7bc72 100644 --- a/OsmAnd-telegram/res/values-tr/strings.xml +++ b/OsmAnd-telegram/res/values-tr/strings.xml @@ -93,7 +93,7 @@ Telegram Telegram (mesajlaşma uygulaması) insanlarla bağlantı ve iletişim kurmak için kullanılmaktadır. OsmAnd Tracker, Telegram açık platformunu kullanan istemcilerden biridir. Kişileriniz başka herhangi bir Telegram istemcisini kullanabilir. - \"Devam et\" butonuna tıklayarak, Telegram ve OsmAnd Gizlilik Politikası koşullarını kabul etmiş olursunuz. + \"Devam et\" düğmesine tıklayarak, Telegram ve OsmAnd Gizlilik Politikası koşullarını kabul etmiş olursunuz. Kabul et Telegram Gizlilik Politikası OsmAnd Gizlilik Politikası From 84660b25f55f7413b7adea3ed1a77d8acc4a7ec6 Mon Sep 17 00:00:00 2001 From: Mirco Zorzo Date: Sat, 4 Apr 2020 08:30:27 +0000 Subject: [PATCH 031/202] Translated using Weblate (Italian) Currently translated at 90.3% (2940 of 3254 strings) --- OsmAnd/res/values-it/strings.xml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/OsmAnd/res/values-it/strings.xml b/OsmAnd/res/values-it/strings.xml index f540617b89..b4bde9d519 100644 --- a/OsmAnd/res/values-it/strings.xml +++ b/OsmAnd/res/values-it/strings.xml @@ -3590,4 +3590,30 @@ Rappresenta l\'area: %1$s x %2$s Mostra/nascondi rilievo Pendenze Rilievi ombra + Puoi avere maggiori informazioni sui Rilievi in %1$s. + Min + Sostituisci un altro punto con questo + Sci alpino + Stile di rappresentazione + Terreno + La mappa Ombreggiamento dei rilievi utilizza le ombre per visualizzare le pendenze, i picchi e i bassipiani. + La pendenza è visualizzata sul terreno tramite colorazione. + Imposta lo zoom minimo e massimo a cui lo strato sarà visualizzato. + Mappe addizionali sono necessarie per visualizzare l\'Ombreggiatura dei rilievi sulla mappa. + Mappe addizionali sono necessarie per visualizzare i rilievi sulla mappa. + Trasparenza + Livello di zoom + Legenda + Abilitalo per vedere le mappe delle ombreggiature o dei rilievi. Maggiori informazioni su questi tipi di mappe nel nostro sito + OsmAnd ricerca in %1$s oggetti esistenti duplicati nell\'applicazione. +\n +\nPuò richiedere del tempo. + %1$s di %2$s + Ottagono + Motoslitta + Componente aggiuntivo OsmAnd personalizzato + Modifiche applicate al profilo %1$s. + Non posso leggere %1$s. + Non posso scrivere %1$s. + Non posso importare %1$s. \ No newline at end of file From 9c33a23e770fbc9991d39665b23a30fcf672c7b4 Mon Sep 17 00:00:00 2001 From: Yaron Shahrabani Date: Sat, 4 Apr 2020 07:46:41 +0000 Subject: [PATCH 032/202] Translated using Weblate (Hebrew) Currently translated at 99.4% (3235 of 3254 strings) --- OsmAnd/res/values-he/strings.xml | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/OsmAnd/res/values-he/strings.xml b/OsmAnd/res/values-he/strings.xml index 03f9681a0f..543697755e 100644 --- a/OsmAnd/res/values-he/strings.xml +++ b/OsmAnd/res/values-he/strings.xml @@ -173,13 +173,13 @@ שימוש במפות מקוונות (הורדה ואחסון אריחי המפה בכרטיס הזיכרון). מפות מקוונות בחירת מקורות אריחי מפה מקוונים או שמורים. - עם התוסף הזה ניתן לגשת למגוון סוגים של מפות מקוונות (נקראות גם אריחים או מעובדות), מאריחים מוגדרים מראש של OpenStreetMap (כמו למשל Mapnik) עד תמונות לוויין ושכבות מיוחדות כגון מפות מזג אוויר, מפות אקלים, מפות גאולוגיות, מפות הצללה ועוד. + גישה למגוון סוגים של מפות מקוונות (נקראות גם אריחים או מעובדות), מאריחים מוגדרים מראש של OSM (כמו למשל Mapnik) עד תמונות לוויין ושכבות מיוחדות כגון מפות מזג אוויר, מפות אקלים, מפות גאולוגיות, שכבות הצללה ועוד. \n -\nכל אחת מהמפות האלה יכולה לשמש בתור המפה הראשית (בסיס) שתוצג במפה של OsmAnd או כשכבה מעל או מתחת למפת בסיס אחרת (כמו המפות התקניות הבלתי מקוונות של OsmAnd). כדי שניתן היה לראות את המפות שמתחת, ניתן להסתיר פריטים מסוימים במפות הווקטורים של OsmAnd דרך התפריט ‚הגדרת מפה’ לפי דרישתך. +\nכל אחת מהמפות האלה יכולה לשמש בתור המפה הראשית (בסיס) שתוצג או כשכבה מעל או מתחת למפת בסיס אחרת (כמו המפות התקניות הבלתי מקוונות של OsmAnd). ניתן להסתיר פריטים מסוימים במפות הווקטורים של OsmAnd דרך התפריט ‚הגדרת מפה’ כדי להפוך מפות רקע לגלויות יותר. \n -\nמפות אריחים ניתן להוריד ישירות ממקורות מקוונים או שניתן להכין אותן לשימוש בלתי מקוון (ולהעתיק אותן לתיקיית הנתונים של OsmAnd) כמסד נתונים מסוג SQLite אותו ניתן לייצר על ידי מגוון כלי צד־שלישי להכנת מפות. +\n ניתן להוריד מפות אריחים ישירות באופן מקוון או שנערכו לשימוש בלתי מקוון (הועתקו ידנית לתיקיית הנתונים של OsmAnd) כמסד נתונים מסוג SQLite אותו ניתן לייצר על ידי מגוון כלי צד־שלישי להכנת מפות. הצגת הגדרות להפעלת מעקב וניווט במצב רקע על ידי השכמת התקן ה־GPS מדי פעם בפעם (בזמן שהמסך כבוי). - תוסף זה הופך את תכונות הנגישות של ההתקן לזמינות ישירות ב־OsmAnd. התוסף מאפשר להגדיר את מהירות הדיבור של מנגנון הטקסט לדיבור, להגדיר ניווט בעזרת חצים על המסך, להשתמש בכדור מעקב לשליטה בתקריב או משוב של טקסט לדיבור, למשל לצורך הכרזה על המיקום שלך אוטומטית. + הופך את תכונות הנגישות של ההתקן לזמינות ישירות ב־OsmAnd. התוסף מאפשר להגדיר את מהירות הדיבור של מנגנון הטקסט לדיבור, להגדיר ניווט בעזרת חצים על המסך, להשתמש בכדור מעקב לשליטה בתקריב או משוב של טקסט לדיבור, למשל לצורך הכרזה על המיקום שלך אוטומטית. הגדרות לתכונות פיתוח וניפוי שגיאות, הדמיית ניתוב, ביצועי עיבוד התמונה או התרעות קוליות. מיועד למפתחים ולא נחוץ לשימוש רגיל ביישומון. מנהל התוספים התוספים מאפשרים הגדרות במצב מומחה ומספקים תכונות נוספות. @@ -3078,7 +3078,7 @@ בחירת פרופיל להתחלה שירות ההורדות של OsmAnd יש לגעת שוב כדי לשנות את כיוון המפה - משמש להערכת מועד ההגעה הצפוי בסוגי דרכים בלתי מוכרים ולמגבלות מהירות לכל הדרכים (עשוי להשפיע על המסלול) + מעריך את מועד ההגעה בסוגי דרכים בלתי מוכרים ומגביל מהירות לכל הדרכים (עשוי להשפיע על המסלול) פרופיל חדש קריסה הטעינה האחרונה של OsmAnd קרסה. נא לסייע לנו לשפר את OsmAnd על ידי שיתוף הודעת השגיאה. @@ -3377,7 +3377,7 @@ המסלול נשמר שם הקובץ ריק החזרה - כפתור למרכוז נקודת היציאה במסך וחישוב המסלול ליעד או לפתוח תיבת דו־שיח לבחירת היעד אם סמן היעד לא במפה. + כפתור להגדרת נקודת היציאה ממרכז המסך. לאחר מכן תופיע שאלה לבחור יעד או לחשב מסלול. למחוק %1$s\? הצגת מסלולי אופניים של רשת מפרקים דו־שיח הורדת מפה @@ -3400,7 +3400,7 @@ %s בהורדה מסלולים שעבור גרומינג לסגנון קלסי רק ללא מסלולי ההחלקה. לרבות מסלולים שעברו גרומינג על ידי אופנוע שלג עם תוואי רופף ומסלולים שנסללו ידנית על ידי גולשי סקי. להעדיף מסלולים ברמת הקושי הזו, למרות שניתוב דרך מסלולים קשים או קלים יותר עדיין אפשרי אם מדובר במסלולים יותר קצרים. - מסלולי גלישה חופשית ומחוץ לסימון הם מסלולים ומעברים בלתי רשמיים. בדרך כלל לא עברו גרומינג, אינם מתוחזקים באופן רשמי ואינם מפוקחים בשעות הערב. הכניסה על אחריותך בלבד. + מסלולי ‚גלישה חופשית’ ו‚מחוץ לסימון’ הם מסלולים ומעברים בלתי רשמיים. בדרך כלל לא עברו גרומינג, אינם מתוחזקים ואינם מפוקחים בשעות הערב. הכניסה על אחריותך בלבד. עבה למדבריות ואזורים נוספים עם אוכלוסיה דלילה. פירוט מורחב. סמל מיקום בזמן תזוזה @@ -3592,4 +3592,11 @@ תזוזה מזערית פיצול מקליט איפוס הגדרות התוסף לבררת המחדל + מרווח מעקב + מסנן זה מונע תיעוד כפילות של נקודות כשלא הייתה מספיק תנועה, יוצר תצוגה מרחבית נאה יותר של מסלולים שלא עוברים עיבוד לאחר מכן. + החלפת נקודה אחרת בזו + השינויים על הפרופיל %1$s חלו. + לא ניתן לקרוא את %1$s. + לא ניתן לכתוב את %1$s. + לא ניתן לייבא את %1$s. \ No newline at end of file From 190b0d30de23d4eab4dfcd8b8cc192c65a9b07e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristjan=20R=C3=A4ts?= Date: Sat, 4 Apr 2020 06:51:15 +0000 Subject: [PATCH 033/202] Translated using Weblate (Estonian) Currently translated at 100.0% (267 of 267 strings) Translation: OsmAnd/Telegram Translate-URL: https://hosted.weblate.org/projects/osmand/telegram/et/ --- OsmAnd-telegram/res/values-et/strings.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/OsmAnd-telegram/res/values-et/strings.xml b/OsmAnd-telegram/res/values-et/strings.xml index 992f02e48c..126490e593 100644 --- a/OsmAnd-telegram/res/values-et/strings.xml +++ b/OsmAnd-telegram/res/values-et/strings.xml @@ -266,4 +266,5 @@ Viimane Telegram uuendus: %1$s tagasi Viimane vastus: %1$s tagasi %1$s tagasi + ERR \ No newline at end of file From 481e9c1604174c784c437f569c9da8b73b0cc42f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sveinn=20=C3=AD=20Felli?= Date: Sat, 4 Apr 2020 12:30:25 +0000 Subject: [PATCH 034/202] Translated using Weblate (Icelandic) Currently translated at 99.9% (3253 of 3254 strings) --- OsmAnd/res/values-is/strings.xml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/OsmAnd/res/values-is/strings.xml b/OsmAnd/res/values-is/strings.xml index c7c9955649..0f8006dfa4 100644 --- a/OsmAnd/res/values-is/strings.xml +++ b/OsmAnd/res/values-is/strings.xml @@ -3615,4 +3615,13 @@ Stendur fyrir svæði: %1$s x %2$s Hringur Tígull Ferningur + Skipta út öðrum punkti með þessum + Breytingum beitt á %1$s sniðið. + Gat ekki lesið %1$s. + Gat ekki skrifað %1$s. + Gat ekki flutt inn %1. + Ferðaskíði + Vélsleðar + Sérsniðin OsmAnd-viðbót + Átthyrningur \ No newline at end of file From a0f4928c42067ca13bb5e80e755c9e7a5a6656eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sveinn=20=C3=AD=20Felli?= Date: Sat, 4 Apr 2020 12:34:44 +0000 Subject: [PATCH 035/202] Translated using Weblate (Icelandic) Currently translated at 99.5% (3782 of 3798 strings) --- OsmAnd/res/values-is/phrases.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/OsmAnd/res/values-is/phrases.xml b/OsmAnd/res/values-is/phrases.xml index b23067e540..f584977ad5 100644 --- a/OsmAnd/res/values-is/phrases.xml +++ b/OsmAnd/res/values-is/phrases.xml @@ -3786,4 +3786,5 @@ Áfylling drykkjarvatns: já Áfylling drykkjarvatns: nei Kerfi fyrir áfyllingu drykkjarvatns + Mislitt \ No newline at end of file From 3e1b193cbb8fe73ad39652f6c662fb99606bbf74 Mon Sep 17 00:00:00 2001 From: iman Date: Sat, 4 Apr 2020 13:53:46 +0000 Subject: [PATCH 036/202] Translated using Weblate (Persian) Currently translated at 99.8% (3248 of 3254 strings) --- OsmAnd/res/values-fa/strings.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/OsmAnd/res/values-fa/strings.xml b/OsmAnd/res/values-fa/strings.xml index b9485bb340..f4537299c5 100644 --- a/OsmAnd/res/values-fa/strings.xml +++ b/OsmAnd/res/values-fa/strings.xml @@ -3519,10 +3519,10 @@ غروب خورشید در %1$s طلوع خورشید در %1$s حالت دسترسی آسان در دستگاه شما غیرفعال است. - استفاده از زمان خاموش‌شدن صفحهٔ دستگاه - پیشفرض غیرفعال است، اگر OsmAnd در پیش‌زمینه اجرا باشد صفحه خاموش نمی‌شود. -\n -\nاگر فعال باشد، OsmAnd از تنظیمات دستگاه برای زمان خاموش‌شدن صفحه استفاده می‌کند. + استفاده از زمان خاموشی صفحهٔ دستگاه + پیشفرض غیرفعال است، اگر OsmAnd در پیش‌زمینه اجرا باشد صفحه خاموش نمی‌شود. +\n +\nاگر فعال باشد، OsmAnd از تنظیمات دستگاه برای زمان خاموشی صفحه استفاده می‌کند. پاک‌سازی دادهٔ ضبط‌شده • پروفایل‌ها: اکنون می‌توانید ترتیب پروفایل‌ها و نماد آن‌ها را تنظیم کنید. تنظیمات پروفایل‌های پایه را تغییر دهید یا آن‌ها را به پیشفرض بازنشانی کنید. \n From ee9de6ba14dabb914723e735e732b5fb66bb8311 Mon Sep 17 00:00:00 2001 From: Jeff Huang Date: Sat, 4 Apr 2020 13:44:57 +0000 Subject: [PATCH 037/202] Translated using Weblate (Chinese (Traditional)) Currently translated at 100.0% (3254 of 3254 strings) --- OsmAnd/res/values-zh-rTW/strings.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/OsmAnd/res/values-zh-rTW/strings.xml b/OsmAnd/res/values-zh-rTW/strings.xml index 07aff20f19..d4543232a9 100644 --- a/OsmAnd/res/values-zh-rTW/strings.xml +++ b/OsmAnd/res/values-zh-rTW/strings.xml @@ -3601,4 +3601,9 @@ 滑雪旅遊 雪地摩托車 自訂 OsmAnd 外掛程式 + 以此取代另一點 + 變更已套用至 %1$s 設定檔。 + 無法讀取 %1$s。 + 無法寫入 %1$s。 + 無法匯入 %1$s。 \ No newline at end of file From 868e23acfbf5163f2e6065e457b12f032279b399 Mon Sep 17 00:00:00 2001 From: Mirco Zorzo Date: Sat, 4 Apr 2020 16:58:34 +0000 Subject: [PATCH 038/202] Translated using Weblate (Italian) Currently translated at 90.3% (2939 of 3254 strings) --- OsmAnd/res/values-it/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OsmAnd/res/values-it/strings.xml b/OsmAnd/res/values-it/strings.xml index b4bde9d519..49b76e35ff 100644 --- a/OsmAnd/res/values-it/strings.xml +++ b/OsmAnd/res/values-it/strings.xml @@ -3589,7 +3589,7 @@ Rappresenta l\'area: %1$s x %2$s Nascondi rilievo Mostra/nascondi rilievo Pendenze - Rilievi ombra + Ombreggiatura rilievi Puoi avere maggiori informazioni sui Rilievi in %1$s. Min Sostituisci un altro punto con questo @@ -3599,7 +3599,7 @@ Rappresenta l\'area: %1$s x %2$s La mappa Ombreggiamento dei rilievi utilizza le ombre per visualizzare le pendenze, i picchi e i bassipiani. La pendenza è visualizzata sul terreno tramite colorazione. Imposta lo zoom minimo e massimo a cui lo strato sarà visualizzato. - Mappe addizionali sono necessarie per visualizzare l\'Ombreggiatura dei rilievi sulla mappa. + Sono necessarie mappe addizionali per visualizzare l\'Ombreggiatura dei rilievi sulla mappa. Mappe addizionali sono necessarie per visualizzare i rilievi sulla mappa. Trasparenza Livello di zoom From ffca70aa9df575d3c3d29f1cd1b5bac4fba0444e Mon Sep 17 00:00:00 2001 From: Oliver Date: Sat, 4 Apr 2020 18:25:30 +0000 Subject: [PATCH 039/202] Translated using Weblate (German) Currently translated at 100.0% (3254 of 3254 strings) --- OsmAnd/res/values-de/strings.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/OsmAnd/res/values-de/strings.xml b/OsmAnd/res/values-de/strings.xml index 5b5fd73a01..f8a77861ef 100644 --- a/OsmAnd/res/values-de/strings.xml +++ b/OsmAnd/res/values-de/strings.xml @@ -3616,4 +3616,9 @@ Lon %2$s Schneemobil Benutzerdefiniertes OsmAnd-Plugin Farbliche Kennzeichnung von Pisten im Gelände. + Einen anderen Punkt durch diesen ersetzen + Die Änderungen wurden auf das %1$s Profil angewendet. + Konnte %1$s nicht lesen. + Konnte %1$s nicht schreiben. + Konnte %1$s nicht importieren. \ No newline at end of file From e8e2d38f0c914226f45bf641260b1f5def0a675f Mon Sep 17 00:00:00 2001 From: Athoss Date: Sat, 4 Apr 2020 18:11:51 +0000 Subject: [PATCH 040/202] Translated using Weblate (Hungarian) Currently translated at 95.4% (3107 of 3254 strings) --- OsmAnd/res/values-hu/strings.xml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/OsmAnd/res/values-hu/strings.xml b/OsmAnd/res/values-hu/strings.xml index bc2650d04d..35505b6218 100644 --- a/OsmAnd/res/values-hu/strings.xml +++ b/OsmAnd/res/values-hu/strings.xml @@ -1691,7 +1691,7 @@ Hosszúság: %2$s A POI törölve lesz, amint feltöltöd a változtatásokat GPX adat megjelenítése Sorok száma - Biztos vagy benne? + Biztos benne\? A nem mentett változtatások el fognak veszni. Folytatod? %1$s letöltés maradt Utak @@ -3532,4 +3532,7 @@ Ha szereted az OsmAndot és az OSM-et, és szeretnéd támogatni a fejlődésük Túrasízés Motoros hószán Egyéni OsmAnd bővítmény + %1$s olvasása sikertelen. + %1$s írása sikertelen. + %1$s importálása sikertelen. \ No newline at end of file From b035bd775535698039a8d3c8e3777e14874eef2c Mon Sep 17 00:00:00 2001 From: Franco Date: Sat, 4 Apr 2020 17:37:03 +0000 Subject: [PATCH 041/202] Translated using Weblate (Spanish (Argentina)) Currently translated at 100.0% (3254 of 3254 strings) --- OsmAnd/res/values-es-rAR/strings.xml | 31 ++++++++++++++++------------ 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/OsmAnd/res/values-es-rAR/strings.xml b/OsmAnd/res/values-es-rAR/strings.xml index 6774b5a806..cc7490d03a 100644 --- a/OsmAnd/res/values-es-rAR/strings.xml +++ b/OsmAnd/res/values-es-rAR/strings.xml @@ -536,7 +536,7 @@ Lon %2$s Zoom máximo: %1$s Zoom mínimo: %1$s Datos de teselas: %1$s - Fuente de teselas «%1$s» guardada + Repositorio de teselas «%1$s» guardada Mercator elíptica Zoom máximo Expira (minutos) @@ -914,10 +914,10 @@ Lon %2$s Mapas de teselas en línea y en caché Mapas descargados (vectores) Descarga y gestiona mapas sin conexión almacenados en el dispositivo. - Activa el complemento «Mapas en línea», para elegir diferentes fuentes de mapas + Activa el complemento «Mapas en línea», para elegir diferentes repositorios de mapas Mapas en línea y teselas Usa mapas en línea (descarga y guarda teselas en la tarjeta de memoria). - Elige las fuentes de teselas de mapas en línea o en caché. + Elige los repositorios de teselas de mapas en línea o en caché. Complementos Los complementos activan ajustes avanzados y funcionalidades adicionales. Complementos @@ -1060,7 +1060,7 @@ Lon %2$s Centrado automático del mapa activado. Opciones específicas de dibujo vectorial Superpuesta / subyacente - Ajustes de la fuente del mapa + Ajustes del repositorio del mapa Ajustes del mapa vectorial ¿Borrar «%1$s»? Suburbio @@ -1143,7 +1143,7 @@ Lon %2$s Pasar a lo largo de la traza completa Mapa vectorial presente para esta ubicación. \n\t -\n\tPara usarlo activa «Menú» → «Configurar mapa» → «Fuente del mapa…» → «Mapas vectoriales sin conexión». +\n\tPara usarlo activa «Menú» → «Configurar mapa» → «Repositorio del mapa…» → «Mapas vectoriales sin conexión». Salida de indicaciones por voz Elige que altavoz reproducirá indicaciones por voz. Audio de llamada telefónica (para altavoces estéreos con Bluetooth) @@ -1307,7 +1307,7 @@ Lon %2$s Ruta Notas de OSM (en línea) Superposición de PDI… - Fuente del mapa… + Repositorio del mapa… Capas de mapas Buscar PDI Usa un dispositivo con rueda de desplazamiento para mover el mapa. @@ -1462,9 +1462,9 @@ Lon %2$s Visión 3D del mapa Muestra la última superposición de PDI usada. Mostrar superposición de PDI - Elige el origen de los mapas en línea o teselas en caché. - Fuente de teselas del mapa - Fuente del mapa + Elige el repositorio de los mapas en línea o teselas en caché. + Repositorio de teselas del mapa + Repositorio del mapa Usar Internet Mostrar tu ubicación Mostrar coordenadas GPS en el mapa @@ -2174,10 +2174,10 @@ Lon %2$s Cambiar mapa subyacente Mapas subyacentes Añadir subyacencia - Cambiar fuente del mapa - Fuentes del mapa - Añadir fuente del mapa - Fuente del mapa cambiada a «%s». + Cambiar repositorio del mapa + Repositorio de mapas + Añadir repositorio del mapa + Repositorio del mapa cambiada a «%s». Cambiar ubicación del botón Mantener pulsado y arrastrar el botón para cambiar su ubicación en la pantalla. Mostrar un diálogo temporal @@ -3611,4 +3611,9 @@ Lon %2$s Esquí de travesía Motonieve Complemento personalizado de OsmAnd + Reemplaza otro punto con esto + No se pudo leer «%1$s». + No se pudo escribir «%1$s». + No se pudo importar «%1$s». + Cambios aplicados al perfil «%1$s». \ No newline at end of file From 1876abb836dfa4a3ff1d5b628f8bc0f0103fe24c Mon Sep 17 00:00:00 2001 From: Franco Date: Sat, 4 Apr 2020 17:39:22 +0000 Subject: [PATCH 042/202] Translated using Weblate (Spanish (American)) Currently translated at 100.0% (3254 of 3254 strings) --- OsmAnd/res/values-es-rUS/strings.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/OsmAnd/res/values-es-rUS/strings.xml b/OsmAnd/res/values-es-rUS/strings.xml index 55bfea827c..b92bd26311 100644 --- a/OsmAnd/res/values-es-rUS/strings.xml +++ b/OsmAnd/res/values-es-rUS/strings.xml @@ -3610,4 +3610,9 @@ Lon %2$s Esquí de travesía Motonieve Complemento personalizado de OsmAnd + Reemplaza otro punto con esto + Cambios aplicados al perfil «%1$s». + No se pudo leer «%1$s». + No se pudo escribir «%1$s». + No se pudo importar «%1$s». \ No newline at end of file From 6b988c1622f5849a86bdbd4f2149c62185cef496 Mon Sep 17 00:00:00 2001 From: Franco Date: Sat, 4 Apr 2020 17:40:49 +0000 Subject: [PATCH 043/202] Translated using Weblate (Spanish) Currently translated at 100.0% (267 of 267 strings) Translation: OsmAnd/Telegram Translate-URL: https://hosted.weblate.org/projects/osmand/telegram/es/ --- OsmAnd-telegram/res/values-es/strings.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OsmAnd-telegram/res/values-es/strings.xml b/OsmAnd-telegram/res/values-es/strings.xml index b891000e85..e40701d3d3 100644 --- a/OsmAnd-telegram/res/values-es/strings.xml +++ b/OsmAnd-telegram/res/values-es/strings.xml @@ -257,7 +257,7 @@ Unidades de longitud Definir la unidad de velocidad. Unidad de velocidad - Tiempo después del cual se eliminarán los mensajes de ubicación almacenados en búfer + Tiempo máximo para almacenar puntos en el búfer Tiempo de expiración del búfer Sugerido Estado de OsmAnd Tracker @@ -267,4 +267,5 @@ Última actualización desde Telegram: hace %1$s Última respuesta: hace %1$s hace %1$s + ERR \ No newline at end of file From a1dc40b8c849d2dd199c06181a13e9c4ce2463e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?O=C4=9Fuz=20Ersen?= Date: Sat, 4 Apr 2020 21:27:19 +0000 Subject: [PATCH 044/202] Translated using Weblate (Turkish) Currently translated at 100.0% (3254 of 3254 strings) --- OsmAnd/res/values-tr/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/res/values-tr/strings.xml b/OsmAnd/res/values-tr/strings.xml index 0eb8e5e9aa..f8c297b037 100644 --- a/OsmAnd/res/values-tr/strings.xml +++ b/OsmAnd/res/values-tr/strings.xml @@ -1549,7 +1549,7 @@ OSM değişikliği olarak yedekle Bulgaristan Katalonya - Hırvatistan + Hırvatça Çek Danimarka Hollanda From d4cc0b61367ca74fb2de5345aaedd71054cec8d3 Mon Sep 17 00:00:00 2001 From: Hinagiku Zeppeki Date: Sat, 4 Apr 2020 23:28:26 +0000 Subject: [PATCH 045/202] Translated using Weblate (Japanese) Currently translated at 98.8% (3218 of 3254 strings) --- OsmAnd/res/values-ja/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OsmAnd/res/values-ja/strings.xml b/OsmAnd/res/values-ja/strings.xml index a1f5b209a0..0e5004d0ef 100644 --- a/OsmAnd/res/values-ja/strings.xml +++ b/OsmAnd/res/values-ja/strings.xml @@ -3348,7 +3348,7 @@ POIの更新は利用できません ピックアップトラック サブスクリプションの解除 - ここでの変更は選択したものはもちろん、すべてのプロファイルにも適用できます。 + ここで変更した設定は選択中のプロファイル・すべてのプロファイル、どちらにも適用可能です。 現在の設定 未舗装道路を優先 ルート検索時に、舗装道路よりも未舗装道路を優先します。 @@ -3536,7 +3536,7 @@ POIの更新は利用できません メニュー %1$s — %2$s — %3$s ルート検索 - 追加データを内包 + 追加データも含める インポートされたプロファイルには追加データが含まれています。 [インポート]をタップしてプロファイルデータのみをインポートするか、インポートする追加データを選択してください。 プロファイルとともにエクスポートする追加データを選択できます。 南極大陸 From 8aa981de07a8c98f7e211851889ccc34563b0c07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?O=C4=9Fuz=20Ersen?= Date: Sat, 4 Apr 2020 21:48:25 +0000 Subject: [PATCH 046/202] Translated using Weblate (Turkish) Currently translated at 100.0% (3254 of 3254 strings) --- OsmAnd/res/values-tr/strings.xml | 52 ++++++++++++++++---------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/OsmAnd/res/values-tr/strings.xml b/OsmAnd/res/values-tr/strings.xml index f8c297b037..d6c3d6c192 100644 --- a/OsmAnd/res/values-tr/strings.xml +++ b/OsmAnd/res/values-tr/strings.xml @@ -285,7 +285,7 @@ Haritadaki adlar için metin boyutu: Harita yazı karakteri boyutu Desteklenmeyen dil - Kayıp data + Eksik veri Harita zaten kurulu, \'Ayarlar\' güncellenecek. Çevrim dışı arama gerçekleştirilemedi. Coğrafi konuma göre ara @@ -1210,11 +1210,11 @@ Tayca Telugu dili Norveççe Nynorsk - Malezyalı - Haitice + Malezyaca + Haiti dili Galiçyaca Estonca - Sabuan dili + Sabuanca Tek başına günlüğe eklemeyi önle Uygulama kapatılırsa (son uygulamalardan) GPX iz kaydına ara verilecektir. (OsmAnd arka plan göstergesi Android bildirim çubuğundan kaybolur.) Shuttle treni yok @@ -1547,45 +1547,45 @@ Minimum zoom Varış yeri OSM değişikliği olarak yedekle - Bulgaristan - Katalonya + Bulgarca + Katalanca Hırvatça - Çek - Danimarka - Hollanda - Finlandiya + Çekçe + Danca + Flemenkçe + Fince Fransızca - Gürcü + Gürcüce Almanca Yunanca İbranice Hintçe Macarca - Endonezya + Endonezyaca İtalyanca Japonca - Kore - Letonya - Litvanya + Korece + Letonca + Litvanyaca Marathi Norveççe Bokmål Farsça - Polonya + Lehçe Portekizce - Romen + Romence Rusça - Sardunyalı + Sardunyaca Sırpça (kiril) Basitleştirilmiş Çince Slovakça - Sloven + Slovence İspanyolca İsveççe - Geleneksel çince + Geleneksel Çince Türkçe Ukraynaca - Vietnam - Galliler + Vietnamca + Galce Kuzey Amerika - Kanada Avrupa - İtalya Avrupa - İngiltere @@ -1597,12 +1597,12 @@ Çince Portekizce (Brezilya) İngilizce - Afrikaans - Arnavut + Afrikanca + Arnavutça Arapça Ermenice - Bask - Belarus + Baskça + Belarusça Boşnakça Noktalar arasındaki rotayı hesaplamak Konumu sürekli ortada tut From 06edf9af4fe15c5b9fa2891bb80b3c4342c8c1ac Mon Sep 17 00:00:00 2001 From: Hinagiku Zeppeki Date: Sat, 4 Apr 2020 23:13:45 +0000 Subject: [PATCH 047/202] Translated using Weblate (Japanese) Currently translated at 99.7% (3789 of 3798 strings) --- OsmAnd/res/values-ja/phrases.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OsmAnd/res/values-ja/phrases.xml b/OsmAnd/res/values-ja/phrases.xml index 7d6258253c..43277a41ea 100644 --- a/OsmAnd/res/values-ja/phrases.xml +++ b/OsmAnd/res/values-ja/phrases.xml @@ -3804,4 +3804,7 @@ 水位:平均水位より低め 水位:平均水位より高め 水位:浮遊物 + 飲料水補充ネットワーク(所属) + 飲料水の補充:不可 + 飲料水の補充:可 \ No newline at end of file From e2b7970d1b362eff87e87dfc2b8aefcfb86e6cb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?O=C4=9Fuz=20Ersen?= Date: Sat, 4 Apr 2020 21:29:30 +0000 Subject: [PATCH 048/202] Translated using Weblate (Turkish) Currently translated at 60.5% (2300 of 3798 strings) --- OsmAnd/res/values-tr/phrases.xml | 45 ++++++++++++++++---------------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/OsmAnd/res/values-tr/phrases.xml b/OsmAnd/res/values-tr/phrases.xml index 176a96f3b6..5ea401d080 100644 --- a/OsmAnd/res/values-tr/phrases.xml +++ b/OsmAnd/res/values-tr/phrases.xml @@ -894,33 +894,33 @@ Vikipedi İngilizce wiki Arapça wiki - Belarus wiki - Bulgar wiki - Katalan wiki - Sebuanca wiki - Çek wiki - Danimarka wiki - Yunan wiki + Belarusça wiki + Bulgarca wiki + Katalanca wiki + Sabuanca wiki + Çekçe wiki + Danca wiki + Yunanca wiki Galiçyaca wiki İbranice wiki Hintçe wiki - Hırvat wiki - Haiti wiki - Macar wiki - Endonezya wiki - İtalyan wiki + Hırvatça wiki + Haiti dilinde wiki + Macarca wiki + Endonezyaca wiki + İtalyanca wiki Letonca wiki - Malay wiki - Newar wiki - Hollandalı wiki - Norveç Nynorsk wiki - Norveç wiki + Malayca wiki + Newar dilinde wiki + Flemenkçe wiki + Norveççe Nynorsk wiki + Norveççe wiki Lehçe wiki - Romen wiki - Rus wiki - Sloven wiki - Swahili wiki - Çin wiki + Romence wiki + Rusça wiki + Slovence wiki + Swahili dilinde wiki + Çince wiki İskele babası Çevrim bariyeri Motosiklet bariyer @@ -2310,4 +2310,5 @@ Uygarlık: kiklad Uygarlık: minos Uygarlık: tiahuanaco + Dil okulu \ No newline at end of file From 1ec1dd8a8f53c62511623de125908f6c1bec4b61 Mon Sep 17 00:00:00 2001 From: Yunkers Date: Sun, 5 Apr 2020 11:25:18 +0000 Subject: [PATCH 049/202] Translated using Weblate (Polish) Currently translated at 100.0% (3254 of 3254 strings) --- OsmAnd/res/values-pl/strings.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/OsmAnd/res/values-pl/strings.xml b/OsmAnd/res/values-pl/strings.xml index 367d12b064..cca6aca133 100644 --- a/OsmAnd/res/values-pl/strings.xml +++ b/OsmAnd/res/values-pl/strings.xml @@ -3611,4 +3611,10 @@ Reprezentuje obszar: %1$s x %2$s Ośmiokąt Turystyka narciarska Skuter śnieżny + Zastąp tym inny punkt + Niestandardowa wtyczka OsmAnd + Zmiany zastosowano do profilu %1$s. + Nie udało się przeczytać %1$s. + Nie udało się napisać %1$s. + Nie udało się zaimportować %1$s. \ No newline at end of file From 1c90129f6488d562f07b21e28c997d32558a1ae7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20Kotr=C4=8D?= Date: Sun, 5 Apr 2020 12:53:58 +0000 Subject: [PATCH 050/202] Translated using Weblate (Czech) Currently translated at 80.1% (2609 of 3254 strings) --- OsmAnd/res/values-cs/strings.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/OsmAnd/res/values-cs/strings.xml b/OsmAnd/res/values-cs/strings.xml index 0b30cd9d15..89e013c03e 100644 --- a/OsmAnd/res/values-cs/strings.xml +++ b/OsmAnd/res/values-cs/strings.xml @@ -3288,4 +3288,10 @@ Zobrazená oblast: %1$s x %2$s Přidat nový profil „%1$s“\? Trasy upravené pro klasické lyžování bez bruslení. Zahrnuje trasy upravené menšími sněžnými vozidly a stopy vytvořené samotnými lyžaři. Povolit pouze trasy pro bruslení na lyžích + Sněžný skútr + Vlastní modul pro OsmAnd + Změny aplikovány na profil %1$s. + Nelze přečíst %1$s. + Nelze zapsat %1$s. + Nelze importovat %1$s. \ No newline at end of file From 44aaffd7064d371550fc460fd5956f96da9ff23d Mon Sep 17 00:00:00 2001 From: Anatole Hanniet Date: Sun, 5 Apr 2020 12:30:18 +0000 Subject: [PATCH 051/202] Translated using Weblate (French) Currently translated at 56.1% (150 of 267 strings) Translation: OsmAnd/Telegram Translate-URL: https://hosted.weblate.org/projects/osmand/telegram/fr/ --- OsmAnd-telegram/res/values-fr/strings.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/OsmAnd-telegram/res/values-fr/strings.xml b/OsmAnd-telegram/res/values-fr/strings.xml index bdd1f2f7e0..5f1b8d378e 100644 --- a/OsmAnd-telegram/res/values-fr/strings.xml +++ b/OsmAnd-telegram/res/values-fr/strings.xml @@ -149,4 +149,5 @@ Mot de passe Distance Miles nautiques par heure (nœuds) + Par nom \ No newline at end of file From 65d61b16070c37895956f23afca2c8fc6a07113b Mon Sep 17 00:00:00 2001 From: ssantos Date: Sun, 5 Apr 2020 16:00:22 +0000 Subject: [PATCH 052/202] Translated using Weblate (Portuguese) Currently translated at 88.3% (2875 of 3254 strings) --- OsmAnd/res/values-pt/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OsmAnd/res/values-pt/strings.xml b/OsmAnd/res/values-pt/strings.xml index fcf2f79637..e5e5752f8a 100644 --- a/OsmAnd/res/values-pt/strings.xml +++ b/OsmAnd/res/values-pt/strings.xml @@ -3381,10 +3381,10 @@ Pessoal Descarregando %s Grosso - Para desertos e outras áreas pouco povoadas. Exibe mais detalhes numa escala de visualização. + Para desertos e outras áreas pouco povoadas. Mais detalhado. Ícone de posição durante a movimentação Ícone de posição em repouso - Depois de tocar em Aplicar, os perfis eliminados serão completamente perdidos. + Tocar em \'Aplicar\' apagará os perfis removidos permanentemente. Perfil principal Selecione a cor Não pode excluir perfis OsmAnd padrão, mas pode desativá-los no ecrã anterior, ou movê-los para o fundo. From ff34492945c83708939f1bfe36d4c3417f9aed8b Mon Sep 17 00:00:00 2001 From: Anatole Hanniet Date: Sun, 5 Apr 2020 15:20:43 +0000 Subject: [PATCH 053/202] Translated using Weblate (French) Currently translated at 100.0% (3254 of 3254 strings) --- OsmAnd/res/values-fr/strings.xml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/OsmAnd/res/values-fr/strings.xml b/OsmAnd/res/values-fr/strings.xml index be5110f8f7..4d13b2be39 100644 --- a/OsmAnd/res/values-fr/strings.xml +++ b/OsmAnd/res/values-fr/strings.xml @@ -65,7 +65,7 @@ Délai avant de centrer la carte sur la position actuelle. Recentrage automatique navigation Recentrage automatique uniquement pendant la navigation. - Recentrage automatique activé. + Recentrage automatique de la carte activé. Options pour l\'affichage vectoriel Sur-couche / Sous-couche Options pour la source des cartes @@ -263,7 +263,7 @@ Sélectionnez les données d\'annonces vocales Jour Nuit - Lever / coucher du soleil + Lever/coucher du soleil Détecter la luminosité Sélectionnez les règles de bascule pour les modes jour / nuit. Mode jour / nuit @@ -459,7 +459,7 @@ Chargement des codes postaux… Chargement des rues… Chargement des villes… - PI + POI Impossible d\'enregistrer le fichier GPX. Impossible de calculer l\'itinéraire. Impossible de calculer l\'itinéraire. @@ -782,7 +782,7 @@ Mode de transport : Lever : %1$s \nCoucher : %2$s - Information jour / nuit + Information jour/nuit Créer un filtre de points d\'intérêt Style de la carte En continu @@ -834,7 +834,7 @@ Ajouter comme première étape Ajouter comme dernière étape Ajouter comme première étape - Remplacer l\'arrivée + Remplacer la destination Vous avez déjà indiqué une arrivée : Étape %1$s Étapes @@ -1009,7 +1009,7 @@ Téléchargement en cours… Recherche des rues dans les villes à proximité Ordonne automatiquement les étapes pour l\'itinéraire le plus court. - Optimiser + Trier par distance Définissez d\'abord une ville ou une rue Définir comme arrivée Nom des rues (TTS) @@ -1074,7 +1074,7 @@ Modéré Éloigné Mémoriser ce choix - Veuillez d\'abord calculer un itinéraire + Veuillez d\'abord calculer l\'itinéraire Simulation de l\'itinéraire calculé Simulation suivant une trace GPX Êtes-vous certain de vouloir supprimer %1$d modifications OSM \? @@ -1120,7 +1120,7 @@ Favori Préférences d\'itinéraire Informations sur l\'itinéraire - Ajouter comme étape suivante + Ajouter comme destination suivante Souhaitez-vous suivre la trace affichée à l\'écran ? Calculer un itinéraire OsmAnd pour le début et la fin de l\'itinéraire Calcul de l\'itinéraire hors-ligne @@ -1368,7 +1368,7 @@ AFFICHER TOUT Coordonnées Mise à jour disponible pour %1$s carte(s) - Aucun itinéraire de contournement + Aucune déviation trouvée Utiliser le rendu OpenGL Utiliser le rendu matériel accéléré OpenGL (peut consommer plus de batterie et ne pas fonctionner sur les anciens appareils). Tous les fichiers sont à jour @@ -1843,7 +1843,7 @@ Taille de l\'espace de stockage Espace maximum autorisé pour tous les enregistrements. Type - Inverser Départ et Arrivée + Inverser départ & arrivée Icônes des points d\'intérêt Nombre de contributeurs Nombre de modifications @@ -2621,7 +2621,7 @@ représentant la zone : %1$s x %2$s Lire l\'article complet Lire l\'article Tous les points du groupe - Ouvre à + Ouvert du Ouvert jusqu\'à Ferme à Ouvre à From b491dc2d515ce7128388ff9b90bcd5a8b9922196 Mon Sep 17 00:00:00 2001 From: ssantos Date: Sun, 5 Apr 2020 15:56:41 +0000 Subject: [PATCH 054/202] Translated using Weblate (Portuguese) Currently translated at 100.0% (267 of 267 strings) Translation: OsmAnd/Telegram Translate-URL: https://hosted.weblate.org/projects/osmand/telegram/pt/ --- OsmAnd-telegram/res/values-pt/strings.xml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/OsmAnd-telegram/res/values-pt/strings.xml b/OsmAnd-telegram/res/values-pt/strings.xml index 71f9006403..fe4559ac9c 100644 --- a/OsmAnd-telegram/res/values-pt/strings.xml +++ b/OsmAnd-telegram/res/values-pt/strings.xml @@ -37,7 +37,7 @@ Aplicar Selecionar a hora para exibir Data de início - fim - Nós não coletamos dados para o dia selecionado + Não coletamos dados para o dia selecionado Configurações de GPX Chave Credenciais @@ -262,4 +262,10 @@ Sugerido Estado do Rastreador de OsmAnd Voltar para OsmAnd + %1$s atrás + Última resposta: %1$s atrás + Última atualização do Telegram: 1$s atrás + Última resposta: %1$s + Última atualização do Telegram: %1$s + ERR \ No newline at end of file From b1294a22e85dac3681672a8deadd21c2c5db3cbb Mon Sep 17 00:00:00 2001 From: Ldm Public Date: Sun, 5 Apr 2020 16:34:58 +0000 Subject: [PATCH 055/202] Translated using Weblate (French) Currently translated at 57.3% (153 of 267 strings) Translation: OsmAnd/Telegram Translate-URL: https://hosted.weblate.org/projects/osmand/telegram/fr/ --- OsmAnd-telegram/res/values-fr/strings.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OsmAnd-telegram/res/values-fr/strings.xml b/OsmAnd-telegram/res/values-fr/strings.xml index 5f1b8d378e..51e31f2106 100644 --- a/OsmAnd-telegram/res/values-fr/strings.xml +++ b/OsmAnd-telegram/res/values-fr/strings.xml @@ -150,4 +150,7 @@ Distance Miles nautiques par heure (nœuds) Par nom + Sélectionnez l\'apparence des messages contenant votre position. + Envoyer la position + Afficher dans OsmAnd \ No newline at end of file From 75924260eac6fdb252cea8df4d7817765e57cea7 Mon Sep 17 00:00:00 2001 From: ssantos Date: Sun, 5 Apr 2020 17:25:04 +0000 Subject: [PATCH 056/202] Translated using Weblate (Portuguese) Currently translated at 88.6% (2884 of 3254 strings) --- OsmAnd/res/values-pt/strings.xml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/OsmAnd/res/values-pt/strings.xml b/OsmAnd/res/values-pt/strings.xml index e5e5752f8a..8c4aec3961 100644 --- a/OsmAnd/res/values-pt/strings.xml +++ b/OsmAnd/res/values-pt/strings.xml @@ -3617,4 +3617,13 @@ Importar do ficheiro Selecione um ficheiro de extensão %1$s suportado. Nenhuma regra de roteamento em \'%1$s\'. Por favor, escolha outro ficheiro. + Octógono + Substitua outro ponto por este + Passeios de esqui + Moto de neve + Plug-in OsmAnd personalizado + Alterações aplicadas ao perfil %1$s. + Não foi possível ler %1$s. + Não foi possível escrever %1$s. + Não foi possível importar %1$s. \ No newline at end of file From 38198200848ab249d184f1761256ce005dc02918 Mon Sep 17 00:00:00 2001 From: Verdulo Date: Sun, 5 Apr 2020 18:16:59 +0000 Subject: [PATCH 057/202] Translated using Weblate (Esperanto) Currently translated at 100.0% (3254 of 3254 strings) --- OsmAnd/res/values-eo/strings.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/OsmAnd/res/values-eo/strings.xml b/OsmAnd/res/values-eo/strings.xml index b340093c4b..6fb19b1ce2 100644 --- a/OsmAnd/res/values-eo/strings.xml +++ b/OsmAnd/res/values-eo/strings.xml @@ -3592,4 +3592,9 @@ Indikas lokon: %1$s x %2$s" Ski‑ekskursado Motorsledo Propra OsmAnd-kromprogramo + Anstataŭigi alian punkton per tiu ĉi + Aplikis ŝanĝojn al la profilo %1$s. + Ne povas legi %1$s. + Ne povas skribi %1$s. + Ne povas enporti %1$s. \ No newline at end of file From 73007d088e33ec1f04f11114632642bb636b0080 Mon Sep 17 00:00:00 2001 From: ssantos Date: Sun, 5 Apr 2020 17:20:24 +0000 Subject: [PATCH 058/202] Translated using Weblate (Portuguese (Portugal)) Currently translated at 100.0% (267 of 267 strings) Translation: OsmAnd/Telegram Translate-URL: https://hosted.weblate.org/projects/osmand/telegram/pt_PT/ --- OsmAnd-telegram/res/values-pt-rPT/strings.xml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/OsmAnd-telegram/res/values-pt-rPT/strings.xml b/OsmAnd-telegram/res/values-pt-rPT/strings.xml index 6e62b52439..1d32c5f8b3 100644 --- a/OsmAnd-telegram/res/values-pt-rPT/strings.xml +++ b/OsmAnd-telegram/res/values-pt-rPT/strings.xml @@ -16,7 +16,7 @@ Política de privacidade do OsmAnd %1$d m Última localização disponível - OsmAnd Tracker + Rastreador OsmAnd OsmAnd tracker é um dos clientes que usam a Plataforma aberta do Telegram . Seus contatos podem usar qualquer outro cliente Telegram. Quilômetros/metros no %1$s @@ -73,7 +73,7 @@ Quilômetros por hora Senha Distância mínima de registro - Salvar + Gravar Iniciar Adicionar aparelho Não foi possível adicionar novo aparelho @@ -188,7 +188,7 @@ Compartilhar localização h Como desativar o OsmAnd Tracker para Telegram - Nós não coletamos dados para o dia selecionado + Não coletamos dados para o dia selecionado Tempo de compartilhamento você não está logado no Ativar \"Localização\"\? @@ -234,7 +234,7 @@ Mostrar no OsmAnd Saindo Sair - Desabilitar + Desativar Digite o número de telefone Velocidade mínima de registro Desconectado @@ -261,4 +261,10 @@ Sugerido Estado do Rastreador de OsmAnd Voltar para OsmAnd + %1$s atrás + Última resposta: %1$s atrás + Última atualização do Telegram: 1$s atrás + Última resposta: %1$s + Última atualização do Telegram: %1$s + ERR \ No newline at end of file From 52d6a4e23010dfa36808e619284fec98f96bd439 Mon Sep 17 00:00:00 2001 From: Ldm Public Date: Sun, 5 Apr 2020 16:37:34 +0000 Subject: [PATCH 059/202] Translated using Weblate (French) Currently translated at 57.6% (154 of 267 strings) Translation: OsmAnd/Telegram Translate-URL: https://hosted.weblate.org/projects/osmand/telegram/fr/ --- OsmAnd-telegram/res/values-fr/strings.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/OsmAnd-telegram/res/values-fr/strings.xml b/OsmAnd-telegram/res/values-fr/strings.xml index 51e31f2106..6bf474b6aa 100644 --- a/OsmAnd-telegram/res/values-fr/strings.xml +++ b/OsmAnd-telegram/res/values-fr/strings.xml @@ -153,4 +153,5 @@ Sélectionnez l\'apparence des messages contenant votre position. Envoyer la position Afficher dans OsmAnd + Dernière mise à jour depuis Telegram \ No newline at end of file From d2f648f6539e4ac4a7aaaa42f0f68db7da0e0c54 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Mon, 6 Apr 2020 13:37:18 +0300 Subject: [PATCH 060/202] Add map_ version of two profile icons --- .../res/drawable/map_action_ski_touring.xml | 20 +++++++++++++++++++ OsmAnd/res/drawable/map_action_snowmobile.xml | 15 ++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 OsmAnd/res/drawable/map_action_ski_touring.xml create mode 100644 OsmAnd/res/drawable/map_action_snowmobile.xml diff --git a/OsmAnd/res/drawable/map_action_ski_touring.xml b/OsmAnd/res/drawable/map_action_ski_touring.xml new file mode 100644 index 0000000000..f771350bd8 --- /dev/null +++ b/OsmAnd/res/drawable/map_action_ski_touring.xml @@ -0,0 +1,20 @@ + + + + + + diff --git a/OsmAnd/res/drawable/map_action_snowmobile.xml b/OsmAnd/res/drawable/map_action_snowmobile.xml new file mode 100644 index 0000000000..83463f1f5f --- /dev/null +++ b/OsmAnd/res/drawable/map_action_snowmobile.xml @@ -0,0 +1,15 @@ + + + + From d57328969c1ef9c2305e9cd9d17fa4b448e5043a Mon Sep 17 00:00:00 2001 From: Dmitry Date: Mon, 6 Apr 2020 16:01:26 +0300 Subject: [PATCH 061/202] Add icon for UI Customization screen --- .../drawable/ic_action_ui_customization.xml | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 OsmAnd/res/drawable/ic_action_ui_customization.xml diff --git a/OsmAnd/res/drawable/ic_action_ui_customization.xml b/OsmAnd/res/drawable/ic_action_ui_customization.xml new file mode 100644 index 0000000000..710a5a0a64 --- /dev/null +++ b/OsmAnd/res/drawable/ic_action_ui_customization.xml @@ -0,0 +1,24 @@ + + + + + + From 5446ad43f8e26e9c2d0f261f83f5e61a303f5171 Mon Sep 17 00:00:00 2001 From: Nazar-Kutz Date: Mon, 6 Apr 2020 17:05:31 +0300 Subject: [PATCH 062/202] Show SnackBar when preference change (fixes) --- .../osmand/plus/settings/ApplyQueryType.java | 5 ++ .../plus/settings/BaseSettingsFragment.java | 81 ++++++++++--------- .../GeneralProfileSettingsFragment.java | 4 +- .../settings/MapDuringNavigationFragment.java | 42 +++++++--- .../plus/settings/NavigationFragment.java | 11 ++- .../plus/settings/OnApplyPreference.java | 7 ++ .../settings/RouteParametersFragment.java | 46 +++++++---- .../plus/settings/ScreenAlertsFragment.java | 3 +- .../plus/settings/TurnScreenOnFragment.java | 3 +- .../plus/settings/VoiceAnnouncesFragment.java | 13 ++- ...ecalculateRouteInDeviationBottomSheet.java | 42 +++++----- 11 files changed, 157 insertions(+), 100 deletions(-) create mode 100644 OsmAnd/src/net/osmand/plus/settings/ApplyQueryType.java create mode 100644 OsmAnd/src/net/osmand/plus/settings/OnApplyPreference.java diff --git a/OsmAnd/src/net/osmand/plus/settings/ApplyQueryType.java b/OsmAnd/src/net/osmand/plus/settings/ApplyQueryType.java new file mode 100644 index 0000000000..8100f0b0ce --- /dev/null +++ b/OsmAnd/src/net/osmand/plus/settings/ApplyQueryType.java @@ -0,0 +1,5 @@ +package net.osmand.plus.settings; + +public enum ApplyQueryType { + NONE, SNACK_BAR, BOTTOM_SHEET +} diff --git a/OsmAnd/src/net/osmand/plus/settings/BaseSettingsFragment.java b/OsmAnd/src/net/osmand/plus/settings/BaseSettingsFragment.java index 07062d1326..de0bc9d390 100644 --- a/OsmAnd/src/net/osmand/plus/settings/BaseSettingsFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/BaseSettingsFragment.java @@ -83,7 +83,7 @@ import java.io.Serializable; import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_SETTINGS_ID; public abstract class BaseSettingsFragment extends PreferenceFragmentCompat implements OnPreferenceChangeListener, - OnPreferenceClickListener, AppModeChangedListener { + OnPreferenceClickListener, AppModeChangedListener, OnApplyPreference { private static final Log LOG = PlatformUtil.getLog(BaseSettingsFragment.class); @@ -113,44 +113,40 @@ public abstract class BaseSettingsFragment extends PreferenceFragmentCompat impl GLOBAL_SETTINGS(GlobalSettingsFragment.class.getName(), false, null, R.xml.global_settings, R.layout.global_preference_toolbar), CONFIGURE_PROFILE(ConfigureProfileFragment.class.getName(), true, null, R.xml.configure_profile, R.layout.profile_preference_toolbar_with_switch), PROXY_SETTINGS(ProxySettingsFragment.class.getName(), false, null, R.xml.proxy_preferences, R.layout.global_preferences_toolbar_with_switch), - GENERAL_PROFILE(GeneralProfileSettingsFragment.class.getName(), true, MessageType.BOTTOM_SHEET, R.xml.general_profile_settings, R.layout.profile_preference_toolbar), - NAVIGATION(NavigationFragment.class.getName(), true, MessageType.SNACK_BAR, R.xml.navigation_settings_new, R.layout.profile_preference_toolbar), - COORDINATES_FORMAT(CoordinatesFormatFragment.class.getName(), true, MessageType.BOTTOM_SHEET, R.xml.coordinates_format, R.layout.profile_preference_toolbar), - ROUTE_PARAMETERS(RouteParametersFragment.class.getName(), true, MessageType.SNACK_BAR, R.xml.route_parameters, R.layout.profile_preference_toolbar), - SCREEN_ALERTS(ScreenAlertsFragment.class.getName(), true, MessageType.SNACK_BAR, R.xml.screen_alerts, R.layout.profile_preference_toolbar_with_switch), - VOICE_ANNOUNCES(VoiceAnnouncesFragment.class.getName(), true, MessageType.SNACK_BAR, R.xml.voice_announces, R.layout.profile_preference_toolbar_with_switch), - VEHICLE_PARAMETERS(VehicleParametersFragment.class.getName(), true, MessageType.SNACK_BAR, R.xml.vehicle_parameters, R.layout.profile_preference_toolbar), - MAP_DURING_NAVIGATION(MapDuringNavigationFragment.class.getName(), true, MessageType.SNACK_BAR, R.xml.map_during_navigation, R.layout.profile_preference_toolbar), - TURN_SCREEN_ON(TurnScreenOnFragment.class.getName(), true, MessageType.SNACK_BAR, R.xml.turn_screen_on, R.layout.profile_preference_toolbar_with_switch), + GENERAL_PROFILE(GeneralProfileSettingsFragment.class.getName(), true, ApplyQueryType.BOTTOM_SHEET, R.xml.general_profile_settings, R.layout.profile_preference_toolbar), + NAVIGATION(NavigationFragment.class.getName(), true, ApplyQueryType.SNACK_BAR, R.xml.navigation_settings_new, R.layout.profile_preference_toolbar), + COORDINATES_FORMAT(CoordinatesFormatFragment.class.getName(), true, ApplyQueryType.BOTTOM_SHEET, R.xml.coordinates_format, R.layout.profile_preference_toolbar), + ROUTE_PARAMETERS(RouteParametersFragment.class.getName(), true, ApplyQueryType.SNACK_BAR, R.xml.route_parameters, R.layout.profile_preference_toolbar), + SCREEN_ALERTS(ScreenAlertsFragment.class.getName(), true, ApplyQueryType.SNACK_BAR, R.xml.screen_alerts, R.layout.profile_preference_toolbar_with_switch), + VOICE_ANNOUNCES(VoiceAnnouncesFragment.class.getName(), true, ApplyQueryType.SNACK_BAR, R.xml.voice_announces, R.layout.profile_preference_toolbar_with_switch), + VEHICLE_PARAMETERS(VehicleParametersFragment.class.getName(), true, ApplyQueryType.SNACK_BAR, R.xml.vehicle_parameters, R.layout.profile_preference_toolbar), + MAP_DURING_NAVIGATION(MapDuringNavigationFragment.class.getName(), true, ApplyQueryType.SNACK_BAR, R.xml.map_during_navigation, R.layout.profile_preference_toolbar), + TURN_SCREEN_ON(TurnScreenOnFragment.class.getName(), true, ApplyQueryType.SNACK_BAR, R.xml.turn_screen_on, R.layout.profile_preference_toolbar_with_switch), DATA_STORAGE(DataStorageFragment.class.getName(), false, null, R.xml.data_storage, R.layout.global_preference_toolbar), DIALOGS_AND_NOTIFICATIONS_SETTINGS(DialogsAndNotificationsSettingsFragment.class.getName(), false, null, R.xml.dialogs_and_notifications_preferences, R.layout.global_preferences_toolbar_with_switch), PROFILE_APPEARANCE(ProfileAppearanceFragment.TAG, true, null, R.xml.profile_appearance, R.layout.profile_preference_toolbar), OPEN_STREET_MAP_EDITING(OsmEditingFragment.class.getName(), false, null, R.xml.osm_editing, R.layout.global_preference_toolbar), - MULTIMEDIA_NOTES(MultimediaNotesFragment.class.getName(), true, MessageType.SNACK_BAR, R.xml.multimedia_notes, R.layout.profile_preference_toolbar), - MONITORING_SETTINGS(MonitoringSettingsFragment.class.getName(), true, MessageType.SNACK_BAR, R.xml.monitoring_settings, R.layout.profile_preference_toolbar), + MULTIMEDIA_NOTES(MultimediaNotesFragment.class.getName(), true, ApplyQueryType.SNACK_BAR, R.xml.multimedia_notes, R.layout.profile_preference_toolbar), + MONITORING_SETTINGS(MonitoringSettingsFragment.class.getName(), true, ApplyQueryType.SNACK_BAR, R.xml.monitoring_settings, R.layout.profile_preference_toolbar), LIVE_MONITORING(LiveMonitoringFragment.class.getName(), false, null, R.xml.live_monitoring, R.layout.global_preferences_toolbar_with_switch), - ACCESSIBILITY_SETTINGS(AccessibilitySettingsFragment.class.getName(), true, MessageType.SNACK_BAR, R.xml.accessibility_settings, R.layout.profile_preference_toolbar), + ACCESSIBILITY_SETTINGS(AccessibilitySettingsFragment.class.getName(), true, ApplyQueryType.SNACK_BAR, R.xml.accessibility_settings, R.layout.profile_preference_toolbar), DEVELOPMENT_SETTINGS(DevelopmentSettingsFragment.class.getName(), false, null, R.xml.development_settings, R.layout.global_preference_toolbar); public final String fragmentName; public final boolean profileDependent; - public final MessageType onChangeMessageType; + public final ApplyQueryType applyQueryType; public final int preferencesResId; public final int toolbarResId; - SettingsScreenType(String fragmentName, boolean profileDependent, MessageType onChangeMessageType, int preferencesResId, int toolbarResId) { + SettingsScreenType(String fragmentName, boolean profileDependent, ApplyQueryType applyQueryType, int preferencesResId, int toolbarResId) { this.fragmentName = fragmentName; this.profileDependent = profileDependent; - this.onChangeMessageType = onChangeMessageType; + this.applyQueryType = applyQueryType; this.preferencesResId = preferencesResId; this.toolbarResId = toolbarResId; } } - private enum MessageType { - SNACK_BAR, BOTTOM_SHEET - } - @Override public void onCreate(Bundle savedInstanceState) { app = requireMyApplication(); @@ -318,21 +314,26 @@ public abstract class BaseSettingsFragment extends PreferenceFragmentCompat impl @Override public boolean onPreferenceChange(Preference preference, Object newValue) { - MessageType messageType = getMessageType(); - if (messageType != null) { - String prefId = preference.getKey(); + return onApplyPreference(preference.getKey(), newValue, getApplyQueryType()); + } + + @Override + public boolean onApplyPreference(String prefId, Object newValue, ApplyQueryType applyQueryType) { + if (applyQueryType != null && newValue instanceof Serializable) { OsmandSettings.OsmandPreference pref = settings.getPreference(prefId); - if (pref instanceof CommonPreference && !((CommonPreference) pref).hasDefaultValueForMode(getSelectedAppMode())) { - FragmentManager fragmentManager = getFragmentManager(); - if (newValue instanceof Serializable) { - if (messageType == MessageType.SNACK_BAR) { - applyChangeAndSuggestApplyToAllProfiles(prefId, (Serializable) newValue); - } else if (messageType == MessageType.BOTTOM_SHEET && fragmentManager != null) { + if (pref instanceof CommonPreference) { + if (applyQueryType == ApplyQueryType.SNACK_BAR) { + applySettingWithSnackBar(prefId, (Serializable) newValue); + } else if (applyQueryType == ApplyQueryType.BOTTOM_SHEET) { + FragmentManager fragmentManager = getFragmentManager(); + if (fragmentManager != null) { ChangeGeneralProfilesPrefBottomSheet.showInstance(fragmentManager, prefId, (Serializable) newValue, this, false, getSelectedAppMode()); } + } else if (applyQueryType == ApplyQueryType.NONE) { + onSettingApplied(prefId, newValue, false); } - return false; + return true; } } return true; @@ -347,8 +348,8 @@ public abstract class BaseSettingsFragment extends PreferenceFragmentCompat impl return currentScreenType != null && currentScreenType.profileDependent; } - public MessageType getMessageType() { - return currentScreenType != null ? currentScreenType.onChangeMessageType : null; + public ApplyQueryType getApplyQueryType() { + return currentScreenType != null ? currentScreenType.applyQueryType : null; } @Override @@ -605,6 +606,14 @@ public abstract class BaseSettingsFragment extends PreferenceFragmentCompat impl public void onSettingApplied(String prefId, boolean appliedToAllProfiles) { } + public void onSettingApplied(String prefId, Object newValue, boolean appliedToAllProfiles) { + if (appliedToAllProfiles) { + app.getSettings().setPreferenceForAllModes(prefId, newValue); + } else { + app.getSettings().setPreference(prefId, newValue, getSelectedAppMode()); + } + } + public void updateAllSettings() { PreferenceScreen screen = getPreferenceScreen(); if (screen != null) { @@ -895,9 +904,8 @@ public abstract class BaseSettingsFragment extends PreferenceFragmentCompat impl } } - protected void applyChangeAndSuggestApplyToAllProfiles(final String prefId, final Serializable newValue) { - app.getSettings().setPreference(prefId, newValue, getSelectedAppMode()); - onSettingApplied(prefId, false); + protected void applySettingWithSnackBar(final String prefId, final Serializable newValue) { + onSettingApplied(prefId, newValue, false); updateSetting(prefId); View containerView = getView(); if (containerView != null) { @@ -908,8 +916,7 @@ public abstract class BaseSettingsFragment extends PreferenceFragmentCompat impl .setAction(R.string.apply_to_all_profiles, new View.OnClickListener() { @Override public void onClick(View view) { - app.getSettings().setPreferenceForAllModes(prefId, newValue); - onSettingApplied(prefId, true); + onSettingApplied(prefId, newValue, true); } }); snackbar.show(); diff --git a/OsmAnd/src/net/osmand/plus/settings/GeneralProfileSettingsFragment.java b/OsmAnd/src/net/osmand/plus/settings/GeneralProfileSettingsFragment.java index 29e0736a56..17c72554a2 100644 --- a/OsmAnd/src/net/osmand/plus/settings/GeneralProfileSettingsFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/GeneralProfileSettingsFragment.java @@ -354,8 +354,8 @@ public class GeneralProfileSettingsFragment extends BaseSettingsFragment impleme @Override public boolean onPreferenceChange(Preference preference, Object newValue) { String prefId = preference.getKey(); - if (prefId.equals(settings.ROTATE_MAP.getId()) && newValue instanceof Serializable) { - applyChangeAndSuggestApplyToAllProfiles(prefId, (Serializable) newValue); + if (settings.ROTATE_MAP.getId().equals(prefId)) { + onApplyPreference(prefId, newValue, ApplyQueryType.SNACK_BAR); return false; } return super.onPreferenceChange(preference, newValue); diff --git a/OsmAnd/src/net/osmand/plus/settings/MapDuringNavigationFragment.java b/OsmAnd/src/net/osmand/plus/settings/MapDuringNavigationFragment.java index 848229be3e..71cd3a577f 100644 --- a/OsmAnd/src/net/osmand/plus/settings/MapDuringNavigationFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/MapDuringNavigationFragment.java @@ -102,18 +102,38 @@ public class MapDuringNavigationFragment extends BaseSettingsFragment { @Override public boolean onPreferenceChange(Preference preference, Object newValue) { if (preference.getKey().equals(settings.AUTO_ZOOM_MAP.getId())) { - if (newValue instanceof Integer) { - ApplicationMode selectedMode = getSelectedAppMode(); - int position = (int) newValue; - if (position == 0) { - settings.AUTO_ZOOM_MAP.setModeValue(selectedMode, false); - } else { - settings.AUTO_ZOOM_MAP.setModeValue(selectedMode, true); - settings.AUTO_ZOOM_MAP_SCALE.setModeValue(selectedMode, OsmandSettings.AutoZoomMap.values()[position - 1]); - } - return true; - } + onApplyPreference(settings.AUTO_ZOOM_MAP.getId(), newValue, ApplyQueryType.SNACK_BAR); + return true; } return super.onPreferenceChange(preference, newValue); } + + @Override + public void onSettingApplied(String prefId, Object newValue, boolean appliedToAllProfiles) { + if (settings.AUTO_ZOOM_MAP.getId().equals(prefId)) { + if (newValue instanceof Integer) { + ApplicationMode selectedMode = getSelectedAppMode(); + int position = (int) newValue; + if (appliedToAllProfiles) { + if (position == 0) { + settings.setPreferenceForAllModes(settings.AUTO_ZOOM_MAP.getId(), false); + } else { + settings.setPreferenceForAllModes(settings.AUTO_ZOOM_MAP.getId(), true); + settings.setPreferenceForAllModes(settings.AUTO_ZOOM_MAP_SCALE.getId(), + OsmandSettings.AutoZoomMap.values()[position - 1]); + } + } else { + if (position == 0) { + settings.AUTO_ZOOM_MAP.setModeValue(selectedMode, false); + } else { + settings.AUTO_ZOOM_MAP.setModeValue(selectedMode, true); + settings.AUTO_ZOOM_MAP_SCALE.setModeValue(selectedMode, + OsmandSettings.AutoZoomMap.values()[position - 1]); + } + } + return; + } + } + super.onSettingApplied(prefId, newValue, appliedToAllProfiles); + } } \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/settings/NavigationFragment.java b/OsmAnd/src/net/osmand/plus/settings/NavigationFragment.java index 6ab55132c1..8826e78ea2 100644 --- a/OsmAnd/src/net/osmand/plus/settings/NavigationFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/NavigationFragment.java @@ -93,14 +93,13 @@ public class NavigationFragment extends BaseSettingsFragment { } @Override - public boolean onPreferenceChange(Preference preference, Object newValue) { - String key = preference.getKey(); - if (settings.VOICE_MUTE.getId().equals(key) && newValue instanceof Boolean) { - settings.VOICE_MUTE.setModeValue(getSelectedAppMode(), !(Boolean) newValue); + public void onSettingApplied(String prefId, Object newValue, boolean appliedToAllProfiles) { + if (settings.VOICE_MUTE.getId().equals(prefId) && newValue instanceof Boolean) { + super.onSettingApplied(prefId, !(Boolean) newValue, appliedToAllProfiles); updateMenu(); - return true; + return; } - return super.onPreferenceChange(preference, newValue); + super.onSettingApplied(prefId, newValue, appliedToAllProfiles); } @Override diff --git a/OsmAnd/src/net/osmand/plus/settings/OnApplyPreference.java b/OsmAnd/src/net/osmand/plus/settings/OnApplyPreference.java new file mode 100644 index 0000000000..d8e36c0d2d --- /dev/null +++ b/OsmAnd/src/net/osmand/plus/settings/OnApplyPreference.java @@ -0,0 +1,7 @@ +package net.osmand.plus.settings; + +public interface OnApplyPreference { + + boolean onApplyPreference(String prefId, Object newValue, ApplyQueryType applyQueryType); + +} diff --git a/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java b/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java index ba0114f046..d346c6a4c2 100644 --- a/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java @@ -57,6 +57,7 @@ public class RouteParametersFragment extends BaseSettingsFragment implements OnP private static final String ROUTE_PARAMETERS_INFO = "route_parameters_info"; private static final String ROUTE_PARAMETERS_IMAGE = "route_parameters_image"; private static final String RELIEF_SMOOTHNESS_FACTOR = "relief_smoothness_factor"; + private static final String ROUTING_SHORT_WAY = "prouting_short_way"; private static final String ROUTING_RECALC_DISTANCE= "routing_recalc_distance"; public static final float DISABLE_MODE = -1.0f; @@ -410,30 +411,45 @@ public class RouteParametersFragment extends BaseSettingsFragment implements OnP } @Override - public boolean onPreferenceChange(Preference preference, Object newValue) { - String key = preference.getKey(); - - if ((RELIEF_SMOOTHNESS_FACTOR.equals(key) || DRIVING_STYLE.equals(key)) && newValue instanceof String) { + public void onSettingApplied(String prefId, Object newValue, boolean appliedToAllProfiles) { + if ((RELIEF_SMOOTHNESS_FACTOR.equals(prefId) || DRIVING_STYLE.equals(prefId)) && newValue instanceof String) { ApplicationMode appMode = getSelectedAppMode(); String selectedParameterId = (String) newValue; - List routingParameters = DRIVING_STYLE.equals(key) ? drivingStyleParameters : reliefFactorParameters; + List routingParameters = DRIVING_STYLE.equals(prefId) ? drivingStyleParameters : reliefFactorParameters; for (RoutingParameter p : routingParameters) { String parameterId = p.getId(); SettingsNavigationActivity.setRoutingParameterSelected(settings, appMode, parameterId, p.getDefaultBoolean(), parameterId.equals(selectedParameterId)); } recalculateRoute(); - return true; - } else if ("prouting_short_way".equals(key) && newValue instanceof Boolean) { - return app.getSettings().FAST_ROUTE_MODE.setModeValue(getSelectedAppMode(), !(Boolean) newValue); - } else if (ROUTING_RECALC_DISTANCE.equals(key) && newValue instanceof Boolean) { - boolean enabled = (Boolean) newValue; - settings.ROUTE_RECALCULATION_DISTANCE.setModeValue(getSelectedAppMode(), - enabled ? DEFAULT_MODE : DISABLE_MODE); - settings.DISABLE_OFFROUTE_RECALC.setModeValue(getSelectedAppMode(), !enabled); + return; + } else if (ROUTING_SHORT_WAY.equals(prefId) && newValue instanceof Boolean) { + if (appliedToAllProfiles) { + settings.setPreferenceForAllModes(settings.FAST_ROUTE_MODE.getId(), !(Boolean) newValue); + } else { + settings.setPreference(settings.FAST_ROUTE_MODE.getId(), !(Boolean) newValue, getSelectedAppMode()); + } + return; + } else if (ROUTING_RECALC_DISTANCE.equals(prefId)) { + boolean enabled = false; + float valueToSave = DISABLE_MODE; + if (newValue instanceof Boolean) { + enabled = (boolean) newValue; + valueToSave = enabled ? DEFAULT_MODE : DISABLE_MODE; + } else if (newValue instanceof Float) { + valueToSave = (float) newValue; + enabled = valueToSave != DISABLE_MODE; + } + if (appliedToAllProfiles) { + settings.setPreferenceForAllModes(prefId, valueToSave); + settings.setPreferenceForAllModes(settings.DISABLE_OFFROUTE_RECALC.getId(), !enabled); + } else { + settings.setPreference(prefId, valueToSave, getSelectedAppMode()); + settings.setPreference(settings.DISABLE_OFFROUTE_RECALC.getId(), !enabled, getSelectedAppMode()); + } updateRouteRecalcDistancePref(); + return; } - - return super.onPreferenceChange(preference, newValue); + super.onSettingApplied(prefId, newValue, appliedToAllProfiles); } @Override diff --git a/OsmAnd/src/net/osmand/plus/settings/ScreenAlertsFragment.java b/OsmAnd/src/net/osmand/plus/settings/ScreenAlertsFragment.java index ac693e8f44..c2d4a35d02 100644 --- a/OsmAnd/src/net/osmand/plus/settings/ScreenAlertsFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/ScreenAlertsFragment.java @@ -55,8 +55,7 @@ public class ScreenAlertsFragment extends BaseSettingsFragment { public void onClick(View view) { ApplicationMode selectedMode = getSelectedAppMode(); boolean checked = !settings.SHOW_ROUTING_ALARMS.getModeValue(selectedMode); - settings.SHOW_ROUTING_ALARMS.setModeValue(selectedMode, checked); - applyChangeAndSuggestApplyToAllProfiles(settings.SHOW_ROUTING_ALARMS.getId(), checked); + onApplyPreference(settings.SHOW_ROUTING_ALARMS.getId(), checked, ApplyQueryType.SNACK_BAR); updateToolbarSwitch(); enableDisablePreferences(checked); } diff --git a/OsmAnd/src/net/osmand/plus/settings/TurnScreenOnFragment.java b/OsmAnd/src/net/osmand/plus/settings/TurnScreenOnFragment.java index f402402f87..884d7bbdd0 100644 --- a/OsmAnd/src/net/osmand/plus/settings/TurnScreenOnFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/TurnScreenOnFragment.java @@ -43,8 +43,7 @@ public class TurnScreenOnFragment extends BaseSettingsFragment { public void onClick(View view) { ApplicationMode selectedMode = getSelectedAppMode(); boolean checked = !settings.TURN_SCREEN_ON_ENABLED.getModeValue(selectedMode); - settings.TURN_SCREEN_ON_ENABLED.setModeValue(selectedMode, checked); - applyChangeAndSuggestApplyToAllProfiles(settings.TURN_SCREEN_ON_ENABLED.getId(), checked); + onApplyPreference(settings.TURN_SCREEN_ON_ENABLED.getId(), checked, ApplyQueryType.SNACK_BAR); updateToolbarSwitch(); enableDisablePreferences(checked); } diff --git a/OsmAnd/src/net/osmand/plus/settings/VoiceAnnouncesFragment.java b/OsmAnd/src/net/osmand/plus/settings/VoiceAnnouncesFragment.java index e87f8e73c1..4a8b1eb323 100644 --- a/OsmAnd/src/net/osmand/plus/settings/VoiceAnnouncesFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/VoiceAnnouncesFragment.java @@ -50,8 +50,7 @@ public class VoiceAnnouncesFragment extends BaseSettingsFragment { public void onClick(View view) { ApplicationMode selectedMode = getSelectedAppMode(); boolean checked = !settings.VOICE_MUTE.getModeValue(selectedMode); - settings.VOICE_MUTE.setModeValue(selectedMode, checked); - applyChangeAndSuggestApplyToAllProfiles(settings.VOICE_MUTE.getId(), checked); + onApplyPreference(settings.VOICE_MUTE.getId(), checked, ApplyQueryType.SNACK_BAR); updateToolbarSwitch(); enableDisablePreferences(!checked); updateMenu(); @@ -220,7 +219,7 @@ public class VoiceAnnouncesFragment extends BaseSettingsFragment { @Override public void onClick(DialogInterface dialog, int which) { - settings.SPEAK_SPEED_CAMERA.setModeValue(getSelectedAppMode(), true); + onApplyPreference(settings.SPEAK_SPEED_CAMERA.getId(), true, ApplyQueryType.SNACK_BAR); SwitchPreferenceCompat speakSpeedCamera = (SwitchPreferenceCompat) findPreference(settings.SPEAK_SPEED_CAMERA.getId()); if (speakSpeedCamera != null) { speakSpeedCamera.setChecked(true); @@ -269,11 +268,11 @@ public class VoiceAnnouncesFragment extends BaseSettingsFragment { return false; } else if (newValue instanceof String) { if (VOICE_PROVIDER_NOT_USE.equals(newValue)) { - settings.VOICE_MUTE.setModeValue(selectedMode, true); + onApplyPreference(settings.VOICE_MUTE.getId(), true, ApplyQueryType.SNACK_BAR); updateToolbar(); - setupPreferences(); +// setupPreferences(); //TODO doesn't need anymore } - settings.VOICE_PROVIDER.setModeValue(selectedMode, (String) newValue); + onApplyPreference(settings.VOICE_PROVIDER.getId(), newValue, ApplyQueryType.SNACK_BAR); app.initVoiceCommandPlayer(getActivity(), selectedMode, false, null, true, false, false); } return true; @@ -283,7 +282,7 @@ public class VoiceAnnouncesFragment extends BaseSettingsFragment { confirmSpeedCamerasDlg(); return false; } else { - return true; + return onApplyPreference(settings.SPEAK_SPEED_CAMERA.getId(), false, ApplyQueryType.SNACK_BAR); } } if (prefId.equals(settings.AUDIO_MANAGER_STREAM.getId())) { diff --git a/OsmAnd/src/net/osmand/plus/settings/bottomsheets/RecalculateRouteInDeviationBottomSheet.java b/OsmAnd/src/net/osmand/plus/settings/bottomsheets/RecalculateRouteInDeviationBottomSheet.java index 3bc0afc256..d7be43df22 100644 --- a/OsmAnd/src/net/osmand/plus/settings/bottomsheets/RecalculateRouteInDeviationBottomSheet.java +++ b/OsmAnd/src/net/osmand/plus/settings/bottomsheets/RecalculateRouteInDeviationBottomSheet.java @@ -26,6 +26,8 @@ import net.osmand.plus.base.bottomsheetmenu.simpleitems.DividerSpaceItem; import net.osmand.plus.base.bottomsheetmenu.simpleitems.SubtitmeListDividerItem; import net.osmand.plus.base.bottomsheetmenu.simpleitems.TitleItem; import net.osmand.plus.routing.RoutingHelper; +import net.osmand.plus.settings.ApplyQueryType; +import net.osmand.plus.settings.OnApplyPreference; import net.osmand.plus.settings.OnPreferenceChanged; import net.osmand.plus.settings.preferences.SwitchPreferenceEx; @@ -109,19 +111,21 @@ public class RecalculateRouteInDeviationBottomSheet extends BooleanPreferenceBot @Override public void onClick(View v) { enabled = !enabled; - if (switchPref.callChangeListener(enabled)) { - sliderPositionChanged = false; - switchPref.setChecked(enabled); - preferenceBtn[0].setTitle(enabled ? on : off); - preferenceBtn[0].setTitleColorId(enabled ? activeColor : disabledColor); - preferenceBtn[0].setChecked(enabled); - getDefaultValue(); - updateSliderView(); - updateCustomButtonView(v, enabled); - Fragment target = getTargetFragment(); - if (target instanceof OnPreferenceChanged) { - ((OnPreferenceChanged) target).onPreferenceChanged(switchPref.getKey()); - } + sliderPositionChanged = false; + switchPref.setChecked(enabled); + preferenceBtn[0].setTitle(enabled ? on : off); + preferenceBtn[0].setTitleColorId(enabled ? activeColor : disabledColor); + preferenceBtn[0].setChecked(enabled); + getDefaultValue(); + updateSliderView(); + updateCustomButtonView(v, enabled); + Fragment target = getTargetFragment(); + float newValue = enabled ? DEFAULT_MODE : DISABLE_MODE; + if (target instanceof OnApplyPreference) { + ((OnApplyPreference) target).onApplyPreference(switchPref.getKey(), newValue, ApplyQueryType.NONE); + } + if (target instanceof OnPreferenceChanged) { + ((OnPreferenceChanged) target).onPreferenceChanged(switchPref.getKey()); } } }) @@ -152,11 +156,13 @@ public class RecalculateRouteInDeviationBottomSheet extends BooleanPreferenceBot @Override protected void onRightBottomButtonClick() { if (enabled && sliderPositionChanged) { - preference.setModeValue(getAppMode(), currentValue); - } - Fragment target = getTargetFragment(); - if (target instanceof OnPreferenceChanged) { - ((OnPreferenceChanged) target).onPreferenceChanged(preference.getId()); + Fragment target = getTargetFragment(); + if (target instanceof OnApplyPreference) { + ((OnApplyPreference) target).onApplyPreference(preference.getId(), currentValue, ApplyQueryType.SNACK_BAR); + } + if (target instanceof OnPreferenceChanged) { + ((OnPreferenceChanged) target).onPreferenceChanged(preference.getId()); + } } dismiss(); } From 42bb573b117e20681ba6fff2ec3bb61058908b60 Mon Sep 17 00:00:00 2001 From: Dima-1 Date: Mon, 6 Apr 2020 17:12:08 +0300 Subject: [PATCH 063/202] Fix tablet layout paddings in appBar, fix bearing icon background. --- .../layout/preference_select_icon_button.xml | 45 ++++++++++--------- OsmAnd/res/values/styles.xml | 6 ++- 2 files changed, 30 insertions(+), 21 deletions(-) diff --git a/OsmAnd/res/layout/preference_select_icon_button.xml b/OsmAnd/res/layout/preference_select_icon_button.xml index ac80040512..dde4fb5d64 100644 --- a/OsmAnd/res/layout/preference_select_icon_button.xml +++ b/OsmAnd/res/layout/preference_select_icon_button.xml @@ -5,29 +5,34 @@ android:layout_height="wrap_content" android:padding="6dp"> - + android:layout_height="128dp"> - + - + - + + + + \ No newline at end of file diff --git a/OsmAnd/res/values/styles.xml b/OsmAnd/res/values/styles.xml index c3e1eeb4d4..cea274876b 100644 --- a/OsmAnd/res/values/styles.xml +++ b/OsmAnd/res/values/styles.xml @@ -564,7 +564,7 @@ @color/active_color_primary_dark - @@ -768,4 +768,8 @@ ?attr/app_bar_primary_item_color @dimen/dialog_header_text_size + + From 62d9f4cab07787ec69c386ee90b6936914d0a918 Mon Sep 17 00:00:00 2001 From: Hakuchi Date: Mon, 6 Apr 2020 12:03:55 +0000 Subject: [PATCH 064/202] Translated using Weblate (German) Currently translated at 99.9% (3796 of 3798 strings) --- OsmAnd/res/values-de/phrases.xml | 178 +++++++++++++++---------------- 1 file changed, 89 insertions(+), 89 deletions(-) diff --git a/OsmAnd/res/values-de/phrases.xml b/OsmAnd/res/values-de/phrases.xml index 4673a7ccef..e7a903afea 100644 --- a/OsmAnd/res/values-de/phrases.xml +++ b/OsmAnd/res/values-de/phrases.xml @@ -1124,7 +1124,7 @@ Mit Abfalleimer ohne Abfalleimer WLAN - Arbeitsplatz + Terminal kabelgebunden Internetzugang: öffentlich Internetzugang: Dienstleistung @@ -1489,7 +1489,7 @@ Vereinigte Kirche Christi Wissenschaftler Rumänisch-orthodox - Typ: Wappen + Art: Wappen Material: Stahlbeton Material: Beton Material: Mauerwerk @@ -1502,14 +1502,14 @@ Befestigung Siedlung Stadt - Nekropole + Nekropolis Erdarbeiten - Megalithtyp: Menhir - Megalithtyp: Dolmen - Befestigungstyp: Wallburg - Befestigungstyp: Limes - Befestungstyp: Schanze - Befestigungstyp: Ringgraben + Grabtyp: Hinkelstein + Grabtyp: Hünengrab + Befestigungsart: Wallburg + Befestigungsart: Limes + Befestungsart: Schanze + Befestigungsart: Ringgraben Pa (befestigte Siedlung der Maori) Historischer Bauernhof Freimaurerloge @@ -1520,11 +1520,11 @@ Bildhauer Gebäudeart: Kloster Ehemaliges Gefangenenlager - Typ: Konzentrationslager - Typ: Kriegsgefangenenlager - Typ: Arbeitslager - Typ: Nazi - Typ: Gulag + Art: Konzentrationslager + Art: Kriegsgefangenenlager + Art: Arbeitslager + Art: Nazi + Art: Gulag Baden: ja Baden: nein Bootslager @@ -1605,7 +1605,7 @@ Shingon-shū Mahayana-Buddhisten Jersey-Barriere - Nadelwald + Nadeln Küche Wegweiser Wegmarkierung @@ -1896,16 +1896,16 @@ Palme Fahnenstange Öffentlicher Verkehr - Picknickschutz - Wetterschutz + Picknick-Unterstand + Wetter-Unterstand Anbau Gebäude - Grundhütte + Hütte Tierschutz Felsüberhang Sonnenschutz Feldhütte - Unterstandtyp: Zelt + Zelt Unterstandtyp: verlassen Tempelturm Baryt @@ -1914,7 +1914,7 @@ Kunstart: Statue Kunstart: Wandgemälde Kunstart: Architektur - Kunstart: Malen + Kunstart: Bild Kunstart: Stein Kunstart: Büste Kunstart: Installation @@ -2031,28 +2031,28 @@ Ausbildung: Luftfahrt Ausbildung: Frisör Monumentales Objekt - Typ: Ölindustrie - Typ: Internetseite - Typ: Fabrik - Typ: Gasindustrie - Typ: Bauholz - Typ: Raffinerie - Typ: Warenhaus - Typ: Autoabschleppdienst - Typ: Landwirtschaft - Typ: Brauerei - Typ: Ziegelei - Typ: intermodales Frachtterminal - Typ: Sägewerk - Typ: Wasseraufbereitung - Typ: Hafen - Typ: Lagerhaus + Art: Ölindustrie + Art: Bohrstelle + Art: Fabrik + Art: Gasindustrie + Art: Bauholz + Art: Raffinerie + Art: Warenhaus + Art: KFZ Schrotthändler + Art: Landwirtschaft + Art: Brauerei + Art: Ziegelei + Art: intermodales Frachtterminal + Art: Sägewerk + Art: Wasseraufbereitung + Art: Hafen + Art: Lagerhaus Trog Tierbeförderung - Beförderungstyp: Hund - Beförderungstyp: Katze - Beförderungstyp: Hund, Katze - Beförderungstyp: Pferd + Tierpensionstyp: Hund + Tierpensionstyp: Katze + Tierpensionstyp: Hund, Katze + Tierpensionstyp: Pferd Honiggeschäft Technisches Denkmal Campingbüro @@ -2103,7 +2103,7 @@ Burgtyp: Verteidigung Burgtyp: Festung Burgtyp: Palast - Burgtyp: Verteidigung, stattlich + Burgtyp: Verteidigung, Adelssitz Thailändisch Sexuell Massagen @@ -2144,7 +2144,7 @@ Beratungsstelle Anbauprodukt: Lavendel Burgtyp: Kreml - Burgtyp: Römerkastell + Burgtyp: römisches Kastell Burgtyp: Shiro Chinesisch Brennofen @@ -2162,16 +2162,16 @@ Treppenzustand: schlecht Steinhügel Fassadendekoration - Typ: Kriegsgräber - Typ: Hügelgrab - Typ: Felsgrab - Typ: Hypogäum - Typ: Gewölbe - Typ: Kolumbarium - Typ: Mausoleum - Typ: Sarkophag - Typ: Krypta - Typ: Pyramide + Art: Kriegsgräber + Art: Hügelgrab + Art: Felsgrab + Art: Hypogäum + Art: Gewölbe + Art: Kolumbarium + Art: Mausoleum + Art: Sarkophag + Art: Krypta + Art: Pyramide Kultur: römische Antike (753 v. Chr. - 284 n. Chr.) Kultur: Nuraghen (18. Jh. v. Chr. - 2. Jh. n. Chr.) Kultur: Etrusker (12. - 6. Jh. v. Chr.) @@ -2234,12 +2234,12 @@ Historische Epoche: Mittelsteinzeit Historische Epoche: Jungsteinzeit Historische Epoche: Kupfersteinzeit (4. - 3. Jahrtausend v. Chr.) - Typ: Steinkreuz + Art: Steinkreuz Hüttenkreis - Petroglyphe - Megalithtyp: Nuraghe - Megalithtyp: Steinkreis - Megalithtyp: Ganggrab + Felsbild + Grabtyp: prähistorische Turmbauten + Grabtyp: Steinkreis + Grabtyp: Ganggrab Gipfelkreuz: ja Vermittlung: ja Afrikanisches Wiki @@ -2342,7 +2342,7 @@ Naturheilkunde Tiefenpsychologie Verhaltenstherapie - Gebäudetyp: Pyramide + Gebäudeart: Pyramide Fitnesscenter Fitness Billard @@ -2350,7 +2350,7 @@ Mikrowelle: nein Wasserkocher: ja Wasserkocher: nein - Oberfläche + Art: Freifläche Garagen Carports Dojo @@ -2536,7 +2536,7 @@ Funktion im Gesundheitssektor: Pflegefachkraft Funktion im Gesundheitssektor: Sanitäter Funktion im Gesundheitssektor: Arzt - Funktion im Gesundheitssektor: Podologin + Funktion im Gesundheitssektor: Podologe Funktion im Gesundheitssektor: Psychologe Funktion im Gesundheitssektor: Therapeut Funktion im Gesundheitssektor: Assistenzarzt @@ -2775,27 +2775,27 @@ Kraftstoffart (avia) Tankkarten Internet-Zugangsart - Kleidungsart - Schuhart - Feuerhydranttyp + Art + Art + Art Position Wasserquelle Zahlungsart - Art des Fußgängerübergangs + Art Ertastbares Pflaster Bürstenlos Automatisiert - Parkplatztyp + Art Überdacht Fracht - Art des Fahrradparkens + Art Fahrradtransport Heizung Pumpe Bezeichnung - Teleskoptyp - Tierausbildungsart - Botschaftsart + Art + Art + Art Hauptstadt Signalton U-Bahnstation @@ -2822,10 +2822,10 @@ Oberfläche FKK Rollstuhlgerecht - Art des Urlaubsortes + Art Pistenpflege - Recyclingtyp - Unterkunftsart + Art + Art Weihnachten Weihnachtsveranstaltung Weihnachtsmarkt @@ -2843,19 +2843,19 @@ Dienstleistung Selbstbedienung Nach Rezept - Art der archäologischen Fundstätte + Art Bewertung in Sternen Konfession - Informationsart + Art Drive-in Durchfahrschalter Dienstleistung Öffentlicher Bücherschrank - Typ: Telefonzelle - Typ: Lesebox - Typ: Holzgehäuse - Typ: Metallschrank - Typ: Regal + Art: Telefonzelle + Art: Lesebox + Art: Holzgehäuse + Art: Metallschrank + Art: Regal Zelte Waschmaschine Wohnwagen @@ -3034,7 +3034,7 @@ Döner Kebab (Schawarma) Schawarma Speisen - Art der Sozialeinrichtung + Art Apfelweinhaus Baguetterie Pastel @@ -3049,7 +3049,7 @@ Leuchten Lotteriescheine Spielbank - Glücksspielart + Art Lotterie Pachinko Spielautomaten @@ -3065,8 +3065,8 @@ Tierhaltung Tierhaltung: Pferd Tierhaltung: Schaf - Typ: offener Stall - Typ: Paddock + Art: offener Stall + Art: Paddock Bauart: Gitter Anlage: freistehend Bauart: Kuppel @@ -3095,7 +3095,7 @@ Voliere Falknerei Reptilien - Zootyp + Art Vögel Kundendienst Motorradtyp @@ -3115,7 +3115,7 @@ Motorradbekleidung Motorradbekleidung: nein Motorroller - Supersportler + Sport-Motorrad Chopper Gelände Reiseenduro @@ -3518,7 +3518,7 @@ Geldautomat Schuhreparatur Verpackungsfreie Waren - Umspannwerkstyp + Art ja Nur verpackungsfrei Umspannwerk @@ -3749,7 +3749,7 @@ Postbank PostFinance Card Migros Bank - Badtyp + Art Heiße Quelle Onsen Hammam @@ -3772,7 +3772,7 @@ Grab Parkbucht URL - Vulkanart + Art Vulkanstatus Schlacke Schichtvulkan @@ -3805,7 +3805,7 @@ Kontrastiert Falsch Unterstand - Unterstand Typ + Unterstand-Art Primitiv Wasserstand: teilweise überflutet Wasserstand: überflutet From 08c933d1a5bb0cc47e4729ccc9ea96662df46652 Mon Sep 17 00:00:00 2001 From: ce4 Date: Mon, 6 Apr 2020 12:15:02 +0000 Subject: [PATCH 065/202] Translated using Weblate (German) Currently translated at 99.9% (3796 of 3798 strings) --- OsmAnd/res/values-de/phrases.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/OsmAnd/res/values-de/phrases.xml b/OsmAnd/res/values-de/phrases.xml index e7a903afea..c3099ddb74 100644 --- a/OsmAnd/res/values-de/phrases.xml +++ b/OsmAnd/res/values-de/phrases.xml @@ -604,7 +604,7 @@ Achterbahn Rutschbahn Sommerrodelbahn - Schaukel-Karussell + Kettenkarussell Eisenbahn (Attraktion) Wasserrutsche Turm @@ -895,7 +895,7 @@ Restmüll Kunststoffverpackungen Zeitungen - Kartons + Kartonagen Pappe Zeitschriften Papierverpackungen @@ -957,10 +957,10 @@ CDs Altöl Blech - Folie + Folien Medikamente - Spanplatte - Gipskartonplatte + Spanplatten + Gipskartonplatten Tierischer Abfall Überwachungsstation ja @@ -1276,7 +1276,7 @@ Spiritualismus Evangelikal Mormonen - Jehovas Zeugen + Zeugen Jehovas Griechisch-katholisch Bulgarisch-orthodox Adventisten From 3cca08d0a9ee64f4c45e5582c05059302e4f3f67 Mon Sep 17 00:00:00 2001 From: Hakuchi Date: Mon, 6 Apr 2020 11:56:57 +0000 Subject: [PATCH 066/202] Translated using Weblate (German) Currently translated at 100.0% (3254 of 3254 strings) --- OsmAnd/res/values-de/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/res/values-de/strings.xml b/OsmAnd/res/values-de/strings.xml index f8a77861ef..89b397f101 100644 --- a/OsmAnd/res/values-de/strings.xml +++ b/OsmAnd/res/values-de/strings.xml @@ -1435,7 +1435,7 @@ Routing-Regeln v1.9 nicht verwenden Neuen Routenalgorithmus aus v1.9 nicht verwenden. Fußgängerübergänge - Parkplatz + Parkbucht TAG ENTFERNEN GPS-Status Nightly-Builds herunterladen. From 21454910c4cb1694650ad3dc095d15ea1f27a6d0 Mon Sep 17 00:00:00 2001 From: Massimiliano Caniparoli Date: Mon, 6 Apr 2020 14:20:04 +0000 Subject: [PATCH 067/202] Translated using Weblate (Italian) Currently translated at 90.4% (2943 of 3254 strings) --- OsmAnd/res/values-it/strings.xml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/OsmAnd/res/values-it/strings.xml b/OsmAnd/res/values-it/strings.xml index 49b76e35ff..a1b12f098d 100644 --- a/OsmAnd/res/values-it/strings.xml +++ b/OsmAnd/res/values-it/strings.xml @@ -1902,7 +1902,9 @@ Memoria in proporzione %4$s MB (limite di Android %5$s MB, Dalvik %6$s MB).Parte della tua donazione sarà inviata agli utenti OSM che sottopongono modifiche alla mappa in quella regione. Impostazioni della sottoscrizione Per favore acquista prima la sottoscrizione a OsmAnd Live - La sottoscrizione abilita gli aggiornamenti orari per tutte le mappe del mondo. Parte degli incassi ritornano alla comunità OSM e sono corrisposti per ogni contributo a OSM. Se ti piacciono OsmAnd e OSM e vuoi sostenerli ed essere sostenuto da questi, questo è il miglior modo per farlo. + La sottoscrizione abilita gli aggiornamenti orari per tutte le mappe del mondo. +\nParte degli incassi ritornano alla comunità OSM e sono corrisposti per ogni contributo a OSM. +\nSe ti piacciono OsmAnd e OSM e vuoi sostenerli ed essere sostenuto da questi, questo è il miglior modo per farlo. Carica anonimamente Mostra la barra di ricerca trasparente Barra superiore @@ -2313,13 +2315,13 @@ Rappresenta l\'area: %1$s x %2$s \n \n Dall\'Afghanistan al Zimbabwe, dall\'Australia agli USA. Argentina, Brasile, Canada, Francia, Germania, Messico, Gran Bretagna, Spagna, … \n - "Contribuisci direttamente a OSM + Contribuisci direttamente a OSM \n • Segnala errori nei dati \n • Contribuisci tracce GPX a OSM direttamente dall\'app \n • Aggiungi PDI e caricali direttamente in OSM (o successivamente se sei offline) \n • Registrazione opzionale del viaggio anche in modalità background (mentre il dispositivo è in modalità sleep) -\n OsmAnd è software open-source attivamente in fase di sviluppo. Chiunque può contribuire all\'applicazione riportando degli errori, migliorando la traduzione o programmando nuove funzionalità. Inoltre il progetto si basa sui contributi finanziari per finanziare la programmazione e il test di nuove funzionalità. -\n " +\n OsmAnd è software open-source attivamente in fase di sviluppo. Chiunque può contribuire all\'applicazione riportando degli errori, migliorando la traduzione o programmando nuove funzionalità. Inoltre il progetto si basa sui contributi finanziari per finanziare la programmazione e il test di nuove funzionalità. +\n OsmAnd è un software open-source attivamente sviluppato. Chiunque può contribuire all\'app segnalando degli errori, migliorando la traduzione o programmando nuove funzionalità. Inoltre il progetto si basa anche sui contributi finanziari per finanziare la programmazione e il test di nuove funzionalità. \n Copertura e qualità della mappa approssimativa: \n • Ovest Europa: **** @@ -3564,10 +3566,10 @@ Rappresenta l\'area: %1$s x %2$s Alcuni oggetti esistono già Seleziona i dati da importare. Importa il file di rappresentazione - Tutti le impostazioni del profilo saranno ripristinate ai valori iniziali dopo l\'importazione/creazione di questo profilo. + Tutti le impostazioni del profilo saranno ripristinate ai valori iniziali dopo la creazione/importazione di questo profilo. Ripristinare tutte le impostazioni del profilo\? Salvataggio del nuovo profilo - Impossibile fare una copia di salvataggio del profilo. + Impossibile creare un backup del profilo. Sei sicuro di voler eliminare i dati registrati\? Importazione dei dati da %1$s Importazione in corso @@ -3575,7 +3577,7 @@ Rappresenta l\'area: %1$s x %2$s Importazione completata Tutti i dati sono stati importati da %1$s, puoi utilizzare i bottoni sottostanti per aprire e gestire le parti dell\' applicazione di cui necessiti. Il percorso verrà ricalcolato quando la distanza tra il percorso e la propria posizione è maggiore del valore selezionato. - Seleziona dopo che distanza effettuare il ricalcolo del percorso. + Seleziona le distanza dopo la quale il percorso verrà ricalcolato. Ricalcola il percorso in caso di deviazione Quadrato Rombo From 17925d09697e49102c9b9564680180da106a6837 Mon Sep 17 00:00:00 2001 From: jan madsen Date: Mon, 6 Apr 2020 14:29:00 +0000 Subject: [PATCH 068/202] Translated using Weblate (Danish) Currently translated at 89.8% (2925 of 3254 strings) --- OsmAnd/res/values-da/strings.xml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/OsmAnd/res/values-da/strings.xml b/OsmAnd/res/values-da/strings.xml index 76860fd8ec..ef609bec13 100644 --- a/OsmAnd/res/values-da/strings.xml +++ b/OsmAnd/res/values-da/strings.xml @@ -3586,4 +3586,11 @@ Repræsenterer område: %1$s x %2$s Reliefskygge Alle data fra %1$s er importeret, brug knapperne nedenfor til at åbne den nødvendige del af programmet til at håndtere det. Poster tilføjet - + Ski touring + Snescooter + Brugerdefineret udvidelse + Ændringer anvendt på %1$s profil. + Kunne ikke læse %1$s. + Kunne ikke skrive til %1$s. + Kunne ikke importere %1$s. + \ No newline at end of file From 1cc9058e7cd32c9025ce2247990175d06c6d19a5 Mon Sep 17 00:00:00 2001 From: Hakuchi Date: Mon, 6 Apr 2020 14:32:24 +0000 Subject: [PATCH 069/202] Translated using Weblate (German) Currently translated at 99.9% (3797 of 3798 strings) --- OsmAnd/res/values-de/phrases.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/res/values-de/phrases.xml b/OsmAnd/res/values-de/phrases.xml index c3099ddb74..9bf1893c62 100644 --- a/OsmAnd/res/values-de/phrases.xml +++ b/OsmAnd/res/values-de/phrases.xml @@ -552,7 +552,7 @@ Straßenbahnhaltestelle Reisebüro Tunnel - Wendehammer + Wendestelle Universität Tapezierer Staubsaugergeschäft From d42cbd0c05a2fdeb84b349c9af0ad480c71460a2 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Mon, 6 Apr 2020 18:47:50 +0300 Subject: [PATCH 070/202] Replace raster icons with VectorDrawable --- .../res/drawable-hdpi/ic_action_bug_dark.png | Bin 1313 -> 0 bytes .../ic_action_compass_widget.png | Bin 643 -> 0 bytes .../ic_action_compass_widget_hide.png | Bin 623 -> 0 bytes .../ic_action_coordinates_latitude.png | Bin 1605 -> 0 bytes .../ic_action_coordinates_longitude.png | Bin 1678 -> 0 bytes .../ic_action_coordinates_widget.png | Bin 878 -> 0 bytes OsmAnd/res/drawable-hdpi/ic_action_copy.png | Bin 1186 -> 0 bytes .../drawable-hdpi/ic_action_delete_dark.png | Bin 1134 -> 0 bytes .../drawable-hdpi/ic_action_gprint_dark.png | Bin 1206 -> 0 bytes .../drawable-hdpi/ic_action_gsave_dark.png | Bin 334 -> 0 bytes .../drawable-hdpi/ic_action_gshare_dark.png | Bin 1457 -> 0 bytes .../res/drawable-hdpi/ic_action_home_dark.png | Bin 1249 -> 0 bytes OsmAnd/res/drawable-hdpi/ic_action_import.png | Bin 1198 -> 0 bytes .../res/drawable-hdpi/ic_action_info_dark.png | Bin 1450 -> 0 bytes .../drawable-hdpi/ic_action_marker_dark.png | Bin 1467 -> 0 bytes .../drawable-hdpi/ic_action_micro_dark.png | Bin 1368 -> 0 bytes .../drawable-hdpi/ic_action_parking_dark.png | Bin 1260 -> 0 bytes .../drawable-hdpi/ic_action_photo_dark.png | Bin 1350 -> 0 bytes .../ic_action_previous_route.png | Bin 431 -> 0 bytes OsmAnd/res/drawable-hdpi/ic_action_ruler.png | Bin 1157 -> 0 bytes .../res/drawable-hdpi/ic_action_settings.png | Bin 1546 -> 0 bytes OsmAnd/res/drawable-hdpi/ic_action_travel.png | Bin 1340 -> 0 bytes .../drawable-hdpi/ic_action_video_dark.png | Bin 1206 -> 0 bytes OsmAnd/res/drawable-hdpi/ic_action_work.png | Bin 238 -> 0 bytes .../ic_configure_screen_dark.png | Bin 1483 -> 0 bytes OsmAnd/res/drawable-hdpi/ic_map.png | Bin 1383 -> 0 bytes .../drawable-hdpi/ic_navigation_drawer.png | Bin 1080 -> 0 bytes OsmAnd/res/drawable-hdpi/ic_plugin_srtm.png | Bin 1785 -> 0 bytes .../res/drawable-mdpi/ic_action_bug_dark.png | Bin 1210 -> 0 bytes .../ic_action_compass_widget.png | Bin 421 -> 0 bytes .../ic_action_compass_widget_hide.png | Bin 437 -> 0 bytes .../ic_action_coordinates_latitude.png | Bin 1378 -> 0 bytes .../ic_action_coordinates_longitude.png | Bin 1450 -> 0 bytes .../ic_action_coordinates_widget.png | Bin 521 -> 0 bytes OsmAnd/res/drawable-mdpi/ic_action_copy.png | Bin 1126 -> 0 bytes .../drawable-mdpi/ic_action_delete_dark.png | Bin 1087 -> 0 bytes .../drawable-mdpi/ic_action_gprint_dark.png | Bin 1132 -> 0 bytes .../drawable-mdpi/ic_action_gsave_dark.png | Bin 258 -> 0 bytes .../drawable-mdpi/ic_action_gshare_dark.png | Bin 1318 -> 0 bytes .../res/drawable-mdpi/ic_action_home_dark.png | Bin 1167 -> 0 bytes OsmAnd/res/drawable-mdpi/ic_action_import.png | Bin 1149 -> 0 bytes .../res/drawable-mdpi/ic_action_info_dark.png | Bin 1287 -> 0 bytes .../drawable-mdpi/ic_action_marker_dark.png | Bin 1291 -> 0 bytes .../drawable-mdpi/ic_action_micro_dark.png | Bin 1233 -> 0 bytes .../drawable-mdpi/ic_action_parking_dark.png | Bin 1177 -> 0 bytes .../drawable-mdpi/ic_action_photo_dark.png | Bin 1213 -> 0 bytes .../ic_action_previous_route.png | Bin 314 -> 0 bytes OsmAnd/res/drawable-mdpi/ic_action_ruler.png | Bin 1112 -> 0 bytes .../res/drawable-mdpi/ic_action_settings.png | Bin 1337 -> 0 bytes OsmAnd/res/drawable-mdpi/ic_action_travel.png | Bin 1222 -> 0 bytes .../drawable-mdpi/ic_action_video_dark.png | Bin 1123 -> 0 bytes OsmAnd/res/drawable-mdpi/ic_action_work.png | Bin 221 -> 0 bytes .../ic_configure_screen_dark.png | Bin 1309 -> 0 bytes OsmAnd/res/drawable-mdpi/ic_map.png | Bin 1266 -> 0 bytes .../drawable-mdpi/ic_navigation_drawer.png | Bin 1062 -> 0 bytes OsmAnd/res/drawable-mdpi/ic_plugin_srtm.png | Bin 1510 -> 0 bytes .../res/drawable-xhdpi/ic_action_bug_dark.png | Bin 1363 -> 0 bytes .../ic_action_compass_widget.png | Bin 802 -> 0 bytes .../ic_action_compass_widget_hide.png | Bin 834 -> 0 bytes .../ic_action_coordinates_latitude.png | Bin 1976 -> 0 bytes .../ic_action_coordinates_longitude.png | Bin 1962 -> 0 bytes .../ic_action_coordinates_widget.png | Bin 1130 -> 0 bytes OsmAnd/res/drawable-xhdpi/ic_action_copy.png | Bin 1243 -> 0 bytes .../drawable-xhdpi/ic_action_delete_dark.png | Bin 1175 -> 0 bytes .../drawable-xhdpi/ic_action_gprint_dark.png | Bin 1262 -> 0 bytes .../drawable-xhdpi/ic_action_gsave_dark.png | Bin 408 -> 0 bytes .../drawable-xhdpi/ic_action_gshare_dark.png | Bin 1649 -> 0 bytes .../drawable-xhdpi/ic_action_home_dark.png | Bin 1357 -> 0 bytes .../res/drawable-xhdpi/ic_action_import.png | Bin 1289 -> 0 bytes .../drawable-xhdpi/ic_action_info_dark.png | Bin 1584 -> 0 bytes .../drawable-xhdpi/ic_action_marker_dark.png | Bin 1663 -> 0 bytes .../drawable-xhdpi/ic_action_micro_dark.png | Bin 1482 -> 0 bytes .../drawable-xhdpi/ic_action_parking_dark.png | Bin 1353 -> 0 bytes .../drawable-xhdpi/ic_action_photo_dark.png | Bin 1525 -> 0 bytes .../ic_action_previous_route.png | Bin 570 -> 0 bytes OsmAnd/res/drawable-xhdpi/ic_action_ruler.png | Bin 1216 -> 0 bytes .../res/drawable-xhdpi/ic_action_settings.png | Bin 1746 -> 0 bytes .../res/drawable-xhdpi/ic_action_travel.png | Bin 1491 -> 0 bytes .../drawable-xhdpi/ic_action_video_dark.png | Bin 1292 -> 0 bytes OsmAnd/res/drawable-xhdpi/ic_action_work.png | Bin 261 -> 0 bytes .../ic_configure_screen_dark.png | Bin 1675 -> 0 bytes OsmAnd/res/drawable-xhdpi/ic_map.png | Bin 1506 -> 0 bytes .../drawable-xhdpi/ic_navigation_drawer.png | Bin 1095 -> 0 bytes OsmAnd/res/drawable-xhdpi/ic_plugin_srtm.png | Bin 2107 -> 0 bytes .../drawable-xxhdpi/ic_action_bug_dark.png | Bin 1649 -> 0 bytes .../ic_action_compass_widget.png | Bin 1229 -> 0 bytes .../ic_action_compass_widget_hide.png | Bin 1288 -> 0 bytes .../ic_action_coordinates_latitude.png | Bin 2448 -> 0 bytes .../ic_action_coordinates_longitude.png | Bin 2632 -> 0 bytes .../ic_action_coordinates_widget.png | Bin 1773 -> 0 bytes OsmAnd/res/drawable-xxhdpi/ic_action_copy.png | Bin 1374 -> 0 bytes .../drawable-xxhdpi/ic_action_delete_dark.png | Bin 1264 -> 0 bytes .../drawable-xxhdpi/ic_action_gprint_dark.png | Bin 1394 -> 0 bytes .../drawable-xxhdpi/ic_action_gsave_dark.png | Bin 593 -> 0 bytes .../drawable-xxhdpi/ic_action_gshare_dark.png | Bin 1975 -> 0 bytes .../drawable-xxhdpi/ic_action_home_dark.png | Bin 1502 -> 0 bytes .../res/drawable-xxhdpi/ic_action_import.png | Bin 1398 -> 0 bytes .../drawable-xxhdpi/ic_action_info_dark.png | Bin 1939 -> 0 bytes .../drawable-xxhdpi/ic_action_marker_dark.png | Bin 2078 -> 0 bytes .../drawable-xxhdpi/ic_action_micro_dark.png | Bin 1801 -> 0 bytes .../ic_action_parking_dark.png | Bin 1526 -> 0 bytes .../drawable-xxhdpi/ic_action_photo_dark.png | Bin 1912 -> 0 bytes .../ic_action_previous_route.png | Bin 786 -> 0 bytes .../res/drawable-xxhdpi/ic_action_ruler.png | Bin 1332 -> 0 bytes .../drawable-xxhdpi/ic_action_settings.png | Bin 2167 -> 0 bytes .../res/drawable-xxhdpi/ic_action_travel.png | Bin 1690 -> 0 bytes .../drawable-xxhdpi/ic_action_video_dark.png | Bin 1447 -> 0 bytes OsmAnd/res/drawable-xxhdpi/ic_action_work.png | Bin 335 -> 0 bytes .../ic_configure_screen_dark.png | Bin 2049 -> 0 bytes OsmAnd/res/drawable-xxhdpi/ic_map.png | Bin 1776 -> 0 bytes .../drawable-xxhdpi/ic_navigation_drawer.png | Bin 1157 -> 0 bytes OsmAnd/res/drawable-xxhdpi/ic_plugin_srtm.png | Bin 2797 -> 0 bytes .../ic_action_compass_widget.png | Bin 1638 -> 0 bytes .../ic_action_compass_widget_hide.png | Bin 1638 -> 0 bytes .../ic_action_coordinates_widget.png | Bin 2401 -> 0 bytes .../drawable-xxxhdpi/ic_action_gsave_dark.png | Bin 752 -> 0 bytes .../ic_action_previous_route.png | Bin 1143 -> 0 bytes .../res/drawable-xxxhdpi/ic_action_work.png | Bin 395 -> 0 bytes OsmAnd/res/drawable/ic_action_bug_dark.xml | 9 +++++ .../res/drawable/ic_action_compass_widget.xml | 13 +++++++ .../ic_action_compass_widget_hide.xml | 13 +++++++ .../ic_action_coordinates_latitude.xml | 10 ++++++ .../ic_action_coordinates_longitude.xml | 10 ++++++ .../drawable/ic_action_coordinates_widget.xml | 16 +++++++++ OsmAnd/res/drawable/ic_action_copy.xml | 13 +++++++ OsmAnd/res/drawable/ic_action_delete_dark.xml | 10 ++++++ OsmAnd/res/drawable/ic_action_gprint_dark.xml | 9 +++++ OsmAnd/res/drawable/ic_action_gsave_dark.xml | 9 +++++ OsmAnd/res/drawable/ic_action_gshare_dark.xml | 15 ++++++++ OsmAnd/res/drawable/ic_action_home_dark.xml | 17 +++++++++ OsmAnd/res/drawable/ic_action_import.xml | 10 ++++++ OsmAnd/res/drawable/ic_action_info_dark.xml | 10 ++++++ OsmAnd/res/drawable/ic_action_marker_dark.xml | 10 ++++++ OsmAnd/res/drawable/ic_action_micro_dark.xml | 10 ++++++ .../res/drawable/ic_action_parking_dark.xml | 10 ++++++ OsmAnd/res/drawable/ic_action_photo_dark.xml | 10 ++++++ .../res/drawable/ic_action_previous_route.xml | 29 +++++++++++++++ OsmAnd/res/drawable/ic_action_ruler.xml | 10 ++++++ OsmAnd/res/drawable/ic_action_settings.xml | 10 ++++++ OsmAnd/res/drawable/ic_action_travel.xml | 26 ++++++++++++++ OsmAnd/res/drawable/ic_action_video_dark.xml | 10 ++++++ OsmAnd/res/drawable/ic_action_work.xml | 34 ++++++++++++++++++ .../res/drawable/ic_configure_screen_dark.xml | 13 +++++++ OsmAnd/res/drawable/ic_map.xml | 9 +++++ OsmAnd/res/drawable/ic_navigation_drawer.xml | 15 ++++++++ OsmAnd/res/drawable/ic_plugin_srtm.xml | 15 ++++++++ 146 files changed, 375 insertions(+) delete mode 100644 OsmAnd/res/drawable-hdpi/ic_action_bug_dark.png delete mode 100644 OsmAnd/res/drawable-hdpi/ic_action_compass_widget.png delete mode 100644 OsmAnd/res/drawable-hdpi/ic_action_compass_widget_hide.png delete mode 100644 OsmAnd/res/drawable-hdpi/ic_action_coordinates_latitude.png delete mode 100644 OsmAnd/res/drawable-hdpi/ic_action_coordinates_longitude.png delete mode 100644 OsmAnd/res/drawable-hdpi/ic_action_coordinates_widget.png delete mode 100644 OsmAnd/res/drawable-hdpi/ic_action_copy.png delete mode 100644 OsmAnd/res/drawable-hdpi/ic_action_delete_dark.png delete mode 100644 OsmAnd/res/drawable-hdpi/ic_action_gprint_dark.png delete mode 100644 OsmAnd/res/drawable-hdpi/ic_action_gsave_dark.png delete mode 100644 OsmAnd/res/drawable-hdpi/ic_action_gshare_dark.png delete mode 100644 OsmAnd/res/drawable-hdpi/ic_action_home_dark.png delete mode 100644 OsmAnd/res/drawable-hdpi/ic_action_import.png delete mode 100644 OsmAnd/res/drawable-hdpi/ic_action_info_dark.png delete mode 100644 OsmAnd/res/drawable-hdpi/ic_action_marker_dark.png delete mode 100644 OsmAnd/res/drawable-hdpi/ic_action_micro_dark.png delete mode 100644 OsmAnd/res/drawable-hdpi/ic_action_parking_dark.png delete mode 100644 OsmAnd/res/drawable-hdpi/ic_action_photo_dark.png delete mode 100644 OsmAnd/res/drawable-hdpi/ic_action_previous_route.png delete mode 100644 OsmAnd/res/drawable-hdpi/ic_action_ruler.png delete mode 100644 OsmAnd/res/drawable-hdpi/ic_action_settings.png delete mode 100644 OsmAnd/res/drawable-hdpi/ic_action_travel.png delete mode 100644 OsmAnd/res/drawable-hdpi/ic_action_video_dark.png delete mode 100644 OsmAnd/res/drawable-hdpi/ic_action_work.png delete mode 100644 OsmAnd/res/drawable-hdpi/ic_configure_screen_dark.png delete mode 100644 OsmAnd/res/drawable-hdpi/ic_map.png delete mode 100644 OsmAnd/res/drawable-hdpi/ic_navigation_drawer.png delete mode 100644 OsmAnd/res/drawable-hdpi/ic_plugin_srtm.png delete mode 100644 OsmAnd/res/drawable-mdpi/ic_action_bug_dark.png delete mode 100644 OsmAnd/res/drawable-mdpi/ic_action_compass_widget.png delete mode 100644 OsmAnd/res/drawable-mdpi/ic_action_compass_widget_hide.png delete mode 100644 OsmAnd/res/drawable-mdpi/ic_action_coordinates_latitude.png delete mode 100644 OsmAnd/res/drawable-mdpi/ic_action_coordinates_longitude.png delete mode 100644 OsmAnd/res/drawable-mdpi/ic_action_coordinates_widget.png delete mode 100644 OsmAnd/res/drawable-mdpi/ic_action_copy.png delete mode 100644 OsmAnd/res/drawable-mdpi/ic_action_delete_dark.png delete mode 100644 OsmAnd/res/drawable-mdpi/ic_action_gprint_dark.png delete mode 100644 OsmAnd/res/drawable-mdpi/ic_action_gsave_dark.png delete mode 100644 OsmAnd/res/drawable-mdpi/ic_action_gshare_dark.png delete mode 100644 OsmAnd/res/drawable-mdpi/ic_action_home_dark.png delete mode 100644 OsmAnd/res/drawable-mdpi/ic_action_import.png delete mode 100644 OsmAnd/res/drawable-mdpi/ic_action_info_dark.png delete mode 100644 OsmAnd/res/drawable-mdpi/ic_action_marker_dark.png delete mode 100644 OsmAnd/res/drawable-mdpi/ic_action_micro_dark.png delete mode 100644 OsmAnd/res/drawable-mdpi/ic_action_parking_dark.png delete mode 100644 OsmAnd/res/drawable-mdpi/ic_action_photo_dark.png delete mode 100644 OsmAnd/res/drawable-mdpi/ic_action_previous_route.png delete mode 100644 OsmAnd/res/drawable-mdpi/ic_action_ruler.png delete mode 100644 OsmAnd/res/drawable-mdpi/ic_action_settings.png delete mode 100644 OsmAnd/res/drawable-mdpi/ic_action_travel.png delete mode 100644 OsmAnd/res/drawable-mdpi/ic_action_video_dark.png delete mode 100644 OsmAnd/res/drawable-mdpi/ic_action_work.png delete mode 100644 OsmAnd/res/drawable-mdpi/ic_configure_screen_dark.png delete mode 100644 OsmAnd/res/drawable-mdpi/ic_map.png delete mode 100644 OsmAnd/res/drawable-mdpi/ic_navigation_drawer.png delete mode 100644 OsmAnd/res/drawable-mdpi/ic_plugin_srtm.png delete mode 100644 OsmAnd/res/drawable-xhdpi/ic_action_bug_dark.png delete mode 100644 OsmAnd/res/drawable-xhdpi/ic_action_compass_widget.png delete mode 100644 OsmAnd/res/drawable-xhdpi/ic_action_compass_widget_hide.png delete mode 100644 OsmAnd/res/drawable-xhdpi/ic_action_coordinates_latitude.png delete mode 100644 OsmAnd/res/drawable-xhdpi/ic_action_coordinates_longitude.png delete mode 100644 OsmAnd/res/drawable-xhdpi/ic_action_coordinates_widget.png delete mode 100644 OsmAnd/res/drawable-xhdpi/ic_action_copy.png delete mode 100644 OsmAnd/res/drawable-xhdpi/ic_action_delete_dark.png delete mode 100644 OsmAnd/res/drawable-xhdpi/ic_action_gprint_dark.png delete mode 100644 OsmAnd/res/drawable-xhdpi/ic_action_gsave_dark.png delete mode 100644 OsmAnd/res/drawable-xhdpi/ic_action_gshare_dark.png delete mode 100644 OsmAnd/res/drawable-xhdpi/ic_action_home_dark.png delete mode 100644 OsmAnd/res/drawable-xhdpi/ic_action_import.png delete mode 100644 OsmAnd/res/drawable-xhdpi/ic_action_info_dark.png delete mode 100644 OsmAnd/res/drawable-xhdpi/ic_action_marker_dark.png delete mode 100644 OsmAnd/res/drawable-xhdpi/ic_action_micro_dark.png delete mode 100644 OsmAnd/res/drawable-xhdpi/ic_action_parking_dark.png delete mode 100644 OsmAnd/res/drawable-xhdpi/ic_action_photo_dark.png delete mode 100644 OsmAnd/res/drawable-xhdpi/ic_action_previous_route.png delete mode 100644 OsmAnd/res/drawable-xhdpi/ic_action_ruler.png delete mode 100644 OsmAnd/res/drawable-xhdpi/ic_action_settings.png delete mode 100644 OsmAnd/res/drawable-xhdpi/ic_action_travel.png delete mode 100644 OsmAnd/res/drawable-xhdpi/ic_action_video_dark.png delete mode 100644 OsmAnd/res/drawable-xhdpi/ic_action_work.png delete mode 100644 OsmAnd/res/drawable-xhdpi/ic_configure_screen_dark.png delete mode 100644 OsmAnd/res/drawable-xhdpi/ic_map.png delete mode 100644 OsmAnd/res/drawable-xhdpi/ic_navigation_drawer.png delete mode 100644 OsmAnd/res/drawable-xhdpi/ic_plugin_srtm.png delete mode 100644 OsmAnd/res/drawable-xxhdpi/ic_action_bug_dark.png delete mode 100644 OsmAnd/res/drawable-xxhdpi/ic_action_compass_widget.png delete mode 100644 OsmAnd/res/drawable-xxhdpi/ic_action_compass_widget_hide.png delete mode 100644 OsmAnd/res/drawable-xxhdpi/ic_action_coordinates_latitude.png delete mode 100644 OsmAnd/res/drawable-xxhdpi/ic_action_coordinates_longitude.png delete mode 100644 OsmAnd/res/drawable-xxhdpi/ic_action_coordinates_widget.png delete mode 100644 OsmAnd/res/drawable-xxhdpi/ic_action_copy.png delete mode 100644 OsmAnd/res/drawable-xxhdpi/ic_action_delete_dark.png delete mode 100644 OsmAnd/res/drawable-xxhdpi/ic_action_gprint_dark.png delete mode 100644 OsmAnd/res/drawable-xxhdpi/ic_action_gsave_dark.png delete mode 100644 OsmAnd/res/drawable-xxhdpi/ic_action_gshare_dark.png delete mode 100644 OsmAnd/res/drawable-xxhdpi/ic_action_home_dark.png delete mode 100644 OsmAnd/res/drawable-xxhdpi/ic_action_import.png delete mode 100644 OsmAnd/res/drawable-xxhdpi/ic_action_info_dark.png delete mode 100644 OsmAnd/res/drawable-xxhdpi/ic_action_marker_dark.png delete mode 100644 OsmAnd/res/drawable-xxhdpi/ic_action_micro_dark.png delete mode 100644 OsmAnd/res/drawable-xxhdpi/ic_action_parking_dark.png delete mode 100644 OsmAnd/res/drawable-xxhdpi/ic_action_photo_dark.png delete mode 100644 OsmAnd/res/drawable-xxhdpi/ic_action_previous_route.png delete mode 100644 OsmAnd/res/drawable-xxhdpi/ic_action_ruler.png delete mode 100644 OsmAnd/res/drawable-xxhdpi/ic_action_settings.png delete mode 100644 OsmAnd/res/drawable-xxhdpi/ic_action_travel.png delete mode 100644 OsmAnd/res/drawable-xxhdpi/ic_action_video_dark.png delete mode 100644 OsmAnd/res/drawable-xxhdpi/ic_action_work.png delete mode 100644 OsmAnd/res/drawable-xxhdpi/ic_configure_screen_dark.png delete mode 100644 OsmAnd/res/drawable-xxhdpi/ic_map.png delete mode 100644 OsmAnd/res/drawable-xxhdpi/ic_navigation_drawer.png delete mode 100644 OsmAnd/res/drawable-xxhdpi/ic_plugin_srtm.png delete mode 100644 OsmAnd/res/drawable-xxxhdpi/ic_action_compass_widget.png delete mode 100644 OsmAnd/res/drawable-xxxhdpi/ic_action_compass_widget_hide.png delete mode 100644 OsmAnd/res/drawable-xxxhdpi/ic_action_coordinates_widget.png delete mode 100644 OsmAnd/res/drawable-xxxhdpi/ic_action_gsave_dark.png delete mode 100644 OsmAnd/res/drawable-xxxhdpi/ic_action_previous_route.png delete mode 100644 OsmAnd/res/drawable-xxxhdpi/ic_action_work.png create mode 100644 OsmAnd/res/drawable/ic_action_bug_dark.xml create mode 100644 OsmAnd/res/drawable/ic_action_compass_widget.xml create mode 100644 OsmAnd/res/drawable/ic_action_compass_widget_hide.xml create mode 100644 OsmAnd/res/drawable/ic_action_coordinates_latitude.xml create mode 100644 OsmAnd/res/drawable/ic_action_coordinates_longitude.xml create mode 100644 OsmAnd/res/drawable/ic_action_coordinates_widget.xml create mode 100644 OsmAnd/res/drawable/ic_action_copy.xml create mode 100644 OsmAnd/res/drawable/ic_action_delete_dark.xml create mode 100644 OsmAnd/res/drawable/ic_action_gprint_dark.xml create mode 100644 OsmAnd/res/drawable/ic_action_gsave_dark.xml create mode 100644 OsmAnd/res/drawable/ic_action_gshare_dark.xml create mode 100644 OsmAnd/res/drawable/ic_action_home_dark.xml create mode 100644 OsmAnd/res/drawable/ic_action_import.xml create mode 100644 OsmAnd/res/drawable/ic_action_info_dark.xml create mode 100644 OsmAnd/res/drawable/ic_action_marker_dark.xml create mode 100644 OsmAnd/res/drawable/ic_action_micro_dark.xml create mode 100644 OsmAnd/res/drawable/ic_action_parking_dark.xml create mode 100644 OsmAnd/res/drawable/ic_action_photo_dark.xml create mode 100644 OsmAnd/res/drawable/ic_action_previous_route.xml create mode 100644 OsmAnd/res/drawable/ic_action_ruler.xml create mode 100644 OsmAnd/res/drawable/ic_action_settings.xml create mode 100644 OsmAnd/res/drawable/ic_action_travel.xml create mode 100644 OsmAnd/res/drawable/ic_action_video_dark.xml create mode 100644 OsmAnd/res/drawable/ic_action_work.xml create mode 100644 OsmAnd/res/drawable/ic_configure_screen_dark.xml create mode 100644 OsmAnd/res/drawable/ic_map.xml create mode 100644 OsmAnd/res/drawable/ic_navigation_drawer.xml create mode 100644 OsmAnd/res/drawable/ic_plugin_srtm.xml diff --git a/OsmAnd/res/drawable-hdpi/ic_action_bug_dark.png b/OsmAnd/res/drawable-hdpi/ic_action_bug_dark.png deleted file mode 100644 index 01afb085fd3d09c4f543f9fe4ff142b202655658..0000000000000000000000000000000000000000 G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ao*kwqsWBRh%G$3V6T<&=Sq1Bz4lriHug1q$2M{p32e7Dge=5f zH&a(nVRs9gbpus=pYfH7p7RJEhsfO5^H!Q^Xj>mGe z|BoBy84D?E4GI8}^K0q@NHtA-8Aya|yi-T;#|9=x0h~bH&{3x-KQ{b8U4p2=JDU#< d7kJ=5;}_E=J@>FZm$?7{002ovPDHLkV1kg_3$6eF diff --git a/OsmAnd/res/drawable-hdpi/ic_action_compass_widget_hide.png b/OsmAnd/res/drawable-hdpi/ic_action_compass_widget_hide.png deleted file mode 100644 index 150ec6b547935fc8951346622309c2488b50eb51..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 623 zcmV-#0+9WQP)!>Pe6) zVoPN=UT?y{)K0XNprqANad;|zaAPnQ=Z%!0A%U68F^CYA(F=)jQLUKsiC8!#BBCoxLNaK78D zw(Ufiip1zs92|9k=Uw^?7!AwnxKt-vrDKNyb;?6KC=+Ml4Mt=PK2?LCl8nR zgAfzV<(FXUOc38jwAw3#sv|c38sXc23+q1{I-E0yKwkPQ`UV(?&0%2N=NkY3002ov JPDHLkV1o9|3?Kji diff --git a/OsmAnd/res/drawable-hdpi/ic_action_coordinates_latitude.png b/OsmAnd/res/drawable-hdpi/ic_action_coordinates_latitude.png deleted file mode 100644 index 15fb01c0b4001bc6ea46efd9a4f3800e6f0902bc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1605 zcmbVMX;2eq7+x!fT+T367>&wybrg@y?&i)yfRLjJm>2CiRDUyq%fG2 zD8w)&l2EYCZWF;02T7s|yNIx(R9NR#e6>!k*2?rsiCQhgFr7@H*DLfgtv*|)QDkf6 z`Y_k%_Hu;VPK9mLyzODG;|pqK<2 z=9B+7ehBXr5-OJe6i;}IugK8!Wh?NDm(4`E`3_?FRuODGYXN{a_~@w%{I@%+F6Ro= zV}cF!^~nble{T&~oLDmQ)qejxb!WT3@ws|o&7_Xj+(fMT`I!_@>7U;C@Ye3K14)NI z$sMJZ>*T0;4c2TF2i`euPSPDWc1-v6D^b3EO@E< zafPUAga(Y9R3W<(y|(>$-NS`}ee<%;*4M<4>4q)e4iqoAnmRb}B_EPD( zO$+lHV~LUD^CRx}SL%NDqOD6##+b7bo<;|M5m+M`b>@c?(1Xs6JEEpIv^sXth+Xlv z%TV>Ia(Q6aySwLc4Rew$=GGm)32SPmZY%#G$9(TbUs~IHH)B_>4irGHW1ek&v>?6@c-$vGI#1WxrjD=vh3tD6+2q z)BI__-Z+%g)!sAn3U~eVjdOHLBkGuy^xf<;XZuCYKl&3+-ufwW&eo={FVuF#9UpP^ z@8IdtSI*bI)l&PVyzS=I?u*~=eQI?KVAO(@#ku!_M|+-C(*s0)U~xrUcW{5!@;axZ zW!sT8__iaJb91dtQ0B}H?^rhNsV&^Zl*K=Yin(^N%i%tE+zo&b?iKBIS`#uy*hHwdTKe_(kgdpLV(#Xn?0T(STF diff --git a/OsmAnd/res/drawable-hdpi/ic_action_coordinates_longitude.png b/OsmAnd/res/drawable-hdpi/ic_action_coordinates_longitude.png deleted file mode 100644 index 8901c389b92f2586a533992fffb3fc2c92ed20fa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1678 zcmbVNdrT8|9IsNfAPA`QJ$F__w%OiY+beCMK%ZD$3)H%zn{(H@11hvvdxtGV93qMj zVyX@Wh7se2F7ttpC^`eUO>xYiaZV>u3L^t_8oMzC0^+Vn-TpBCu}kiLukYvc{rtX< z+_qFha#+Z$5EhFSrdzBwGGmng<&0;(9jx+lW|&E9(&=Sn2JJ$f1WSRF76Q=O&`iQe zpm^TeABlJtD`=h7luoDXKagRhjgR_m_->nnL9&I=9Y6ucxBAozYTJM z5feIF&V4B=U7rf5NGAaxd@&D$VHk*&@?k_G6d;QL0R$r;Bn4rJ2f;EJk_jMS^x-nz zoOp)JsMe19Vpei)7EL>3An04}mtD|6U{36m2B_mGN3@ z%9Q6IKqEnsxlWA9N5=dBn2Ft+9r+CzHL?_^l}QSkqb9Lj8)2t)YB`rV;p0|ZCJ@F- zQJjEzxJV-85dsmxvtSkhPn3b}Lng+&U57=|@siB>Doiq%@B zMkP_IVzmLR&Q8&&9U}t1t&HzcEc8aKOywj{nsk~-GAB?4saYgVQdy(}P^m_;4#b$P zcARuk@A}j9^44m?X}?bht5t=q0RV0m!OCw2R_P9GjS>uLIvD_K!PL0|25v?qll zyY{qe_({r`D4;wwDmvO7vH7X~uiNYETOPGM5=VxC12@UGYZv=$adEvh8zR_kX{V;N zMV@}4OpQYeeO0wd9QL$2vasnw#Y)xQtC7vc`y1O5daJ5zb3cMN6+Z^f+o;l8MXemH zl09MQ{NV=^3lfn6Y>sdjfUGsL?*X?C7MS3ZwH zGlRuu%e5olRPW~aN*!CKTl*-41I?Ap!6 zXTO(zmhFkl-Q~%wR~&&F#$h#i$vf{;!OOGydb`<8&m?B}VNauBL6>JB%-29kI2jvD z;7J{dvimzH({J~O`V8$$ClyT#gEK;`*uuI%2!X#@&?cBI$Xzl zzA$*ua%?DaihI0esBlJ)x4Yc%d&!G)4-cMbydLBYYU_wdoH#VwcX3|ko@$wIZu^1I z?0GHxG2XEoE_+VvZcJz|Xf%f@JC8Pb`lEdVF$$!8LC=Ap&n_teM4k8$4o?+zWh)79gUetgF`=Xka*+`MW4Zb=ygGy{Knu+kmm!hJPKamoFb71g<_ zjWu0W3*sX?$FExYYnncIkkg86SYvJO)2@#Lf8JZ0rWp=7Q-T!TICry|oA?;%ss7~- zke8P8WnGMTWp3K%q!&Axa``U*`pNnwgTce^tm%I5#MP!9@k>l&`u4ioD`S@b_S5#x h#G}KAqJcewb$fgG-LR{-zxMwjbQ**DxboAYe*mUOeaQd- diff --git a/OsmAnd/res/drawable-hdpi/ic_action_coordinates_widget.png b/OsmAnd/res/drawable-hdpi/ic_action_coordinates_widget.png deleted file mode 100644 index c1ba05be3bea2e760aff64cf6e5427a378656a3a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 878 zcmV-!1CjiRP)GLE42}AG?&gUX)Hu^ zqlL)u>!@eiS{}caBdD&v(`O0}4JSZL+v8AnjBnk^QsNOR zSSc&UT?^}h*>}Oq;4O#J_Q;)#`rAy2=(;=pf=APB%FY(S02C4D@w@=uFy9>lL$f?# z?3?g^iRW{PMcMfkQFeB%Xxm>D4o1li?FzaNzEd%RtLD?E;CJ%lAb3UXpWqX<-+*7i zRehI(^fV68VeYu#h*>gXet<`fm?P%XPvA4~8@NrQIIg?|9#e6LRs0$K=9iA0pZZ%~ zL6ltuIX)O$27V7N>iY}K>K=^&CU*{xC4K!&*-xC~HF#F-B`fHF6X&9_KdO*T@D62b zAjg0v|2(maydj}46xPpepe!%lC8z?(?@#qA`EC?DHI|5VQt!HfCDVmJP#?>pO z3A^X?^@9<(cnMnAOLbx;$l1l3qr>5PYTf$PoFEB}rZa@RR2@)p$4T~Np(f-k*Z{5v zOI!)K?HCS*W`8chslM z0r>}&|7=ikQspI-6?C$T?4Jz-unWrR+qd=dKK@Jm2EJ*(U|fg7I{*Lx07*qoM6N<$ Ef|mQ0?*IS* diff --git a/OsmAnd/res/drawable-hdpi/ic_action_copy.png b/OsmAnd/res/drawable-hdpi/ic_action_copy.png deleted file mode 100644 index c62cd30a9a486492204802f92ebfd9bbc3e710f7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1186 zcmaJ>TWB0r7#@vCDW--}N-845q{Y~D?zcT-)@=4>R@@jis}0oKnK@^ZA(=~O&Sp2E zYAmJJ2c=NactNbtLa9hg^CE(^pbynNh*qmD2qKDtDA-sqf_P@L8~YGCFmuj-&j0=Y z_uuBlvC#*+H{Z3HVVLgHNWMbXoyoiDcKZE+SzM&c4pNvP<3WuyV1$`r6xf(8d2kX} zFhq0vFXBOl={n?AC&)zkVao|T0VX;^(+eq@VFrhqA#|oOVQoC=`f2Wu56^R~i_+X) zy)2c(9G-GV<|8~lKU#I>ryYQ}p$FK(rbP{Sm_WAa&G@m^Omi)}7TqVuBFDB=$aI=p zBQ;STV{<`-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hZYP}DkzAh(u0RqQbYr-9%@?AEj|w-3?pI&<DQZA?GC0$QRMX`@9`w;=YgZjQ*>br*( zAB!~$Ap!)4HH>HbT`FAu!Tam>g@BAt`Bi5dLb^;M${Gx-PaK;h1g@ec{bgx zIH(OnRz;haL|Nsbs5m@mK!s0g4b6c`U5AFw_3-eK{B86pJ)v;~eL5y^92Lk8;BAxw zyd)uow`EP{Z3#h1fsW(=zzLM15Vy`Ft<*oF{TXjJ2ZIWmqlJ7rPaz$ghaasRr$cwC zY~^b0n}7cF<#0zFd3!yXcc&JQU)nv@`Jj4kaJ2JWed)=j8{GY5|1rkczc!IRwEE1_ z@Ywbpzh3-{e7eqT`^~<3+kR>!%M1*TWKU&_-`@Ia+czgpgOz`G|Fdg!`NGc+{{Hcg zqu1x{?6uAwPVAih_wKlmpz?{FoeCY6r!kPFF NQZ9~LXY;SV`5#v$krDs^ diff --git a/OsmAnd/res/drawable-hdpi/ic_action_info_dark.png b/OsmAnd/res/drawable-hdpi/ic_action_info_dark.png deleted file mode 100644 index cf6c396f6beb2a76d7cff48969fcde7cd3236ab7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1450 zcmaJ>eNYr-7{34!71S}35@~i;G)?#RfLgTjU_c zkzop*temF2%pA(mkWq3Fa!L!B8XaUJ&B;ci2GhP2Gs_swk?B3)$Uhi&X7_!c_kDiP z^LxH_dvRfI((FaEO(s)P-Wsw$P${oz&_PK zF{&Ks1gWxuV#KBD0I`}GOe9Dev9V^-%Gg-jDujYEPS|mZzzCMJS~!A2CLa`f(~d_f|3KRGz^Wy@w&P?bDhPk>J>Q2vMf$eI7MMl0}IwG1|Pzd;F72XHwcQltQoSZ zAQ6kapw=1=6f&I%A)pl$Oc_>!lZk>U!$Z7=lV$=B1R`;bYX=Q4_@BnK+Cg8v25>J3 zs)~G#1;gAu+)+dkvf+w!85V`FcB^7-04PSD+kwIxvm{F#ZIvWJU>J;I7#d>< zn#EXFqA&)Kz$ywf@C#DZ&UAPu>vGXl4&`PoPLlM{*(7QAP&ur}X`va`PDinMO3>gH z5k!5<(Dx*kd?=Q4>3}y>-KVP6(Jm;iR1Gy)scMMJHC}aOd8w>OYF%(eq)Zc0yMZom z0#c5y29WVQbMiDC7>1x&%En?0D>4`%(0)uHcmZQ+LKLl(-EQ++&`G@XK>jBB6rR91 zv?v{phZvp`c}xH{9wSLWV*Mmh zznDhrEI-lF_2 zCzWb>e)r5&BP(a`bzs7rjc!oG<1ft` z+0nRWb>|H2qne_-Kj0ld?ZJ;G?DL^rKM#L%b?o>$^h^Ac6r%m|Phg10osYe<;O_nNt@gR2 z)_C{1-q16RhZA?q@_fzVcM a!gAC8jx*%_=3_+U@0sT*ba!NzH~k0O77Qr> diff --git a/OsmAnd/res/drawable-hdpi/ic_action_marker_dark.png b/OsmAnd/res/drawable-hdpi/ic_action_marker_dark.png deleted file mode 100644 index 988e4cf5717cc36126c51f0e7f9f9f2d44f6d68c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1467 zcmeAS@N?(olHy`uVBq!ia0vp^Dj>|k1|%Oc%$NbBBuiW)N`mv#O3D+9QW+dm@{>{( zJaZG%Q-e|yQz{EjrrIztFqdV9M3hAM`dB6B=jtVb)aX^@765fKFxc2v6eK2Rr0UTq__OB&@Hb09I0xZL0)vRD^GUf^&XRs)DJWnQpRyp^1XIrJkXw znYpF8j)D=8uWw+XZ)BirU}bTTwEb~Up!F*bH~gX#6mD=taQOHPH^oe8uXs@D{+UMuIK)WnkfqLBRj99Sv{ z$jC3rFV4s>P;hnz$GU<>cxGNoetEGbD4HO?c1bPDEK5ysE6UGR0Ee?xCKflO8l@SV z8zq|RCZ(99=$aXur0OOn8Yk&mrlc7grde288YU(yLG`DQ8-DsgN9ltS3sT~N2?0|i zhzZXMKn^@JrRD*1P!TYz)O~f9W?*2v?djqeQgQ3e3~O&@M}gzT`wSGiRB(;dc9pcgE6CsrZP9jO;%QVqq(ifr8|wCK_13v2#2YN|Z>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smAnd/res/drawable-hdpi/ic_action_photo_dark.png b/OsmAnd/res/drawable-hdpi/ic_action_photo_dark.png deleted file mode 100644 index 028221e52ca88a95fe59b8c7741a2202b21f13b7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1350 zcmbVMZ%i9y7{6^42?pb`vB}Wnc5G2MuJ?!b=p8M!w6GP|N=g%mjLG%xExo|qmAiu$ zCQcwk_rYY#j9V~Hwu!(5X0o`%EK|vpK&F8yQCUntLvT*#HX{yD6W;Y-*B%l}4rS04J!jnNMKMaXAXv2x51}qr6ZD3^W94CB=c=x%@GP zN}>a+u=+?})D0ri{uT|CxA=oXOP#=qn6nVI$2q7#1_qDD<$6Wu;tp(CF9-LDV**2$ zAx518TXCw=SBAP(4WL#tg9{{OLGxKNWo7c&{9KfVGC|r1n#4(#v*vLmjjlczw5Ew+ zF5oFywFM;y7BP${M-Z`C%pA)zt6D8Vu`ElFG(poiMBsX}V(@WX(Q}d-JU|yTDQZZn zf+jTbA+^zPV9?W*5ag)Ox29OpR}%$OM#T9jL77QHmJ@L;qje(y{&izrv>t4Z0wMr( zwNVpbJ;FIjGR)nB4JClk8}2zxf<@u$J*v=tKsY2O^{mHd7#HQHY^;qYT@+PpaakCa&0{=8CA6!Up)Eh#jmK8`;{VMb0i7Ze z&GMh-NglzDOl;Ri0Sarw1Qa+y8XT2}vno0eWJB2NaRuWyemVJte>~A1xftO{;suxX?X+K=XBt)K$F$wmHU5HiiA%lP3;W zJzCm7PM$*~KXksMcH-hf%j|oH2M_(~KK z{j`vBqv!TDW$El<>f?X^Fx7tW=h^XN^7Pkp&yHLa|8n{NESF!p8Xw9!a;)`cX4<*P zwXUg&zU^1gBX?UPfu7dB$!!OBys#(lqt8u?XH%B0XFt}qrR-dT=YIA4olDM9iOA_Z zJ|sI|+j?{CgWK6Nn@68zSGW{ALT@m0vT_4>f+y%X5JvYRjKR(>}?nCwI!H#7SG= zK%8?e$C{&e|2%W7P#PX|$uYQTq_#vUW@M~Xi`>YPcmtCzpG4=^kQ?ojkuFdtQ}2-* zZwA^xy|p)BPZp?*Lxi48-UaFpCVxS0ydL@OBh%DtueL&Nbl}0wGoTc%wu8}#$(dx2 zfnJw1|ABa>78*pt{c^{bd;R&^G|d|#xIjFY9M>j~B9+h${${%xp<9zjk#dHFD@2k) zNF+v~s+P>5A|csjRW}AC diff --git a/OsmAnd/res/drawable-hdpi/ic_action_ruler.png b/OsmAnd/res/drawable-hdpi/ic_action_ruler.png deleted file mode 100644 index 947cbef786d79cb2a4191d4956e1c035ad6c9abf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1157 zcmaJ>%WD)#81JBnW>-`Y!DV5Kb`P%D&*{fhlip-zdXfw}F-!)MJt$Up*Cf4@?rOU$ z&LpQr#AVUT9&|i-Q1B8#5d=L5ig@zz4=4z_BI>f@i}kdJt)9$855b1+s`~2tec$hU z^&gWHW19!R8{{}{b7kDAvGvF7-ME2$pK)i;vSlYN&(JB-pe>YOuHX|FgGz{IaSbDX z@yIzWmL}@nQqzMzKm0QoYFo@eh$#Z?a6U?{w#|3#T5O+*B_4EDXw&9bNX=9y zL5U<7=%OKbvZ4VKii&QS(A*1Dc9!J4q{@N}Ej?$+D(F2t^OpDxtLBXMe6f?w&rup% zlGJLo#8yru$*iP62qjsSR8?RaLb@1H)E1(2SKoqzQ!fc(8juKN7LiL9sLeB`DQ_AoNwizzWtqSHlh0@7q}m z4+}-z)C#7VFPe%{){B~6glZvQD32CQ-GqH?B}yrZJlyvkFyB3_@l~u=#C zu4$%#aw--O@;q5)GF8j*J-q)#{#N>wNmv|lpN{1kDpI_>F8DBq1VzCtrBGLe22vFt z8VH-n!&te*@p1 z(A_PQ(i7$Flcigq2Akh(xjWUVfB4})PwX_1}?O%jFwa{vJC$@TxWP@udCU8?J3Qf8^4sgK7Bw zm*;A6_W9HAUko{yF8*~t-TE?JKKFaPJg^>c1LJRY9Ohm>*mv|q@zCz<$51IxI9G~? GkNpo=X?foO diff --git a/OsmAnd/res/drawable-hdpi/ic_action_settings.png b/OsmAnd/res/drawable-hdpi/ic_action_settings.png deleted file mode 100644 index 9f462386e1c026be8faa708a44019ba00734de3e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1546 zcmbVMdrT8|96z0?t4L;)A!f4kK;mQ9d$d=22L)@d)jEp20(H@)_xJ$?dRMOpEfuw( zGrpF=rVC{F-eyb;K^$|7&L?g|r;<1{I``5{GsVc_d~BI+SD)&K@c?2xsWZ?*0kt5eysNW8ER?KmSolLR*U2^HOMIdvWhYfV5g5O z2ZewW>z4O`EC_m`)?4gW-L70lkbQbCs-qA2{2Cg9vT{OxPN)JZ%!6{TWI^s7K8CC{qTV@fu8OGKQNm5=U{Gp$rU8!ov@uc~itP zrjT_E`_d!}QlYAT2E&5Epgw5O%St&$&@_$VBu0{`rhx|PB$W%HQXn;Efdv6U@%mM- zEWuHW952_X7DQt@6oSw1ay>IF1%?x)r3?#kevHuLn9moDYfw9&7J`3ijHn$buJZ$| z5Cr5JMbPR|mKpuOV8$t-j1YMg=XijUWm^1Z1E5hON#VGGGK(2Ni+>0&{@?sz z8YwK=EdObq*pb$e(e1NQ(1d5h1SD;O6m3-YymKN4f=17Avex3z)&7>VbJ>DdzFKxM zjjBs*{%~#6xrOYRGpPmp6Elm_3Qe8O+xVFWkqHxid9`Wlf+e0cZzY5EX|o+YRmRJY zF16-f{$pF-NQO>AS}A zQTg+6y0({#XSZHZ-pJo4X5T*)=k<(Hm7}E-D$|bMF&`F>T+i-(y`9vhT8}*iNuJSL z*4SU_>+2sC4`D6iI8(}~z9Y9P*^kac)+Sk4Cl8R#Vep=56R|&0UA<}Y`Gl}aZz{o)bvX~M$&(n)_N-WB-gxqC(l2b+U2;! zEN%3Z9GJ^zeOHO?>2!5D5+~g_R5FHYOyS#?737a2vb)3E6zqOOsde4jDV^W6_ z-?1flwlQ3CU{!S_zM;is&sovAQ(sg+9o>IAJ~F>{DUrSMr}4(Qf7UfW=+xcpy*m%v z)EM@|y4%n|rrP7)m}I+~-=9^lQ+!kIe|_>s-psqF`g5lo9Pbu@hdMFtUPRv!zy11` zd(ZLW0(X)dx&dD>mjAxX;Cy&(jXv*T^32n6Ua;@Y^pn`6Po&fL7PnhR_0;$Nx}r6= wcf-ZTge%`~pHq9dq^-+UbXd4_O&JJ=B2T2|^PMG&McT+cVcwc375?t|Z($nY>+9EpGp*2|!Do}tWpjo9|HMy)GThPnFy)7m% zbOBuk|ih_Cn=6(Ig+gCn zQi5ybLwQ^9(4$z+@vw^K8c1jVu}LAnT+3x^2Y>{Klwi>qc;K?4s=(U5gZ z)>PEiD8#k2<;S3>iyvrDI>CiPEbygP!v0^1+-~3f`8pu7Hu|n>VRkj zrj|BDSdTPuvA4(u3vs(*MmM0i7c3 zcKJ{H6hyEm?d{Sqz{Aow0Ts@W0f%K+{q{P7+_O8(2b#0r{4~6M&%J^2zMoN%RIOz6 zh;nE)x@Pw3``Mx|ADqYxeKApA|9wSiMbh`(inD({x~+2Nu|LMjn>;?LJoboVL06 zgC5V|&cN!9->%AK*DgI?&nF0db>-;gxMNkdS#jt2qs3QtkG%BjP1$|r(&#uk-!{A< z(DK^r#^vhuo#!5U^~bmM!FjdU@j%?uQhJ*!pLy5MeRZyQUxV+5$@KAy{`s*RWBYR3 zV-yH>blgMm8q4X^Vff$exvGq@9CpwI;Nh;ecn4+|AaQ(NW%t@Y=QumEKJo?EhJ~F3OK@Y3=<7lWEbW diff --git a/OsmAnd/res/drawable-hdpi/ic_action_video_dark.png b/OsmAnd/res/drawable-hdpi/ic_action_video_dark.png deleted file mode 100644 index eca1da7c4f0b7712c13d2e8f8057aec9b2e6f03c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1206 zcmbVMPi)&%7ViOUYC3<07Du`yH$X*+;~5aNIsmr=0`FfQyc{z%-I#&en!4%H4=vfumO z`+nc|`~LZr>8Xj>@uA}sMa4>!YK5$)qj#{Me1D?OpC`*BxHyMryc%xmKBC4g&p@E$ z=nJTVbZhn8*JzBQdROe~9G)vbtC*gX)FYi_=rjnLqQ-JzLpK)@1_oNN-7Njv)z4^P zTUmNmDs$yV0oCovH6P8aO;ydcMH5I>rr!Wt+`rvYASH{sPNG2w6^G1%V+NOt9)=J!IVARM&!v0@Jq}*!ElyS=0@0 z8E0w2^dJPMQ7#`Ec7sl$NXpnyZ?JrlV;v`otF0a23i_AEk=j9ZwSm|Q3cO|CB=xAB z>Viq`?(Ha2By5!De47+SUs64D*+DKYsacxbBrV%gM9H!YLzWpqmPH0~B4i-61V%WWiq^`@qAItk3*@*Wr|RP#e!BWbg?Bjz`ARqu5X+8?qJjR z#3}_J>DcqDp10KPg6X=4y`b(jK%vmCI(TB%b}g?NJQ{pR{@uqNepZq{GMCvJ@VxiOTF v{oeQD$l2K5ck*9t%C|0@9eBHEo$95YA8XDm?B4fL^d~75r__u2`Hg=7vX+PX diff --git a/OsmAnd/res/drawable-hdpi/ic_action_work.png b/OsmAnd/res/drawable-hdpi/ic_action_work.png deleted file mode 100644 index 372258dc20520d9c10ebd446beec9a058871f2ae..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 238 zcmeAS@N?(olHy`uVBq!ia0vp^Dj>|k1|%Oc%$NbBI14-?iy0WWg+Z8+Vb&Z8pde#$ zkh>GZx^prwfgF}}M_)$E)e-c@N{AN!V$B+ufx7WS74k+-nJdCK?C$~*JXR~0M zu$y7ishZVxj=zMLq-~nnq&|Oh%F(Yj^*58IMPHD;`{M7F43)i;45I`#pP!;QM{3T# z7r!`ElV?qGwcKQ+sG7XYf2RE>sfX+BzDAs!@iMs0GGI#3Nr|_qJ>QJnPR=lhyp~^j gI<9SsPv2+eDUAmFFOGkB1auCAr>mdKI;Vst08!Cbr2qf` diff --git a/OsmAnd/res/drawable-hdpi/ic_configure_screen_dark.png b/OsmAnd/res/drawable-hdpi/ic_configure_screen_dark.png deleted file mode 100644 index 330da77fbd2f7b1358f479e15b2612971ef1cbc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And/res/drawable-hdpi/ic_map.png b/OsmAnd/res/drawable-hdpi/ic_map.png deleted file mode 100644 index 66407962a2cec360550144d7b076c7a05f6b8f9f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1383 zcmaJ>du$VR9KX2%1HwXhWDePO9L|7xz25bD?VT%o^jfIUt#)-=2qC-P{kk4o@4D-i zwo{@5UGRaApkZb>L3EC}h%+%v9!`S1j3$7Q1>=J;6CsQYA!8&i#NTb}R=Rh%nWWFK?YV}(022NBXCc)4#B_mOYMv&r?WK<9vfQ|-1y{tH}k)!<> zDoYNm#_BbDqfQW(*EMUPs<|Q{HaCc@gq5s8i<2BQ5COV?CL@hXj7vJO3A-Fz8^;8O zPN?V&4s4QCt=ES-RSlq46N8Ipl16Q;iL^2{*7h_?!98KN6O?7T99US_qZ~mb5(!hnVp6qwf@E2iFjE9Y;ZOsQr4(IA;!12~+5!(^q9#Xm zSyfQOq7YQ$x&wnuCqsxtz20fVN^B}oFl9tih!Uj9Ohh6^Toc+c-4Fh!F{5@YkctAr z4`OOu6Jb371xKx~fK2BsCFRZIo#;Y946v zRv@`GHG)p$nUiPWU=IPig=Va{#ZCg8rRg9p2-YA@14*PTtS!g{DQpTaJ&?c2K7}VR zj%b<=Cs3?tVJs3Z*cl5>k^rVOBmi8n0+D2`A)2z07y&5~M(aG#O6eompT=@}FyLl- zw15KVNrQuv*&TTqK{8SvzATXZb$Fm;{mIhhr~m29dF!hG)9kOazs;%{IAXW2ieJdx z*M6n&+P)EIw0q~qg}M3pOFr3wz{k3=)5Xs$UU;S+JF4vF3z5dKs>lYS%qs^DI-wQhupKWc~gyx=|r5U2D z@{yZjb;0TTdSl^v?oP|H?!MAzu4it%SUQ+G*|O>QkD~L?AgnY&HwPmo)cj2nc>ZY2iND}*Id6W=_)$a4T$W=bH0}kxb-wXNfpA>%cwZ*XMCn K@L!bIZT}B5-0d3x diff --git a/OsmAnd/res/drawable-hdpi/ic_navigation_drawer.png b/OsmAnd/res/drawable-hdpi/ic_navigation_drawer.png deleted file mode 100644 index e99ca193e62e46471e5a5db66f373cd17dd3ca11..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1080 zcmaJ=y>HV%6nBKwqJGg8Cd=&rh>JhskDS#|wMp6pH6==;HX~>I(pas1#=a7_6GBLc zKcJ!=87d?O21XcQU;!2+V1bDZsYr;q2skHk=}^^@eZIT*e($~Cd%uVE<;C%lOCub| zjaMtB23x0-_xuq1e&hD`*m9AUTXcoAX%~fCyUiAD z)s{?~cv+O#WMeO2-W)eG8wbeVz?8S}y6YE&pD$ktyz3N%HLWJqf+Fs?m7Nf;>?}9! zoedj0!t8Z^CN>#>hbiJ?Z_|&=xFGa!P4=H0ivr&>p&JFEpH!<>=Zhr7yq490Ey*fx zz^tt41~jhm3fqfPUQ{F?K~u|_lEM!jfkg|Qw%I5x3}UfeLFiB#n4;M2cC+1FmW1n~ z3?URHMN|~PEI_pFQxpR~no1E$II=@Gpf2(G1QA(eixvcyX}<(7sMU^v{b)cGqfCrZ zAj(-u^t`05o^?bU_Idcd)Y%5|8ikY`Ul9U`PmK2iibVa}a24)dt8y3Xm;bV;r;* zl=H&C-#Niwe@@v6t0PF$F_8l8oSt(4%Ii5G%a~ExMi?Ls+cIS6iXjUkOHoWl=fo(b zM{GWm-(z90&9Stw&-4^B;e2{iyud_vqgtA4#$SGXmPa^#?A+_s-+vz+4%4fZ2k*aA zwetL_)mR-Hova&2zy2H@9=v<8doY^GWcDX^_a~SvJ|c5zc=7{Syqn>|c&Iu3^~vKz O%hmF7>Dm0Pd;b95@KoUd diff --git a/OsmAnd/res/drawable-hdpi/ic_plugin_srtm.png b/OsmAnd/res/drawable-hdpi/ic_plugin_srtm.png deleted file mode 100644 index 170aefa1c5c5d0f9c1692fa7c4cb70fe94175519..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1785 zcmaJ?X;2eq7!FoMVi;!_%YavxC>F%cW;dIJtOkSxFeryftkglr&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Y!>?t@DA{G-sf<`(gdvx6z9~EsG3NHfse)m^iOwEY_^It P00000NkvXXu0mjfX$Y|U diff --git a/OsmAnd/res/drawable-mdpi/ic_action_compass_widget_hide.png b/OsmAnd/res/drawable-mdpi/ic_action_compass_widget_hide.png deleted file mode 100644 index 7b0315f985440a2c821c474d6fa14fd7244c3f0b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 437 zcmV;m0ZRUfP) z!!QhWh9D3O!4NVAfnWv;gOx$Yq+?(R9Rqg=G6tHxKHoH*WVidQ?sU4!($kY{rOrLH z5Yb$8D|#xL=~vG1MG^0drfP2iUyJTEmRt(~Jj0hp;710K&_zJO3bFt+v$&lV^gZxb zmar*ZMd3S$ZhQ|sGVtIABF54OM?wqUl(ROj#`tdV#y%V8{7%RMN8wciI3Xbp3XnB( z*44Y~jA!W-I9uR|3FZ_;V(gq-;D7d}`JWWBbI~u6?2EbJXSL7MG+jn{l3_;iAi?Rz z*Fx6?{28Uz!3XRjnAf%U9p+p-?59?JL-lkobB594qjos6OFI4o{Kb4hENG>{YccWy zBNuyto;qJex^DZbFmE}B5x6=QjBkN|2jhBYiFNzt25lw-oEO$)C+*u~bdX5jQ2Cdc f;j3ND?xE!yE(Ap4vo#dW00000NkvXXu0mjfiHo*U diff --git a/OsmAnd/res/drawable-mdpi/ic_action_coordinates_latitude.png b/OsmAnd/res/drawable-mdpi/ic_action_coordinates_latitude.png deleted file mode 100644 index 825ef20d31efec34f17cfc369359b356360088ba..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1378 zcmbVMTTC2P7#@l(T@>vFENG3xphmQ_bKBbttlMQ5$`Y5Z+f5*mP-bV&!pP3dc4lA~ zw2?x+&*0vQ-QnvkQ4&Ly1K5-$h$$=3vi zE}0mOPHb6JwLgG*R1Kh3vkez0ibCzInX)<<+PVX!Nyz9^rnMewi2))A zbhSwnU_BxQDKO04y&WYDp&D+tCc&ccQLidA$v`oDUMB{>m_GBSv+i6DQjg@Sf8RB zydr>o?JyRcK#`_x;uM(}1;S$aV8t6%#|8(sjJmTzKTvg_ zj*mtIFGco$_q}1_!XfA2gLnFFPtIST*}AyfFokXX-jkl$n+Lw4#06YmzzoSiQ+-kv-1+h%j$>xEtQ=WnIg9&REZ>ObQ;@N6uzYwT*G g@9yH>FM5!4MBVx8kg5CV_T*pBS6b;ED5-1z2jOkzzyJUM diff --git a/OsmAnd/res/drawable-mdpi/ic_action_coordinates_longitude.png b/OsmAnd/res/drawable-mdpi/ic_action_coordinates_longitude.png deleted file mode 100644 index 5a8551d5a4675493f7d4894004ceabfb6d2fb228..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1450 zcmbVLeN5DL7_Op%L~y`nHn*`-4T92Zd*5w1;kX06jXMb+as#)~YkznJu07fwcd%re zA}T|S(TFVBvI)xu85khwMl=WtnTnZie&Oci!-$D9)6LDXCC>GLbNj>i$C|Xik3P@) zKJQn3j$>U^r{G_AqWCCkSaoF)TnhSuo@?H7*1jYj^YGG;FKDN=N?4yCbFee zt~G1UmvS;8ZdvwH80Po;Rep_15I184Ns<_@#?)$5L7-AKFVg{(msW%2tG?|3fLS|)>Ix@ty z@sdpQ3<&w=6yI}P^HaH$MFg}gi1~t05$b{*w;&6WTkygb%S_ebq(Y8o1;3OWEYob% zRv>a!fXxyG4?L4+ihF_vjasWU>NPaV;)DS;;93nz(gq#sD%CSMp&^Vop+)BS?ElRl zrij9V&GMh-30)~28QeY|1?BK~m;kR#kf@BxgYdr|LeRW3Hmf;5@cqRm(`#YoXSUx> z-KVv++am{8n}2)7eK0xY;i;?Eir(+uod_>0LN7FIg_GP&Yv=w2&sHF>u55`&9@=!? zx9oadpHGmIbHBQW8#G7nU-$60CLrX)Zw$xe3>ObYf14Ozzhq65IeY5J&JBsK=aPCR z7f#OqJNDNyI-v-`9PzZE?Y! zo7*S4`=GIJd>!p4-pZGz%c-#9g#P-<=>ts%a&9Jeeb#a*(qxXhO-}o!UmuBMC$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1B}fIwxKifBFXR1>s2XEKHui7;m5Za!R!3e<=L+iF$gw zh{x7zVC?ss{~U9!ebIb*ZWi1&~%^ zDr@tCOvkmDpr~;zevuZ5&G89N~@36G!L#_xzG#}WcAC=)QnAC3nK#?QKM!yy~ zq$%dCf$Vt~dN^k!8S*Cv9H7ez0G6eytf;CotMRhNY8nt(6$((XEg4oU(B;_+FJ%ll zn-bCqL6HO@BPXP^l941in-(NROle(g&I_^W*{~biA+bBy)V^3f9Y7PKpoGwDcM1wM zgi%;SKAldtyH1~>#RF_B9sYc`b+7!W@abT% zygIiz^8WgfEIagk>Heu#BkPY>Hp^>$8(fRu(vDZxZhU=^70*(KhNyQhPOiNDU0jMJ Noy$xbPgA#+{{X-fS?>S< diff --git a/OsmAnd/res/drawable-mdpi/ic_action_gprint_dark.png b/OsmAnd/res/drawable-mdpi/ic_action_gprint_dark.png deleted file mode 100644 index ae443c661d3a7c26b75418bdac725773c801537c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1132 zcmaJ=O=#3W6iyX?s1$otFNUb7;B5Z0ozPhAX4fvd>#{C%!Hbh*whe7EF`2q)4_d7k zK@`D@3R1zdsGtWu_=6tAiy(N=iy(-4@!~;5)X8?YdME~x`N@0V``-87J6Ee780g>9 z&vD#9dCab}byN1PU(3Gl+tzosY^KE~JwjTvjbhC0_lSe}a)2gq9V2h{_zOJDajVbz zjV5hY4w)_qawxOOr9s5JIc|6)jgUKqDevG3KeU9e4<8ABVvDnEHCMk_fQEa!{xwe`k z@q{Qt2t`Q|6$LO0kj#b@r65eU^$={FxUnBmpM-pdh#WFQErBszN+F0Um1W>C=?cXp z6H^q4a!wM1Aj_*`ozOb|OJharq%j*|v5pfm6T7S)t!+JLrrrMoWrmE6c{ui2QP8wa z+?fD}v}{`f`;+s0&(w6!a~#6}ieYE~N*V+ZdI~VGjCI%1aLe&}I4k)Zifj~1C4E$d zk}Mas(V@IiGBh2ks;$XNvFBS36N*9?_hS1jcGp+?udi8%F`^`H5Hj8Cg4!gZB$*@; zUnq2{&hHxcLyxqR-C3EIvbJ&TpTJ%zCIR2k+4NW7ke3j~9&~}EsSxNb%>~Fo3XmN` zXBxB+l!t__zxR)ROMS|2SRPT2j)@fLs)p(TG-RkimNApGg)l%mc4f%WmAov7jG~ye z&OfcxyJG#BZI=gw9hOH6hisl=HaMRz?6|>(?qu2C-$>s&KY#xoSq=I=+`d2GxVHHK zSbVUi(RXNUy2@Ygf3|h;*3NYc->M5&*9@#%+_;#&J@w_ZFC~{2K3RhsYJ*!o)_!as zJazWU^D{U1%|Ctr>*8hU`<7Fi*Ar*{orv!2}DDXJAmoW4{5Vdwvf5joU zQ2B=7u14PogXxOr{+wcO_St^@0IR`|Ne)+@_*|H&_+vLi{*t3N41ChgUzo?LJLAoZ zSMNhU9J{c)W3}cC9--0)GgUg$&s%HoCB18yP%!CH*1_&4fqOg^RBk>x%cQpPR?XG> zo2J~ay^yxi&d|qO{KP@=P0g-yD^%(pa5YQm-FzT6W#OY=Gk{KH@O1TaS?83{1OU!< BVkrOs diff --git a/OsmAnd/res/drawable-mdpi/ic_action_gshare_dark.png b/OsmAnd/res/drawable-mdpi/ic_action_gshare_dark.png deleted file mode 100644 index fe04c8513e96c6a2d021c9424e277a39f5114340..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1318 zcmbVMU1%It6rRndi6#wfXj(Q=$#r5&qnVwb{hJxG&1QFY%|bR=x3Ml-V&~^>c1UJs zJ2UHUqDWE@QY5tzX+;WdB`f$~F%JbnAwHzgpnb3)mf}N+eGv;K;6sJ9@lKMBK7>9v zFmvxc_k8Dk=WotuMqX`e>1x3+tSvPpWYOw%-e;Q7_g*>j2rZpzV<2>wPeO{I%*SWt&%On7o;WK5o!lsN?-I05=AJTjm`TLcwtO1Jn*1mCvHqrD?0 zaj>moPe$+^Qn_>n#0?XIpf5zow4ViG&PNA1mI?F$hN43x#gTM?plF`rc!~zQ501Q< zN}kUO$z5OQ6u}F&UF1o!TrT^{exG4ZkTl0}B*l;nLm&;pn$~TxLg-dc-GTru*;I?R zYUseRC`v}jj^K#tP6%2to!&F7Tf2!uDI+Ulk)(YTscBAJ+uD|$h5ypnSKAt!E5d#l#D*U=Ra6vlN-*S-26a0nL~wNDQ&fdlSV{>8@+`px0%0OR zbAEzlq&xu`niCaC2|`+~+u0A#`h`STVCi@wo}lSOm`zd)7fdE&u@LJ|hGKPWO1ErL zmtozvihS>4si$K3xCuquFvkpIs@?^ef?*q0!6<@w+^KpP98Zg~syo77r%*d_3(!>G zflAUeG_aj%UfqWU9g_25mSzZ=QdlC8hkk;C6hnwiUJ1xBgsvof7q9%^43dZx>9os# z+NUl;J?U)sh5;S+#tG_ZhD#myVB;?)_|LE9da+YYDd0tZ3y7~ z*42mAsZht^D)<5$ee}_@{Ka3WthX6lZoPVb?mc{X0Z0d=BX8cAJLZ{iZ>ms+* zwCMG`>soH`Y+>uaN1s2qN@xDQ5k1|qx-xWqwsro6xjWva=6Mp^7za;cLp`mRlwaFQ z?Ki7Oqu)2oYt>8ruJx~@n^y`0hZY}Pz|OXN{%oLozDjjQ=A)@$&#ku4=W>nQ>E5-q zJNW%>&(@cxUR(Bl_}MGbD@|$cCHG(8T*B=8WaZ#|*tOgnkmqhc9sy6H*A9G(9UuR# z+W8h3XlzSxOb|cQ>sUmXw9XpKtaK4qjjy*ClXb@WcVh;S`- G=G;HAM6kgC diff --git a/OsmAnd/res/drawable-mdpi/ic_action_home_dark.png b/OsmAnd/res/drawable-mdpi/ic_action_home_dark.png deleted file mode 100644 index 8e187c2263b03d45963f279a7c46c0b721309678..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1167 zcmaJ>O>Epm6n4{=pF|O9Pbu^;I0B^-v-WuXv$nE?&3c!tU^ijAQul(ycs!f65_^p8 zbe$YXicl#B6wU|<3YV$}4izVQfL?%d;LrjGgaj&o7o?&}NI6tl#+%*HLsU!l%$s@N zd*A!>JIjq1C&!;07X)FlwrDr`I-R|bJ;J}g_KLfFIh9n}$ywG(dN`s&$z=`&H6O3g zCdKZ?>o@6~ARK+mYqgVh{bh?VKZi4&TgQR8`MShcWJ=an-*L56Shl;MN(3DjZnx?Bjog%6cN2MLd z9oabyk5s#ASE~ivSTGT)sHJ>aua=cc3F&&pD3nInS`a5VAavy0R2|Ho^8%Ok;xk#9_M^6G>4 zAB9JLyK?;d&$drox_16p#jDTU93$Y3y${oW#;(3SJMqDV-P>EYjx6p>JU#L8 z_U>O>_iij*In{=9RGRe+wSijR(0Zg+wCtGFTVfEMD^P7Pu7*w!m(*# X8U3hz_f`K^_KT=h8uq6Puf6#nggt-< diff --git a/OsmAnd/res/drawable-mdpi/ic_action_import.png b/OsmAnd/res/drawable-mdpi/ic_action_import.png deleted file mode 100644 index 248d29746699c68f67e335a7c952f0de98d19475..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1149 zcmaJ>O>Epm6!sD+f`$r2C7=PRu6t>rv$iL;vtwnu*|oD|B{oFcmAVp_jAv#Oli1_f z6V{3NDNt2Gf>h#A4qQ0*fLaN}fdfTCMIdoUoRHuE5(05UP&JGN4@5187D@G9#t zOt&|`Wpj!$aV6~bM6dm#OL$bqg-$t-5{XunxmuoJvd)AWu+=cGYJYz5rKX0os$H_% zMmzD?TDZ8AvWq)QU9z)I5Y=iI)VbW11|lY~nnxRP=H^vxXxEkd;#k+zp^8|qY6qlx z?Pb;DDO2sT1BhW->MSaowlj-n&#O?%x>3=g0Sx5YGp+&E(W6OkDeb!*zd7a?9SfX;I6E`8;IoXRVIo2vtA#}z@GVi*B-4Ws zqNLqEG#qE6M9GxtIZkx5Z0J!`#5L5;M2G!P<4EnSyPYt-!!o{=5?PP_nK4-A?!k@< zMajl}DGg;&@P^OHR>We_@~fJ>DbtX;mQ868I1Yf0V*zAX2p~iuaG1$#5?HJs(6ODP z@RepAA+uR;G;PZ?7p#T{{kqZcd{{xv26V>QR-6eO6E^l8O5YO;&V8*kK9c=eY!3%R3WuY`VmVK#9GpAfT&T;TyVmmS-TcSk?*4vl0+dcn zykGhrtemccogUnKPo4g3<;u&qAN%^lkAK^*?Y;KbsT)^M4gM%yU&wDh`grZ$wP)t8 z-uNnzmfCe-_XEe*K|a z=b!lK?Cr`g&p-R5_TB59($AOwy}bG9O>a^uO)Bqv?tSpaudisu523ZNT#X` diff --git a/OsmAnd/res/drawable-mdpi/ic_action_info_dark.png b/OsmAnd/res/drawable-mdpi/ic_action_info_dark.png deleted file mode 100644 index cdb944551e5f14cd45e561600274c7cbb6741752..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1287 zcmaJ>Pi)&%7%J|`=(}EuY@nsfNenwDjJ#6<7Q_ZrLxy;& z2*zL*0(I)tUD$_VO|NUYVP`mfOjL}bAGkXHa?wO+4C{-QO`uFb2bbZPrbmcBKEFla zni?Ta2GexfjKgs)Ic>oc(?dCBdO{IYBKkbuR~C_hB6I*=E*5lKEJui{T@mfwV~W75 zD$YcN*d{fc&fsywf_Tu+lM2mncu4RwK|Umed^n3_iVjmOP11rG42U#~*B%0Sv(&tp zl?H3RkQ5=t9mfCP$qS|yKX^(wqj|fqZvBx zS_HB&=|l*`bUTEinNIH**6muNP|Bz>Fe%1QQ^leiS5@0~vhaTzyK39HDHBpzXd9E3 zg6fg)u7gqT9`49hL~O+4mWGM~3X-8r7NPE>qzHj-{HmskTu@bIndeEC=Q&cKIe`=e zl_hz|z@Q>?FfXfhJGulQIotQs8Js39{jEC?6ndc=dt&ZTBfUL2;OMIwC+A zz$$>0VF-{6136M=d6twJs4|?YFbV(!g(y;P>paj(^&`}u?sjJ|kgzjaP)GA*p~3le zHhUez8oE-_K(73w{O{IQw25r!XnMQh(B6A9;Ya4)!z!=ho2{#tW;Vo}&pS6#xrnt9 zPlor;9o+2Mr#F2>`R!}1Y~!ik{agPW@7s9v`<3Kddlohq+Mnt87{4F=4fp|<(2zajx5gnyxJ%%jd<^J@3gFKwSM~4icj79&C=qn z_57hbU$o=-o)6w#43Eyd5$(O%{@Qmpm&!v4`;u~foj5>-&##^H$*aUy;B1B diff --git a/OsmAnd/res/drawable-mdpi/ic_action_marker_dark.png b/OsmAnd/res/drawable-mdpi/ic_action_marker_dark.png deleted file mode 100644 index 2dab1265c00490ad6e647568472a9928898903d0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1291 zcmbVMT}&KR6dt6s1w=^OP}&%CGi_oUo!{M=WyW3EWrrk?HnL&`-RGMBLs8pHf;IZIZDp$il^q#FVJw=eGE zK-U6zKNq88Rv4!B&Iud#O>`&JiD6aH@U~ZhKPMss8R*I&ml-h}F&Dr~c15%=9#c3d zskp-de3w)*)(gU>4FN~;gi14B;1fuO<9&kfWxyhtqFX7JCTKzAJR;44@`EF9ww4m( zQl#t)NdY|Vx|T>$*=&}~dPvhAq8LFCD4L~MmOvVWGj6zYjxd~46$=t{R9m-P-84Ya zqO6!>ZU9G2cSFcnvDltr!zm{UrHsnS7R8V>mB|$2Drq}z9R5pVUu`EbZb2#z9dpc9 zQ9V+pDqxhmr#mVtA~s@=t)rsIBa*3(WuW0kr2vj@NKMy7FQ;jW!t(^n^Ik%ry#gT! z8cXnyft;#%VM@^|cJ{;5f{*hu9*-{);u)sH8)71@A)aoR=m^7wxo`y=H5^wqR9Nw? zBj05#`&6tLwxR5rcEU7ADqYZx0wb$<8L$1{{85M$Rcx03G*9IS zb!2h7HwsAD8zyL=39`|sd{`jS%vQY=l|qT!Ps;YrPFpomb+me}ifNv%9<6V>fNd@Y zx9jg4Q}+vpmcZJz^{K5tuKbLhK7RAtXD6?p!+yWJ^X6*X^7&7Gr8lRw6X4EsdB1e< z&wlVDw)tZI>kzq6ShA>Rl-e`5uFtGuzC`19qgD;kGIM+RtkmbcH4px-%0KL!WWeRQ zk0S?S505Xruo8OQ_{#@Ue*HrH(JJA+{CqR_>4C=&=C0MI3r~(t*T0cGHdDW(+*^8g zesb{9qC41rG4e{+)xz8NHa7k`ogD0Wrv|Ld9bW(Zy@BSb+eezNe5G#nFQ5F3zzT7H z^Zb$TduD68f-8+T3s08pV*}V48{Dqju$l%ITE5Jm$JWT;_Mw^gZ~X90r}EKaZGJZB ipG!8(hVQ&y)ij8`7Uu_OK7FzHdx~~+OSjqwul@sR0<(Ys diff --git a/OsmAnd/res/drawable-mdpi/ic_action_micro_dark.png b/OsmAnd/res/drawable-mdpi/ic_action_micro_dark.png deleted file mode 100644 index 975cd200b8c162ad0c8bc2cf08486e0ef7dccc82..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1233 zcmbVMTWB0r7@p0FO*bY4EWv6Bhe@Q3I6JqU*_>e~+3n13x{{4?yO0%p$Xw1QlVmQ= zOuC!+k`#qh6s>rnD$<8OidOO{(mt#Y?MsUi5CsuL5c;4I0t;&6naytWA@sq4nREVg z{_p?4|2CKBW~ciTPbLV0=r5jE%XobvdV3$m-=FGo3ooa`d^Nn_*222xBO+(IIs!#o zTSR4~nd>j#Mj3*LU$iRKuv(gt4A)L-kxsHamwi}Map2<6iCA)D~M^Beim?8rkM$vV<-kn0xvNf=sYC$=9@LCtQI=H zuq2a9VdzOTU9Z=Zbw26(i!=)%q#2IpI0|b}!MYP_4ax~dyB1Uw7{29&mg|7XqNclR zp-f_?hauQrsdQx62|9_wDWe;jN3%(Ww(TgcwssJf(Z4i~)eb7_9-_-AaMyeT*P}Mt z1>@X3+)<>6*+|d(7A}gms=CISjhwKk$|Sx?nwBZ01k==YQKUFgOi_?YK?*{XqeR3a z!O&Bvrkh>x`@nz@7kc9XURH- z17sk_)>0y6)&zkv(kYJ87|ozqL)3XKoi+tgBRhEW|K^Xzr0A$w{?k0&BixbE_GlEa za5PNF!4u@;QQ`00{1}hfUQx|e8sF=G9UM%>so3N3H)CH6d9l66z=NKz`D^;Cv9sIT zxA+6&(&^@}Xp9?}B-p7Bznca_;QEznpEs@#b5}CUvA?O-$>xcB?~KLYHxuzcw_5!8 z&`UkK4Qg9|%rCsKGyL36cK1i{^qCKG!Aj!YyC<99ZnZ{F-Q9eh&F*eyp}6C{c&o4Z z)@Ca{_|(tiiJ5E5Bf0%SJJ$PAZ0`(sFwiVzKiwQVp{JE!CUd*o+sm=u`#pQ`de6X+ z%6KE&`@dh!%@prE()=Ww>A$@&_(R__)9-zA>Z^OkFoaiMQ}^E({rpC}mmzM*_bXB#w diff --git a/OsmAnd/res/drawable-mdpi/ic_action_parking_dark.png b/OsmAnd/res/drawable-mdpi/ic_action_parking_dark.png deleted file mode 100644 index 890646f66f52cadfed6f486d40770f651bf8a64c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1177 zcmbVMTWAzl7@jo}L#iQQz@()0IBB7xbHD7)kZoLda@mrNVY6to5A9seW~a%_8D~!1 zO&)5D3JO|m`_!k3FXBt^@}gLfLK>)Vc@;_}Sn696p8^fWGn?JC55b2H%$)O|^MC*U z{kOS3Ix={m^}|+*q7LMSi~?CZ+sI?hSck280YOt#Z(lVq?MaA%1t(lTO|L$EMg!ML(`S@C zpAWLI><-O_aBOy@XwOdCnnU+}4tlFPG2lULf~q&=M|w3)*X-(KA0KlxsHxz|G`&q~ zJUBC#l(-~>(6I9}vLks%sPG~;8l%J@-F!-4@LJ9Go=A|J#SO$$xqG)hz9uGdu<2&v4`yxe%EXDypNBX1f79H}-}x;ubm^0; z-+kM*Sa^K=_URi^+n+;Af5XmF!kPgKdse=>B0s$K`gRE3?pyq4?(s+0`V#9Mzpy>x z4_(Wzo>31v+aK*&A3SHgLDpFJy-Y{*;>EcQxqXXT*+2jNpw-@$brYa1u~G!3r9;N6 zrC(c~mlp@#Y#kXZ_THWUiCa5+YkpzQSnIg<GP#XpN& L|A?`0^6U9`tu21O diff --git a/OsmAnd/res/drawable-mdpi/ic_action_photo_dark.png b/OsmAnd/res/drawable-mdpi/ic_action_photo_dark.png deleted file mode 100644 index 274be86f2e97011091e3900a2b723c38ea3baab9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1213 zcmbVMTWB0r7#><1+Gv+*qNFj_ak^EDooi+$Gh?=OcV}a_c4OEqbWxDb1N3Pt}&dAVF-ObW3GaE*#e^=rKl&VH#e5*#t3oq!Aca1t8J{W3Hc~ew)8ak*=Mh zPDll=5M;r)dvrPkqtnABYr0~oHg)7MIoQy!0uLaAY? zC`DmUH$w1&LSa*}AGH#NQ^q!ofaMvE^}IN)COSez@UI(NqNCDO0N5gk;6!NQdN}*r zWSqNu8;XJ08|}r=#YHiyI!Tb{_xq{v3y_fX4m(NDg) z^4j4~cNG8Lwc?W z6QvsqwT1K1ER!&QC#1J)x3>Lyvh&sxeGlAy^5d!Nv(G5ePfl0n_JhferCpUT4_qBC zE?&!gTl;0@&og~%xevD;dSyQO_*%!cnSHPRad!QwM+bNG5Z{f;7uIWkW#b=8J~ym? IlsS3oA3PS8VgLXD diff --git a/OsmAnd/res/drawable-mdpi/ic_action_previous_route.png b/OsmAnd/res/drawable-mdpi/ic_action_previous_route.png deleted file mode 100644 index 1f2b6e73941649a0dff1c5340c3dae24a4a8acef..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 314 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjoCO|{#S9GG!XV7ZFl!D-1!HlL zyA#8@b22Z19F}xPUq=Rpjs4tz5?O)#^PVn_Ar*{IryS%xWWeL9dxRk{Qo;M6)LXZb z=1q=nF9q|Sp3=PW$bFNNOTpy02cBU{;s5MAXA9Ii_FODx=~LY|L&aUUp+e}Ij<3&# zsKh4)1~L=5L%O3jhFeZA3tV+SaAvg`m!9KqfpRQorF|Fxrc|gsZAKTwtUHewxW!d)-W^SGexipS@7VBo5 z|6z6^%1BXCo@4Ik5a+Z-E5-jOT=M(V>skHr%#rAZU#T zTTr3?9P}pW#lMROZ{k74f_U)a(US-9DtPiB)X8?YdME~xnfLO(_rCXcb8PhZwyk@& z3WBh$cB0bY=kDy?vYCIswu`^`v4@RJuyNXAZ4?usgsDr!T7afVgCIPA{v#O_gxsRv zoM036la5D&Jj!hHX%KO=APf$r5%OjT6J0Xphehef>o=0<Tm}EVMt7a*)Va^qSW#0@O!3~C9z||W{T1(sfqfSSf()%jl2mw zMb$;i&Z~xL+13#ea#>aiGE{(KJBH>cQ0zVuj~3&W)2LLtvA9%}rWuPIS#G!6`L>p) z@szCEwk<1Ah7fQIkj#e+r65fDdmbtz@nSz>J`KgpBXa2+D@vT{Y6?MAudg`{lWw7S z$>bD8vYJ=qAjtCSSSPGO{?b_2I%&>FL~f9T&cz<@N2|XF=C%8Opv;i7aZbfPZwi{N zP;V|EA*)r2691FOK6Z2iW7joJ08LW|wxZj>wlM@IQHkNXI%&DM=Vv{92^KWnfSOep zwp4Y*C{(LfL9IenDU7HZ9PVLjVZu=8kzQ<{$L?a`f3Z$ECWz6vN$G5F3dW`>qscUl z#B#aQb@9*{Kg6`13}kIu&ALKj{{q3)m=ag%B9#M~u)o@yYaceA z5-)CEUU|Owu=EK}E*>1ed-=fq{VV%!Jf7V37UufzJ=uFn-?@F$k;3wxfp2%d1@|)BcqiU!;@G4 E0P@;mkpKVy diff --git a/OsmAnd/res/drawable-mdpi/ic_action_settings.png b/OsmAnd/res/drawable-mdpi/ic_action_settings.png deleted file mode 100644 index bb2cc220486b276b55f3cd40577c8fc4862de741..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1337 zcmbVMeMlr_7@u9yQ#)-BMeY>rZSDx`ZgxJL-JKcSc6E0>H*URcU2vla=i^;>(w!M+ zMt3zKyExjih@hfQx~t%#2!hL`FzUK%r9`9;39LWD6OJH+IO-4S40~5y>kqj<8kl+C z=Y5~w^ZcH#c`n|2x~{gl7Q?W*XiqqS)}y7jx(a>Qa{f)U9J3=SyH8KsInjhzr=m*` zM6==`Oh8c?A6bMQ7*;W+CR27Qc1Do(tXnMUxbs;9p)sr@kT*nm2--k`gR17ofB)<% z4phaD_j_Vg%m~4Z+B0FozKPzXJTWBm3Lbb6bmRqOAPa2~$?CFK41j$HxmOUEP* zc2w*kKfX&U6^nzAZbIO3dkLAMS>WT{w8!h?eWw6}WRl`Yh9W3l@U#mQ1NI&qc{7!? zkO+70`9hK(&)BvhkYp~GbLZOKx;aSFJkOI9Loy73Gze>4v&B52S;xy3!qAdU)v#4v z10{>1q>tKu95LMuA#229`-U}ZFHtCEWL`8#+D(z!Y$>iCZOcx;e`y@3Z6(JING71A zkD4;7NBVdfjBm?YkmnC?L z)RRb z;)SNyr6Vhs->qy8KY!%oU}J%F-m-xglT`3{ZLur$r{EYl>9RsUElq8RItCVFnr%fH>!eLzXoou`CZe}?3$}JMow{6h03?N+QOw94+kn{Drb$h zFYYR?XF6-H<8j``YR}ulO;d)`^;BfVb#B2pS|9Ga-CTHcWWjOx+t5mJ`fI0~ooo2+ z$AP6o8;!3V-mbn`@gx|FG+1BBVE!?RJv*>`=#Ai3%jpx-12wJjC+5#b{tkeP1){!w zJvx?q>*eLU7p?^-TVDEWW%U&0SihS5CIjwSU4JO@$NK}<5|fKb=Y`ik>00@;*`-g- z*S4(I73YH+HN~N)Hwo9$y)%nF%B$m*g}LvGzc{Z{&;9nyOsc5GXRq_qk&Q;W`Pj3Q dA2`96*y0PzRjnr@Ka_rE(MWIj!>)mI{{U4B!tDS6 diff --git a/OsmAnd/res/drawable-mdpi/ic_action_travel.png b/OsmAnd/res/drawable-mdpi/ic_action_travel.png deleted file mode 100644 index d7335726beb8a6272f3af54aeeac6181524a480d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1222 zcmbVMTWB0r7#=r`k&==?qiwCqaW)i%&dz0Lb}nY!PIh+9+U^=RYu&y%m$S)`%*B}# zcM^T524QQ1kSe6;Lt7vFP>5Jc@j(mPrr?7@DYhWgQbFv4l_Er_Sw2V&Fl(Z_Mk!?jd=~!)B{MUmS;dv za`bUng}OEK=2bXE5M7a7tD}1PkYajHN{@9?k>g`DK@8<0UpFTq0tOtn-7NY0mtT>< zwzA~wLYXQ1c{pK@%m#35wo)@^Cr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Ch;R1* diff --git a/OsmAnd/res/drawable-mdpi/ic_action_work.png b/OsmAnd/res/drawable-mdpi/ic_action_work.png deleted file mode 100644 index 015800328d4a100e7171ca9aaf545e6a6010fcee..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 221 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjoCO|{#S9GG!XV7ZFl!D-1!HlL zyA#8@b22Z19F}xPUq=Rpjs4tz5?O)#B2O2`kP61PlV9^SC~&lH{8?k0qo1**bX%EN zrua0g{q}JO4mt{C&Ta4wdcx?qbCdrgpC{chZVN&-?r!R1ULyPYkJW*2m(vIChTMuh zQ_mHUpK|Vb^ZlZ4ad)5PuKmwHK{LTMnQv2x1$+7HoU@Dt;TP<*{|4D#Uv3oP4YZxX M)78&qol`;+0OVCpLjV8( diff --git a/OsmAnd/res/drawable-mdpi/ic_configure_screen_dark.png b/OsmAnd/res/drawable-mdpi/ic_configure_screen_dark.png deleted file mode 100644 index ec2dac1101ce8f21f7f141455ae9268ced3085ce..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1309 zcmbVMZA=?w9KTW(f`gC@H^5Ae1I@^|-V4{e-brbpSEO-eq!j7=V0JH0;e_7Z?hab` z)Z&-Qra_E}Q$vg)CW|kTNMe>bUlNvOE=Ho!5dE?==oe>ZOpMhu;?qLW4`d&_XBJ%S(&kzp|g*Ou~I_W=CfPWy{+X?4O0XUs@CX~_b}fNID9 zjijVW5Cf7rfBq)uLlF0z7Ed^d=xISQQXZ+S{PziRdUAGAw|4JuI$}6oYcShw`!<&-I`*lnK&D&?HXsg11*7X>|X=pf^iR z3NdkL-xrkp*p%a#0zstHX-~S>V_1^}#q&Ht(gaQ8Py@H;bw|qJy4_i|AOc&lG}F-x z9W7gwWMkIxW02`y2q`lfJus}>`-y@nBQlanP#%&5KX9?8xs80PNYj>?LVjc~@&U{RzQ(NJbnKzAadAA>g@RZ|7VtE#fhvN+AM49=4b zkMq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b/OsmAnd/res/drawable-xhdpi/ic_action_compass_widget.png deleted file mode 100644 index 0ad0e459806fd4edb5a04deb32bf8315aefa7d31..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 802 zcmV+-1Ks?IP)`q{J0;Ll;8+;*8^hF1QPtkHN@pp&w z(E=diK@xRdQF`s zMRUVWe1&r8W-~;;=qK_#9zw6Fp-TdOuOF=^8%?e7d}*Jp;dj7_N&`d6Y~l8tnec+i zY(_ktptG^E682o*R0H;qJ>HVv=%bya^6<3|Beqm%@+*heRfOy#BJ$ekf*g%$>14w! zg;!BwSR8<_wYnDlksLnx^3g8{Y*bAXkbVA`dX0 z?_fn>qz;q+8(|*d^$0h5#ML$2fTV2{L;d6|w>kfJiibH!UPDZJ@l|ZRqqMvC={+=2Ae0hw=0BTDu#|`uoP8bO{5BX}5lf3FUbqm1&7?~aUf>+FMFB(ej6kK38MwnMwe1Uo_NO zJWa}bj=|s@VvFpI{4e` zWzxoDgs&|=1>Te_ZG@{{&xMKX{PotzkRItU9$!wKc~1C+4nI|T+wP^6rX=-uIb zG=awl3X&mOsTC`}Hwu*r08pEc2V;-+v$TfzFm|%`*Vube6z@Xb<}9=*eyQ9rPbTknnK3@`s2eBxWk4V>q>ql|ZW$7=i;sio4h$nx({7a9yLKosU>!8S$39Bcy|{Y^JE`cefH> zF~qGfc8Wchz@p;q0v#dlBVs9PGH&LG2YWT8BKjC|5=+rR7&^d-9D`*2bEbq`7U)hO zhxiL>I)BH+P^aH&Is7zj^3FAB1aHlUo_zH{eYgbf$@q_&4_^=O6>o7Oe` z3|u$AL_FdL8Q%vZfbUDN4l5-Pe8ag=lh!C!AZtb)Y_62_4BecsXHw z+1@cz(z0>kM8^N91D61O?msFI78K8|eGEnb(@MDN9~SN^;rf28=LWXw_Tn|+6?eqk z&C{zJinnX@gu9CgE*Wv{4aGk({8bDGlDrav!9ko`ddweA5;n;@o58}-(}y(9Nu3o zxDR*tAZQ-5i?^b%Y@V6e%UlQkhr`#D4akm9eDI!j$0VS?Ks^5D%rBWh5<1|EuYf(o z19yCzD!lLr(`N@^OAKSDh=wNzm9^>LtZ3K{W4nHo{>{2##R@oO5x#!2kdN M07*qoM6N<$f}_lDO8@`> diff --git a/OsmAnd/res/drawable-xhdpi/ic_action_coordinates_latitude.png b/OsmAnd/res/drawable-xhdpi/ic_action_coordinates_latitude.png deleted file mode 100644 index 025303ba1da72b17178215634f3c3c59bf39a1f8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1976 zcmbVNc~leU7LV*}UBHS87z2;RlFUr@44^~;G{peMVDQ;vO(qivkW88k5GX1FDzw&T zS&K^>+7xTyAt+!KE2%ynMKo^o02LHp!Q#?Ku>~}0+X;g0AD;fvIcMhk?)Tl_y}!Gi zDNRa<^K@J0Mk0|sg|7?5#0uJ87boH?wR^mWSeD{3Dfk9ViRZ|4D2cDYjch^k<68B~}=g3kF?5x!@!tiQy<(K=LyV>$_jWzKa$QW}P1`ZP>S zj*gzGIypqD(kQSTeWCSNz@l0R$<))+~Q&p1C8UBW>Fkqd*8Rh6&XW6Qm$#D!(%vZhX>1)&6(n zS>jJ6Q_mK96o#JN?8+{XTZN0iVP5sJOZ|F9f&raD?F)7H?O8^VVQQYQUBK?t zaP#Wz_HO39{i5)`M}8#*$F`DwDX2EyG9s)oyY}K=_Z5XtJc`;k(sETA`mgbmMfbN} z>FoaWe!a6}Z%yz(X-REjTu?71#Ojz`Xg>_4BpHf-bv$hJb{MFpZlE)2vj)?T-5y9j z@J4ds`GfB;{~fEu5277&VrALqTgHYOuB&MCEC~Q|( z+N)XHPmZ;(%Y3cJd6lSblJohIrGvxl`ZCqML5IdBphnUU)jF5eOc$u#q=RnHO8#HD z_xrPcUI!K|8*;oE_{vQmWyyPw&s!jCM|J2mv2a_uo$E(t(@#%Uro`Te4_ZB?u5bq`%PYBA4FW&4`{TPlI{zO9s1)qPg?vBjyxU8nBeuTnf}3h z&!U>%yWEPD2U{C`2OY{Mob=h}@2-cFv-fJPjs~^Mk*-bY6JYB_)VFnU#pdGc3-6FJ z8qTRsxQ-NE_QfUlYOeSSo9s_E@6Oxg5;z$JJO~WdRGBLHbrp%;($QZkj`!>rTU^FB z|F64r(zHDyR{WMJNcX4{}c+N!|KOY9H!Kjem0o?)!r`)!>%j| zO401CO5So+(r{r_uvyLdtaE?&1;@qypYqGkZLELy!XY45)oei{+$@XG3x95lP{ zL%L7PFN_W}+>9{((GRyE~x9={J|32Y1Z> p=!?_JWY$he!l46Zapev>57HB9e!AxAjxyW7R2Y*WXk5Fs@OQAD8GQf% diff --git a/OsmAnd/res/drawable-xhdpi/ic_action_coordinates_longitude.png b/OsmAnd/res/drawable-xhdpi/ic_action_coordinates_longitude.png deleted file mode 100644 index 56a568c2873904fed26908e57b0e3531075f92df..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1962 zcmbVNeNYo;8qX#a2nVf44@$JivRJ{9B>R!i1(ZO7P(%=Epkk+Nk_93p8`f z$IrG})K;D5T0swMAs%WwR7j6&5C=axDk2}Yg&qoeKt{cTmSQ&u_Wp4E<925Eec$JO ze$VrJzGio1tXmV{x7d%xVg;lmD>IoD_PoB{%r~1oy`5Qjv?_<*K;_eAgqdV1bd-h! zQw&4_nMo45@-1CtEQ`e{)o10_M77DC{h3SATjJt38omH{SGW)c(&Bz!G`AfQw(K*TZ(6-R?8jEIG>T!_GY7{L)3 zM`3XOff#RQT|S3gpPw4rcXjJn9|ao8a7(y6UC%VXeCTSL;wp722Wgb z+7>#K{GG-#wJllYCQ_J5TBs7UmZ?X6!~&Sf-SZuJ6d5*nx>?T@g(y~1+7bh4q*Ih} z5OX8Y>2)}YN#%r&MEE+94C9lih~#Uu8k8@}*XdxH7A3SWxnSp6c!e}cp+FFkNTHA* zh)N>EBq{}xpu(gGrbxo%3)mE+g(i$za>2Kr@jZ{lo{Pm3%_Kon<}8XTUg(01LW-s= zg_H?QOq{Da7?rIz>Zmfy3Qw7yM6D#v`chJtW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WvC2=`~WT^kI1SQ{;5<9YJ%;QY8c_aPp- z-*f3yvHsILE1N%kyyw06&iQ{IJM`_~ z#Q2G810N^nZXWpl>(R421|C_u`P8Gmt9{?}{;>b2fsUcxO%jr4=qMY_a469$$Uq^&HuAnYe(!Ws^iOqH{i92-CT}cm`(xqAmiTKwXLfn=!K;^hCRc7x zZQk+Z%JI<+Gw%!y{dt!Kx3sse-+7lgL)4zmCpK*(w9)cX>BgZg;qNAw8BU)aeEIeN E0JWW-MgRZ+ diff --git a/OsmAnd/res/drawable-xhdpi/ic_action_delete_dark.png b/OsmAnd/res/drawable-xhdpi/ic_action_delete_dark.png deleted file mode 100644 index f378f2faa769314268e1b46d9747b26ce216a7cb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1175 zcmbVMO=#3u91pE@YeCSPib9Mox@smLlVs+_&enF)v4c*n<6s9=Fv)u}P21#Ulh;n# z1t}`K+k>a|;K>Re74f3t2Nn-oa8VD-UKEv{3W}h3lY;eSI#YL{^x%W!z5mPq_xpcm zdZ7Q%hK{Wr48v^5_ZdaHi}BOmM&E-ipMR&@7SdZL$8m+!%m6Xn5L<}NyJi&?kqIY$ zd4f6_rghvYl}Wj9M7ObuokL1UWWVdV3uPYnBfN1f>`jg zXvpcC4AAk({*pa8Vgtx^{mgboIwf!sG1 zL8#SgiCQv&gQ_3_00dDMWSOTLd^q6|Gvd8)XOqD|p&d9raj?h6jHZRhNQR@HE{EXy zg~AH47d8?_Qzk^FFGvYdaNRhrx^_s4=$jj>YKNr>9|=Vi;<3P{^{DJ@f@$v7HWVvT zZ}g*qLyKaL8rU9lkw@}IhNE8+(1E(5LTFi<#><+f@IX`m4*-;T4M|9~Ed^C9*yLFa zFDH9NIVZ_!Nli*puhJue97rWKLsirCPHkfIUPw&OMorrewcWrO;hD96~VM*L1a}#u7QW&n?Hd%CB)70pXO;^(ThW8>kES56N1wO`pivmK)GW6=+f zuD$Pk`emC^!_QB-;indcIe6;Fzm}eEzVmMUV%x5XvllmwoSZu_u=rSf&P;WTO~3i` z$kq9E!>@C5JK~?i|5tj~{OMaWx7*I_ZND6L-P*o1{VO_le}3WalQ);DZ`VJ()O~N? r%+%cM-`RT$+H9@mRS(7gaeanqWwwFG)z%XWXJf*AZ@+P~=ghgUIm>)x diff --git a/OsmAnd/res/drawable-xhdpi/ic_action_gprint_dark.png b/OsmAnd/res/drawable-xhdpi/ic_action_gprint_dark.png deleted file mode 100644 index 8dc22c65eb629d5906d7664dba8ae689053fa78f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1262 zcmaJ>U2NM_6n3+gcA3JaicMo1!g7%aqPDN?*s0xSTN0;hfP|0+HR5Hxv2PmF`e(L7 z(jX8){AeJ-CdA-@hiV8UBvdBxGJy~bO-PKrPGe}&x(5*2VAIw~1NH#dX;Su3&60h6 zuh03;cfNCu4;S(WBH>+Of*>NF)Cpr0xG({|NwKo=27-L4=q zYr;8HL{MKm^dp)eh)u5CB zNJCFhGhz~O-nhC0dtKj$Gn5D>$ zi9es9)<~6e1u|{Bh!h!#)&LhH<1)jEQe2LYl04qCV2tGf4P-?W6u^_+i^9=dy{Z(| z$!;vXOHei6cNCUwG#X4pU~G4eyD9m&%1=Gpp)`2arD-@QDZ9<3T7{HolkXOgr^NZ+z8XH=Br9}s^MdaCaSHtzF zj`WzOmSNS}0VlkDiM z7#nbi1Bj3=Ycz-nGA&kP8VxIur@4wGVhyTL=EkV5zkZi~Yki7Oa2`&NjskgE6C^>W z;g}@Q9EY%^RfuRPB8`(VIv?jK7E@${*14;ddPlfFgV*)Jz?=2aLKdDU7Z1*s(xX=h zqL0X`$x`!|KR)~>@;%u0x<*C{H@+l>kE6(r*~6np9y(H{#zFsfacY!6OH14rCqtRZ z`=h7lZj8P(9DVELyAyZz?4CD=SAT!x=+KYnSDyVa(5Zr*Lr z)YYjw$)lI6?}XZok8{`a^oZIQcDDahd-n2$=*a2(=e65shMpn6+p}^ZIuPC8{_Th9 bSNe!+=h9F9yY2S*;186|Yno()XZ$ ziSQNP5*G6n(hr0US8fS-As#n*e@n)aKmP-pwlH)p(wLO9K%ni1mx}}Awhzx&G?-{9 z^m2JDX1WAs@O-VW)VBM&)jp6gM@2WlR*RSs|bn{6H*fVny2WQ1m>2)mW zoIm+BsZo78zB4;{?du(w92nu+34xfMoD=^>bP0l+XkK%)X`O diff --git a/OsmAnd/res/drawable-xhdpi/ic_action_gshare_dark.png b/OsmAnd/res/drawable-xhdpi/ic_action_gshare_dark.png deleted file mode 100644 index 44f098aa98f39a6a93b6f651f5a41225040ca051..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1649 zcmbVNeNYr-7(WgKyAmw?$oOzQ($R~({ovqkcR1lbxIFOSKoF!-_jdPWg}XiX7H=UX zKp8Ya$R=_|O+s<-12Uy46BSJ{6E(lGP)9;hoQ#i*#L3b25Uf8O|7d4+-}imq=l49n z=WBMYHTmsvvNvQBiDaC4jxkMKVedQEU;JiDAC`;D6h0w~pU2vH55dtA9mU#c!0aHF z&}lS56)ZbN$4Vr=0+XJ_XIbXrBfnW?mR3MDtFowejF!IPn zZyaUE(~PDOU*btC&*6C&4nZD|N9l=DvfL5~!7vPhQ3yprQ3G@rIC(+1W8b9OfZT?n@oCr zj3&wyqaVeZoo=3RlJux=M)W;`MP7)-4IEAIESJu*d81um&0%@gox{2SgTY&MH89gc zkc`tSoaHUl)3}W^$1JBQ6URD$;Y{Pqb66lTq+P8+P!NGB4XCoyQ6NUcC`h1oN=4E! z;+0K4f~Wp(1|g9Y`CwT*)WKQXX8XW#TnwnVF@{2LrWymDzj0SE_B@6 zXh{muy?#OY2TXou*4Ow}2>l3W1oJVo}e$(%rZSQj0C*5zYs=n85|7^>h?zj-e1lj!R#vf$g zWP~>!dj{;{`SFJ4=~eI+xH6l z-W3ghF3>dAl}^O0NGQxykHFE8>t z89G0rGfZf^;%N=tD4l$)aqwsf>^Zw|(}f39SNyvD&s$Z8lDqtReDh=IYQK)mUxE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SKH8H4qeDP})ZsR=wWMMLdE{zjDW5YPwG^Vtc2z8U$1Fvb zRotNvwMi_J#Q0U;5SU4Et0#ew|2~}*|bX?5@sOsCm zzAIS%fmk(SBh9t!lx5|rUC^7gT+7K?1u_yTSDk#Z&oH4?bXvSJZAKkMw($mnowk)H z%XwCf?KnsoMUXh1<~c#4AtwS_%RrI#%NZF!e=rD@AXUM``|`Khr}zZNQK-^UH2@?{ z02-~MfJXB?5@}tK1zP73U@o^J`By|=Gacc`(xVeau6;`x1- zB0}@IuJpufr|!Nma_YkR;)lOJykGd{=((mF3v;zKz9(nr79*318wY;h-A>f_P7)81 z#EzXEG`%!&r=j-p`o^2n*PENihCZ*qy>zkht&h1^o1OC?HL-s(6Jxon zv2Szm=6Ch|{mWCgSH8bBd!^xtFQ*y%;$Iu#w(d^`9j^Yzz1*?q?vBsT|FC+9S^NX6 zbo+k0-ac@vMm{rhrz5-;_N|q6`iwMJv7YFq@WAQ+0CR$} ADgXcg diff --git a/OsmAnd/res/drawable-xhdpi/ic_action_info_dark.png b/OsmAnd/res/drawable-xhdpi/ic_action_info_dark.png deleted file mode 100644 index fd864c66a0fd676e9701c2fbb78274bf6984b0fd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1584 zcmaJ>drT8|9Iwl|Zl-n-L$KiNSwL2ZR1Nq!g#tqU#Q~WNS-}yzq`HqB!yquC zqAaq4qogWbB|xqqae&EyLkxl%0W)DhO}Lpb&jc`4h7k*lArL~4rc4sSfUyTuy-BQ> zEVbv2`BEh-=u;GtgyCQ?Xb5H+1gRQE34(wT48|}>)qv!1K%qiVKu(WZuyZma@uI>D z0U%byXQ{(3Xiqmcd)f)rLv!v0)vNVn35QgJM zh(L@4L=Y?n;T+1D7~05rX*O!-Wq88j$R%vKnRX&G2Spu5iwVQ?EOv{@Vze1C+!Dn) z1F}K|7%u9YSACCRu~%ZrT#2I;L2?Vi;%FC?_yk3eeS!$&=8jYy$f)20tPqrEM9MT8 zwVjjrB^;Y434UNC&m{j64mgfr1ZE~6oM3PWp^aXMMkpF0j0nS+FpI_P%>>8r>? z2SXK}j}{kD=Sflrr)8)N*JxsFPJ50!bm`7USD`H@<%^coLrv`twkpL@b$kDtCH>!h zbB<*!tT^cUcIhMS{=O+G55{fW(+PC;M*X4NdC4IGEn$KmSYiviy_mc{BZI zW4ZP&K$#6qElCad*}|!s_|^;8s=DRYnAN+Vwl~M#fcoY9ht-OHQ;(c>w`^MAwP}}M zkE>6J3!k`ns-7RXsl@x=UHy3db=W6vCOws~5w)OTd}d9-sImajRj!zO9@&l10%t}E5OQDBm> z{LfoIbYl4vH>Fwzcb0!%${x}t_L}Y`zIU!@VCE_ud#58U)i{{HzN0Ydq1)B}u(EFR z3r|gMZIN{U@Pm7nZz)W> z?@20>$lp4*wB7IjG`6{Y`pz?(s}7`w-wx<~dNKKGOoHZWaAM~tGv+r&{^3qXvAx;m Gss9hq8A@CL diff --git a/OsmAnd/res/drawable-xhdpi/ic_action_marker_dark.png b/OsmAnd/res/drawable-xhdpi/ic_action_marker_dark.png deleted file mode 100644 index 731ac33b2bdd7057d041f790c3db0f86c1e637dc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1663 zcmbVNc~BEq7+=l;EeL8&MUicU7OlzVhFyppIWTAd0VhGUu*tr_3dx4ek^~gxC}0l@ zj@DWS3tE`bIyx3=(Xk>kY8fkF58JApA|4|+c%dRAN9~5g_7BHDx-+})eeZq0@B4k% z?1!nziT-}Ueh>utYgQ=J*j3pyUb@)dM2GRF%FytP&`2y0IV_NxgZVT zL~-GH5CcITb}~cH=(VdbBW32}E*-wpY-Q096cg*T;>LWyzy^>@TIAdZCr@)>l8|$C zQmsI1Re(HlMF|bkOOi8;CHY2_;KnY8W1JXkzzi51cA5(;Hq0sKPTIxTz3Uj^!jmdY zzMMNnO0P|Y6%-9%DPP7j3WO3k66Fh}vPd*?87yLDL=c6D1UvzXNyV5z1W!L))*DTj zur#H5+7~Oyxp@p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!zQnWk#W?Jpw$P3&HERS|1Vn0`rLiDZ@gnA0t#a=JiJ7n$-@-Wx~I1ET|o@ z*ZT#mObCc|5(nzx%!q+O?jCO_stCMcN+dTZ3hOb6T%A|&$rh6y0XHh%%`>Ey=N%4; zLe&&SqBKs@C{6QfloAL*%Q;BF>EL5L3*qxMBwav}#AoC)Ncvmne$?m*|I$#@VXFSru*{F9rjv zqh*?l+9XKstpZ;liC%a%&y0HkA84Fb6Hbysd8by3ayn9tvN+431V=eEtWL*kDHfT> z^Zz%07;p-UHp_pSCw2rnGP-><3P5-?Oo9(gkOW4h&eFIVg5sturhI$o^dI~4)+>nT zhxH$Xe;ZUK)n$hl|2ls7{7ac5Z#JmH%)RQXr?FGV$4X0gWv9udDQCil5oA2S%kCP@ zoL;dr;}{ie>Am^QbmP8A{khy9H`jDry8rO(nvn-*_r$+Yr6_j|KG8X-Sh=&%+kK

bi62P(D3e!zjNRBSX+t?&gP8OJBF1$&m4(%Vv-5+W0Yrd3}E?d-Iv8#_^r~ z`f{w-q8KnF%_MymM-3_`A;9aYYD&2E`}Opp){dD%V^^mu=lxsvsRa4(=tlF*driN5 z(Shc4v=Itv%xa$LZ)(d9zP4xRyXuRd%U}Mj+;7{S+WX+fSjVP%PZQagRl;EDin~9X z-r>@w4rCyT%=_5ID*`O_ZYkXVs zrnj4Wv=*^Q`|0wh?S>!Tc(RSV(o9smcyxDnahhUj?@1{V-ki8MeLDG6-zx7_Wmp_7 zk9>S_%Va!#yglvq#Ij3~_OA9THKm@nCYsYb6)RebO|NX|Ir^}rVF%*6e{bwaPs`MS z0p8k>+!x>2Y)M~IQj0YaZ2diUl+owCS1|KHDoato4O5E;eP;)dKzi~ diff --git a/OsmAnd/res/drawable-xhdpi/ic_action_parking_dark.png b/OsmAnd/res/drawable-xhdpi/ic_action_parking_dark.png deleted file mode 100644 index 92c3f3358e192316972794400d095d84dcf2b858..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1353 zcmbVMZD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)y<{= diff --git a/OsmAnd/res/drawable-xhdpi/ic_action_photo_dark.png b/OsmAnd/res/drawable-xhdpi/ic_action_photo_dark.png deleted file mode 100644 index cc841eb7befd75dacdc73d26c1b1035139de2e2f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1525 zcmbVMeNYr-7~eSM5(0^o@++2Q9Hnt@KiK=&)zgl<11{x2JmtpFVL#r3&AZ!kcY)Kf z1k4GunH(p|k4nZs$kfyvHRXnj5N&Ma#vH@ciApOcMr?GNG@RN)&icdgk9KDFeV_OJ z{hseD;|HJOxC^?Nq67SmMN;!t1gjzYCS6h$R@V1VSYx4;2TMu|#Pp!@_I`BMdke2*l$WMJsAK_}7g`q7~1Y z5WvcTBGt;gRu5lpf~@84@rL3+%^Rjv7PX?Veuu=@20&1CIjo3wV-Q4vp^SpSaV8T= znoJZ*;}nh3v_PUJKma4pQNYIu2|bVEn{l(rX0%Wi61NeAlcEXQ>2TV}!a|&)NHdw> zx`K+z26>RMEo!#MxcQIeGIklTsw8_P$)D(gvKmR1lo}}n+wG%Ohi6xaK|!il^5SKB z5VZryVjU0)WhnrU=9v*6;e*9Y;JAg<;y1E9%3CNO%K0b(<$d`^A8+AUlZ8db_`?6q zAEr5l#hc|n&67CNIx@a}I0~BZaF{?)n;=;mm4ZlV3j`%ib~$XG@OMMoA}{G|84b@& z&S{#usN>yabX`O9Vk*!7>5;6QJzp`@U>+wI+wRUWoNQr$5)Q zuW9}_)->Q-wrSI~$l%tFbJ;VGW=?4>u%v$;e9IO*2j6FR3ZEBg!MqzyyR_jshP{@hawAxhq_KD58R2}tl(-oW;S=&i<8=j&h$B}hp|jk|CPUX zyY+t-sB>7QCnEi}=%b~LD=rmv`i*so zlW)TKo#O|Wv%lNBC$=3TF1N%0Q~Kryzs6Fw7Z0>wpZ@ZYdF1F@?wh)~?8>~;_uL~O z_TyX|*XrA%Yk`R<*&E4O|Fd^Tu=D1Ny7f0!Bn8q^rJt^R{MzR1Bf7u;=-yHr9WB+F cvu{H>=;`fpVQbne1@RxT%jtF;D5z@s2cKCcF8}}l diff --git a/OsmAnd/res/drawable-xhdpi/ic_action_previous_route.png b/OsmAnd/res/drawable-xhdpi/ic_action_previous_route.png deleted file mode 100644 index 71da51f44d9bbf63247698193b281911a81d6bc0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 570 zcmV-A0>%A_P)O` z!!Qtre-ICCpE5#6V1$fNCWtp-1iC>Pfla~&MdcABc%YByxKkZ9bsg6wacoQZq?48A zQvH9<=QsfdhKNdzCyp&0sW~TvMI0`SxzKkxB0+uTH5Pu16 zpxn0-f;Qn(iFI<~+t6Wa@l2-`*=pe>CMG5ZrT1p83vSql_95?sUJ!sggkz@1U^ht! zX<&g72x(xB5ts}(5CihIcB{uAgzkZ0!W+h@K(?!pETcii3u7#!L8~yWLJqQj5=#X{ ze6~|)l&!=dU*>q{Y5SNZ6*@rwN6WxnM#e2RckBZZ@lDUlGXMYp07*qo IM6N<$f}vFH{{R30 diff --git a/OsmAnd/res/drawable-xhdpi/ic_action_ruler.png b/OsmAnd/res/drawable-xhdpi/ic_action_ruler.png deleted file mode 100644 index d1a65048ba387ea9c459bee80949e2ed80350d45..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1216 zcmaJ>TWl0n7#>jyR9DLk@`^4sZTfn3H_V-zM91VJWL^9^Ctbss-=VmuEox=SQ7Y#3Y|y^ z3#3ZGC{&INdW*zvMQ;n$TY-g+NZE4`qBCpf{i05bOY)VpN|n?nM~1? zz?d$C;05{oBCsDd6U9;{)nFhg30d;IIIf0vL<{(T8cS+N#pwV`1ssv7&|&qctZx~! z+&$b;tjO3{J3^Ng1y0(;newntb9PE#UlPbgmZl?AE*plZ8ipnUSpy;fNEHpNVBINe zxKc(foTcpbw34-LV4J;ZQ&F;dTGK(Vrpki@Hc0E4Y|A$1M-=)FZuxeZ@1||$p|(~g z#E_D(NXTTX3x>xDCDAwu_)Mlzb$;Wh>myQ)HpOLHh}y=XyC0*$ka&C}&z8FcholL0 zSTR&l2M~(7rkNs4s#t{3ab%gvR4pkq?a>4ITj*0JVQ~a4I#$_Gq2l!FA_7S$Dhg&P z1-dF$psFBXKx{%&kQhZNZk-2OsU>3l86Ou1gIyL!3;S%ILN++R{C#hd4c(2LJy5LO z{O!GguJdwt_VGJA@2>f1-SNHir?0oac_5Yk`n6NHzFS?`m@$N(R-QSx`(1Q*-?Jy4 z?iqREo4-oSe{Em(NcR?wE%O_OA6)^v-%(!w;Iq9Qv&Y{4V({~>-9Nv7aP6)iPd;}I zbUqV)J6Ak1I%5pY-rw-)sl)!t59B^E2AH_@9!?4%u_*7mxl2cVvx} diff --git a/OsmAnd/res/drawable-xhdpi/ic_action_settings.png b/OsmAnd/res/drawable-xhdpi/ic_action_settings.png deleted file mode 100644 index 3972159d46adcdc8efa2d7dac95a1247d19e675e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1746 zcmbVNc~BE)6kiSj1q$e(1yR;ut;}R|EV)fYav)JT#8gm5A<1sY3dzRJk_500(sJoQ zr_r{cRT&)wRFpDUTNuT(D2NV47)L4=@q((TDClTuX*V3Ue>ncpo!RgE-nZ}f-tS$r zB?)n>edh$v0RX^P86!`mc9!$?@}Slv*EdDf7DOtN$ql%Uw5kadh(d4;3MviibTkoF zBiY+8qhbJXvtX)ZGC6jgNQ)a7YNrmvW-w7`01!voOloZgN`e|R9WzR3&zf6kAcjb2 zN!(agtVxFIv6vhJ-H;Qf(&l7ng$ONjB`CIuC<6wRRD(7{rqL|2NobRHMbz1O&7^^o zDrAO)Hbp8qHUX631PXE)JV?u8b3ne3!RGS#LOvaYDVfO7G6GeTIHAJv%$Y7o(BmX-*5f8nCY!7} zxI76nBDmEY?kv+()N+)-EGQC9;0ACq&m!y{90V+`R>wv(5KFB=Ay`MnFNi>e5C`V6 zSP@(S!bhq2r|`)C%^#B@#dJ2yf0}3Jit0$`@$D#3!rNg&jno7Y)Tms4H8B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57ERRM#cf&QFKWU+z3z`_q-pN8F1hRu6t25xAooKwe+f-yYj~y~(88 zKad;O+?6vUr?0y1Z&#tCc;g~R;_}LKF}+zw-|Rj-c%p(aMV908w}mE4Pwln}ZnR}? z9F~=QR8u#>#~nE{t1=?~lbEl7!zA`^7+H3{v7@!>59ipLt^E%=R580Ex0<#l{l0#T z8hRmpH@Wzcg&bdZa5TLuvvMqQByli4w&7;`?EG2H+f(?Cm3LNrRB04dZNB7|dv7;Z zcxE+TkG~b2QF--7QS7|;Tg~I6_=u@@aeXpT1^t};=WlZ|CYC2~_jmg8R=s@ZYdDNl}nOFQ5$&m6v*v$r_`yFd5JI_&~=yL_qh!am@* z*;FAqBFB#{G2gY8o8->fY)+j?@-_I>{VrZF6% diff --git a/OsmAnd/res/drawable-xhdpi/ic_action_video_dark.png b/OsmAnd/res/drawable-xhdpi/ic_action_video_dark.png deleted file mode 100644 index a3efd505850adf503e62354acaecbf1eba233974..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1292 zcmbVMZEVzJ94|*sy>lld&ILtc>BK;!*Y>XMt<9Zq*Y4!PZjRfiQXTQ^H6r8eT0VJ*% zd4Q%gX%J+9q*V8Q526UNdPL3kJN@Y{UN*F#$JBlP8FBxg0EqgN8LoP#nh*WQYibaHxUXRo#&)xNf&MEr`IDE!A{X zLq}bUQr;MLVi@#vDFn?-r-r|;NDQXc|>IhJh zmZ72bJoD-bK5!%#q6##ND+PwZ

?ZB~p@cN@nw6DH2f_R>B&1<^Sf7fKCx^v;3!d znn$oB-R<%yKw){9fDR|ff}?Wa=ut0%tlF9qgZ^+hna=3THV)WN@J0Jae zwC24Y9_zUIBX(%wLgd4F(-T+jdD_jz-SfV)^LOmP)tLli-EKR77kPDH&zbcL zzpP20y*zj8Q&Hc0|MGby)|Gv8?sj5u!m~To{ZW^EJU71XG-@ocSfBju>-r|o@tp6# k_?GRfmZF-Oe*CI;9Ws05pF diff --git a/OsmAnd/res/drawable-xhdpi/ic_action_work.png b/OsmAnd/res/drawable-xhdpi/ic_action_work.png deleted file mode 100644 index 254e193254a585aca5bb1ce52b1a556a4bb540f4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 261 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA1|-9oezpTC&H|6fVg?3oVGw3ym^DWND9BhG zq<`*^-4w3u4L6@?IOO)5ZArWG`fjp|M=#SA4Trb?iw}JM zUudts=4pS3j3^P6*4lN+U`Y1Vp=rQ8`R@vpF{su55s)ffS=)JxY>Y$O_4Z>_URpwm>aH zb;fq6f>({U)=>ww;8hi|3W~Nx9S87gfljLk6*?jyDs}^6`@``^cV_qd-tT*#=e=i3 z^hpU5yo0=1EY<{VBAUXikmnu8VZNzvJt=0EKw6VVFCsH&r_q74VlmQ$16r#w6Hmd7 zSbk0e9?4>{^9Vy4ou*r;G?P}L(W4`DS?vs(#fpq}*^TBboCZvICSg@-2z01u~2v)mJ_lnp?y-XC7GSFqTgCZdWTCJYAhP5d=1^?HL*J@LS zd^--N;1rqbFf;YY2pI)4xqGuAk0RrZGTA{eMKNZhq&e4$+h{GS;xjiwjKGuh~;uvVG>~ig@_3qha{N5B*#nwvq=Ukzpba%{Ca0CB5F7Dj6^tYy=R?1cNbjQu^p+32o{II@!>b;h> zy2y9fPgd>n-%!9y-+XC(RF*ZU$4|4IJ3FRg&z8RF+c{O0@YT+qHq|xfp)0%|LwC-z zjv>~!l|1w)G|(`&7Yu0eTfBe8+N}+9$^zDZQLscG;twy&#jAY=v>b-o*cx@@=b9N) z*_kDM^@@NNZr|kQ2ag(RlQyMPf5(;(?MV2s^R=vj(3*aK{Wx1;@tB~U6~tBE{Fpf| z&gPhevd);v&`}(oIMdyDX!J^MGQuG-%LKzdn))&DWCmUx`CS5 zSU<_dtNA3{?z{Z@=}U7hEb4(y$xFP{76>&K{w`I-S&|DT20e$Q#{}%=TGG_hxGQc? zv`^Fc=WFcOkB&*^?Y@j|aet(Dul4rfbYus$mPPa~{_K{&w%>2cefn5)L7e9HZugR! zL#%@dXExz})-bhoe$K!j2}J9r<2kN~gl+B`-I1?cUg1TJ%B~x=frrtb_@@u|uj-Yy z&T+rs2u}&yQ@7?n8y^}{U3_lZ#-SBLjzKh&s0^?Sm~z>{Z0?0SA9D`|SmuSYPX<4n zaku*PBh$2g*)Pwn7pZGt)rt#uzw8ilFBUJ{aNZGS3U7)z`ptCT=3fhE=*QbWUsJ?? zd+@^MB67iA^y&J_A;ZRsNwXhn-;cVzUEf>L)Jv^&6JE2HiJlPO+Ep5IP?ta0} zE57r+SI|E0m6^Pr-mk?0U9;RDv^+S!XpKAYy~oaT``d=@jXAOFWcS!>QMRYq5~N}Q e?^!Zu$Qxp*1bMQnpH>|3{2sKLB(yRvz3?BrH+Xaa diff --git a/OsmAnd/res/drawable-xhdpi/ic_map.png b/OsmAnd/res/drawable-xhdpi/ic_map.png deleted file mode 100644 index 67eb37ac500808b3b16d5b9ced382ae552d2ac53..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1506 zcmaJ>eNYr-7+;k^z>qSnbZA_cN;3EM_HJ+QcHQ_kG^?`906? z`P#;!!o1|9Nl6HTB)jvSC2%!H--LMhEgyMjDO@J%t_r^&2>AmLjUX8_LIF19n-sj~){kI-sKa z?ARcw3QrO0P*i|g3^XnnNeZv)D2Xg(5k;P-Y1~B96wVka z24@)2gwuco7J;XLmltDp9)veLojGKVi^*}2G)cOsY|2L4Yz`x3by{t?q$!4V%bL!~ z0*LvRpzk59?V(uKp#n}<)G|e>iFH9ywW2FpwGu!bj)AJ9>E)6vDnae}Xqg71b^=wJ z2gF=e@uLHIW~B#kuz7*aOwktHY$E~AP!x}IoQ20JAPOckW94Zc#xRH%@5|p{pTZLu zM<7Or7@ClwA(%H7ab1R3$C+nHS!I&;yu zk%bv9Uk;n|#-=7Dc0JjsUbr?TZ=BVIZ#JHLcWnze)7l#eH8>~K&Ls$1dxBC5m=Ts(jwfJ6i z9bYMYaI3WKSI~(a>{v0nKq(~OdLyNe{BF4`W8NmE1urSLyLjjTS>9Znydv_maIj$C1rQ;(98K)& zoL5IK+Yo-~oyF5;t#8-K{S;JW`8(s!=&XtikSSzC%p6{ij8{+k0kbEn4Z>eWciRE>(Usk2w1It0$W7y|)Uvm$COF aWE4{LP3VWWmr>QxzpmR==-ir9x$r;tmM2I6 diff --git a/OsmAnd/res/drawable-xhdpi/ic_navigation_drawer.png b/OsmAnd/res/drawable-xhdpi/ic_navigation_drawer.png deleted file mode 100644 index c3b6da663666e93760ac38feac6b4852a88efc73..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1095 zcmaJ=J#W)M7&cTYsL+vtPOdvp5Ep+tJ*%NgVwXlDrAnhVNF6xam&9u9GxoJfJ0XOG zU}6Ia#0p{nF(Jf25mN`7W&hRVf9|mDEVUbSnKWq^#h5F4#KC+eKrLLu$lJQHi)T4*5?FaQk`5ch!~pVX6Jela@R5C9o+K6g7Ew8JAwDTg0QMrrD{~hZGT}q#>?A_b$5H+ zg`O~XiJ$G6%s_xC;(I|SOw3+E=-V~fIlUGIzOO>p3&J3%MsZ&Oz{BQ}(TkJK>nl(T4#iWAJrZh4|vD@wDx@wNZEm4LL zijpEK3Sb%_*$OG@fiRiMELb>kV?Uxk3Hj6_a>xcP2rSY;3PDt@?i&u1VWC*b#2$)7 zIVXuhkml9bPG}AP593hnq`nnlv4#_}5xcA(&8ZB`YIn4wRFOqvUX6X$6x6YZyAj}! zR;+@+UUHuAnVRl-j$;@=F$@hrNrM1FPXPv&vFzh2r@ux?2R{rii_<3UO6j+;o{b73d z`MuBZ72_@UF_~+9+51|by!j)4KTPS$*3RRVNiLbl1mo$kPyU(X9QW|ixgGB1lhKa< RZ1YX}TCo?c7p3dB{sA3^R)GKj diff --git a/OsmAnd/res/drawable-xhdpi/ic_plugin_srtm.png b/OsmAnd/res/drawable-xhdpi/ic_plugin_srtm.png deleted file mode 100644 index a103242a3f522fa8bfc5697a689f7649a7e08fbf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?Yh941GTDZ?q701M~{JT?c5=5SI{Jq`>nAQ`|&nk{yeckg5a z53mp@FI%F4G!6xsZ^%=40uTaju5=m`9O+C#u~7Z3SJ!6UXK1KY7tV1=<^BJJ!1(d?*Xh6>#r&bTVIQf}~c z{!!hqI7U8gy}7SjA6fZHUX(5qBg1r4W>hVXx^%eQ+wlmW*B_Oxz1O}d%6i5tNb5+8 zq$?9F`if0^vNL#{`Js6*Y2A|Yx`U5zT@w2?!Dz37ghs|-L)GR za4X($t%uFCp5JZFSmB*0W@6q07;nEpKVbXa4pe(Satv-DJR#f{lVbNukZDC_O3mj*uXxO3rA^va>?i_McK_6$JT z?T=BkH8y!d+o_0Kq4n3JheLk+C{k;$I{l~V$O1)8#Jc;>d_}X+cxB)4vL!I3<@8q5x-x%Ua+}<$W)R+~?efY5gN_aZw!_dpu%~glKoL+B0n{-1l zS?67-Q{J4{eZybcy|*qR%Q|(9_yl@wC&b+u`egZQiI3A(csC@Tn_-%A#s`F5$k2Kl zYxk$9{gp?y3?|Q8I1 ztBWYD{jM}*i+}mqX;Zcz@TDS&zi48)Wo=cyUEe5IMdLHhsCJbnY%G5c%Ktk2!4FMG zQ^>xeGEHxosB~X;lJ`OE8pr(jh|c}_Mf=u{+rPKBx_s`N;OeP0;fJ~o72TF!Jb-5B z@=g$OW#RFL$C4*vr?JhM+p)UE+A3MeT$^+pS+*$u$&ogDPs`x7gTuP`=xt5AS|4_v zpIOoPpjp$h`uExQr*1y*bRaS(q#$uEuc@sCK3(7Nde^za$tj^r7i>j`R-WCe+_SDN tFM1UrdU*4$Gx-WjNw7Iob;IvAavJ=T%9NW=_6B|e>hvYbZ`1P1{{cVrY$E^w diff --git a/OsmAnd/res/drawable-xxhdpi/ic_action_compass_widget.png b/OsmAnd/res/drawable-xxhdpi/ic_action_compass_widget.png deleted file mode 100644 index 896382de6dbc3e9202a367558602849e8653fb80..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1229 zcmV;;1Ty=HP)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Rc{P)SuL*(D4eZJ8-{ynMX9mviCvu z@p65sg(6jVV#xDLnYX+}eY)5))vximpZtXSv@p%Rw%5JMZn0ULmE$@AH+R8=%1Qp^Kf%e+6U>x^EeOI z$m9l{iPreZ0DD`=aq=agHmfobraCJG^=oF>$e!IBXbM+F^r8vJQ{1E8@{+g~!g9Qu z(2iW~nX0PT!_A}lU-Roe6;>RxzE~|qed5D`^rm~pn(L06X+P4m)T1ag+mlz9Uj=xf zI%;JaC*L;X4+DO3ckySMq-e|ShODu@2NFv)BeW;HHoik1w8(VUQ?nkq@T|?}a>LaX z;TjRF9i_qO&e8>4KKBb_-n7FXSyoFJ>V>V!M^C)t_Yh#9io zX?-MeptY@dW3u1C){xSds10CEtF(Rp=VzkZ1%Ij?I}NB`jZq2pdaTLNJA85~;Bub{ zQ>(xET)upG_(A96S5<4)sZML%p_NwU#ceM;Ok#~@A_^{KiWD~a2HVpsqqn8PdrpY>YwrYqT#HWrEX5r(}3(z?|&oR zofoO())-KC5k{UnUaD!YhA(!1Wu=1B7~O<7ACI3Fe?qTLE!`D?akL-P>B&5!T9QO_ z>nOoG=t+h=pPbC-C^IM0_Zk=|a?86GCJY7iGkV$A54~KZo!MB`CwnsOoAHPF(1#am zJDw)pYc**=T4}d-O??bM`_js5&>@>W@J#>IY4$)+N_eHbzPJPNj2E^~i3RugE;k+y zHu-y(I;U`!o4ur^t7JhRt;MZH^m(|VF1)^Q+pL|n^1X1SP*<(x$g&i&ib MyaTBxC>!Pf0Rt06IsgCw diff --git a/OsmAnd/res/drawable-xxhdpi/ic_action_coordinates_widget.png b/OsmAnd/res/drawable-xxhdpi/ic_action_coordinates_widget.png deleted file mode 100644 index c3c416f6d159d295ad8b2aeb660fee5d60861904..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1773 zcmVBqnKhi(p+^O~Lb8LiCnZ^ic>zrTUd85&?X|cU zUc=_B!mP0snqqTCj%$ywIb5~~W&xU(P6GE1#mDv~wp_a1Qr^M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G7k-Mfhlkw?%p=&|$8dF-;9>Y08qKXa#qOA3|Ml|`a!eUCLvID!`^N(O zjMqs3p4Gpm;OD0p%p!cg+!2*jGcd~?yjrmdfT8~pNF`PF P00000NkvXXu0mjfhY&}J diff --git a/OsmAnd/res/drawable-xxhdpi/ic_action_copy.png b/OsmAnd/res/drawable-xxhdpi/ic_action_copy.png deleted file mode 100644 index f6155536f790349e0676fd0547ddbf905e2d6a74..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1374 zcmaJ>TTC2P7#^S+L>n+ZwIpPiHj%c>&SiJ5uv~VR%c@IpL7~=wb2-2iW@ecgy31-J z*pk$cAU3vCtp>}3jS+7&(O$qd(GrrzYSNHYEE+Fqlwy;n6kmv*S$44xq?62?bN=&v z|NWoW8yo7j=55bI5M*n(J`{y(z5C`q48PAUPu0O?n^V*3G?^VvT(SUCt(r1G!@AT7 zqCisnd*?tog5(_5np>UL$TOm1>K@6(coKRHvJs@bG7*!MZs4FY=+q29cKiI-7^}5mAP59W6EuxO1a9{mj+DR+dq+k?2-u3H#T?BvP*bv0tskU!X;Mq;k4}Iah~G5IOpSlDtUcghG(%fU%fAX>wO9(FpgNp9Z_a! ziBfn5R|T(xQxt$H6&M=tkZ4L3SP5_vhY`?4!fl=VS}7xf{poHu1_K^8Mhh5lo-8;x zh2kR(2$B^GhpL+sKi>N3lAcW!3`u2y(W2-UVW=pudmQdQJ??hU^`cA+;v`}CanD2eobestH}zrS(+ Pph&o;A@oV$rPuxg%{|xN diff --git a/OsmAnd/res/drawable-xxhdpi/ic_action_delete_dark.png b/OsmAnd/res/drawable-xxhdpi/ic_action_delete_dark.png deleted file mode 100644 index 151538d1baed7c092a10d96dc037842b61eb9d3b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1264 zcmbVMU1%It6rOI)zc>5X833h@QjyNccv(@cQDM3qj{@dvQ$6~?jr}P8YXZcGRUek?FL#kPBnNnd=AwtMK(-O zDNbz!HIW@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hG@m4B5i#V(^f?^8c38Hq9#I1sA8k7mJ*w45ox5c2C4@6qoy|ASy;*s(n)6SJ?DPs zaldoUyii+Hm7STFi6BUJpxR#t*J}H9Y=Ym1e;=uW%dJ*L*s9kfR=Z#Tq)gUDfCf~d z3Df~W?r8lQ6eCDlw-O3l;oyV3q^nNB#yI0@3|b>daY;NTNX@`PMbM;ZUhL1&aST;t zFV?^Y$zaR}qDpnA0qQ$zLQ-e5#K~C6{b+HVhYnO=320nx(M&$>#S(sbxVO~=h9)3Z zvlm-QDjcjueYycq*6G3}l44Ld=cHJdn{(fb(oiNy4?&YS$?gTZKq9O3Ky zm8-F!B<$9b{#N=FYT!L$ z$#i%@l30P31Y87e0jDUy;3Dm!aghQt#mEvR2?9pI6bZX^*0oYn1^d(9t_=nh)$XpXMealHoAQAwo6Bcr{)%(MM{y>Ezcn7 zC^9?vFTQhBD{t#X-@nDyKwXMs<+$4hToYc~+W*O6feC{zai}?HJ zNpt?tf46rjj=9|0snW5nyL&IROrHKlx-tK^fg6@Sh`)DJQ^C#`H|I^h`B&9p-%`U* zPeh5Xo*8U3>{%L|p7nlt{;6-XjzpJ*%u_kTn@@zzbFc5n-FBv8;O2ShL-pJqG5W>H z^tQf_`}Q5j)XNQXkKD7k+=gH2nPRGk(kDKhd3p#P+?H-;gbJ#MHccE(na$aC_PNGC z4%~M&>y634W2`;*GKKW;Q r<}E3mnoRK0y4~zuN5<#FuOey4OY=2T%!RyK`%f6CsPTVP-ni#~>Qmvx diff --git a/OsmAnd/res/drawable-xxhdpi/ic_action_info_dark.png b/OsmAnd/res/drawable-xxhdpi/ic_action_info_dark.png deleted file mode 100644 index 957fcbe0da6dfa540d14c63610d3e271858fb4f0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1939 zcmaJ?dsGuw8jsKr5yjMkRB>gDVilasWb%MXi6oHFq%|00D6IHkUc>;I3CUmrXtx-( zq85Tm*IKO{7S!%JqO^#suG-Y1tJ{_Jv95{o5^H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~HwonE4UG}GxU$zL z$gz8&-^~srd@PJF(>F*aRlQeH^%cM3u1~#-e5K;HPraWLeLi(3C$9U{wd4a}%U^$^ zcnB=bDVbUQZS>QV2g19hF&|yfCT>_2Jvt_MdatgsW!Zc01eUZt6HGL3(p5g~SFbx} z1?KHo)YEYUnPakE;&O6p?(5$)qb!h<;6fJyXXI#J0 zTu|OXkFSruB+s9CGdVRYQfbOn(8659;`Xh{_f?hJ`2XZAvHW;0iP<$}x4C*i<-LCI z*qeu$wC8Zl% zw{eUAQ~$2rz0i+1i$jg4O>6F#quc diff --git a/OsmAnd/res/drawable-xxhdpi/ic_action_marker_dark.png b/OsmAnd/res/drawable-xxhdpi/ic_action_marker_dark.png deleted file mode 100644 index 22447028131007dfeb24a966137de4202ca1f0d1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2078 zcmbVNYg7|w8jj%>L_jErQYzyRFQmCnE|@@sKmtSvL@vTYu}v}qiI7Z41`@(*G1}cO zUT{S~1q8IK$O6`4@py&WdQe#vgtj8kWtXBr#e&=FBCy>Fg54jU{@9r_^L^ht&-32j zGk=oDMY%5ZT}mJjT&2VN}Zi zh+8wjnSumyGX^Yb z5FRR_GZlI+LN*+Txl=8?glB zS2x~>HYOG55k>-HMDq+PydIeWi)1`^zir3{#Jv&38#H)P6ggs4m8V5?m{cqT@h@~( z0}D7@7*;BIJQ~E~acF!dhfm}4VTi^i1%?`uP&8+;3*>4PLyc-w z4@5-FR~^`pqS3*q$rxxW)2pb(h(VK&z>x-23(V(Ppm~E22$abVf)reu66U}(9-D*E z6biPI#)mW6tjvvkK1-nj7x?i1n?DBb6vNgm|I<8+BD^DQ+t;IjA6^d=qQfW1fRD;w z8HsEH!G4oeEJ`vzeDdC4OtNTsXi7|C%kdK*TZ{h&bbjLAOQOyIlno6X;XV7dQLfMW z(6@jdFV<2Dy*7gs%FFif`{Y~DhGpZDe_G>@X&fyxt_PMMdQ?4kCD(B$zx{IrsuV#4>{`H zRz}~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gQgxM@~gL8YIrBrHg`YlaiQON9d^-sfbCRuyHMp z@C7)oRznbr2SI!m%;Cc<7{+-lh~N?eOwA`WYJAGhyYR3;$Pq?LB86O;jLVJU3t@>^ z%;!rWS)@eF;R~j)F?th)>M>%7YO-S^h(wDG|*`=kiS}(3>~SMCj=bGSaQ`4dZe--GM{Ga)QcsKLJ zT6qOq{OMr4PP|$A`3&=d&hFMVbtBCU*(XBV+uF{LN}j!Hy2oo68I2fyXuf3aUs9($ zCiEEZSnc8^6~7+-M_oL!b5mxAWIK9lUl9>I0IVXoU7M#40%od#aqXcj(1zcU$&wV?%fxGO1X`XJIspD}U zBwQ`81(PZ_UHQFlefufC%K}l}aD3;EIzWEqFM%aUA-)}+XAT~|ojA9wZ(w#JrnX1e z{DwAm#%*#6Je`6qHouiswGPYiQ~AxZ3%w8aVoO`L$Ph`!@cito1J|oPGWSPhl_YD! z%i8^yk@-IL(9>wRr80EjhYj70HN4*9>$|Q-Ltv3h<6`gV?;DHK9~UnPXd8S+D7)(U zsRf+Dhe=6{V)M%H4?&N*R`6zOve+Gq)cZ}h?p^$QUacnP zxAFRGrP0-EQ^H+gY`Ik@_srGp!|DgF{PL5;dhIOGMIJ zmTPsDy^Y#e+wYu%dWUYF>x(tF-z>MR$mmV2Sl6X2E_xwsTh`{OT6BR`;C?1@{En*b z<(k^VU)-zOnV;P2_;F==k@V)uR{Wvuqx-vq8bhSH0aYW)tkUN<DNw5OpFrEzI{H&n)^KNIJ{|ostW3wAkwPBBrj(yGW5`@d5Av;F`8 diff --git a/OsmAnd/res/drawable-xxhdpi/ic_action_parking_dark.png b/OsmAnd/res/drawable-xxhdpi/ic_action_parking_dark.png deleted file mode 100644 index 53b09f0cb7fe46efc2181df4f3de86139ec5474d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1526 zcmeAS@N?(olHy`uVBq!ia0vp^9w5xY1|&n@ZgvM!k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2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awable-xxhdpi/ic_action_photo_dark.png b/OsmAnd/res/drawable-xxhdpi/ic_action_photo_dark.png deleted file mode 100644 index 0ee68108902ead61a222148c9fd797a43ce19bc0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1912 zcmbVNc~BEq7++2i#S2<(6kHc|aAcFsovcKO2{93p0)ocTRyN7z5R(nbA`rl$h>Ev@ zA_zn5;eAZS6I7fQ@fJMlfpsdPf~Z&p1P^F8Ahy$S{G&Uw``-87_xtYOY;Lq_nx8Mt z7XSc1gfZ5lvW9D zG|3${e1=06r*$N1g*s@;WH2lhr3{#H5(87s3oLdtRRs0eMX9~(m;r%3DrBMv>J3V* zj0Poy4F|b&9;`)}9FQ-hGr2szkRJ-ND4Br>7%T)vgeaGdA}sL315w^=Iz1XIm3{C< zNg~Kdl2(+#NJ&Ydr?BaS&A?y^g+d0xVz5{+r2*U1EF_i+TkOGo7NodcYcp9%6JY^e z7BLNxOo|{X(%uxzR;BWzVT=7kp{SBEQZXxoNkdZic~b{*ESQ?6l{T%&?cL43#pKbAnJy$GwDzcSEtixcs!WJ z<8fdi!V$tkp^gRfa3;>xYB;!FqwBNtNqhubg7Ab~0Sgf`nGqbZl#fURe5sU$uw{G! zw-2kZ*h$Qy#ru4lT)um;oX=uWi4Dg{!WKsm3;L!Y+DMRu-AGtLiKM6NV8|?!MMtFA zC%D?wo3#|TnHJ(YnT;@mJ#|J+pNK)gXCjDzMdi=Mw6Ipd(Zd=&M+a;5Y_47_&|o|P z27SQm{%`#lR8S1pu>5Oy`i`iHbZtLUff7EF3Aa!TvQbn~m)`cE7`R0t700F4JuAK# z86Oi+U86kyrO!A{V%+9jFYnj+^Vi3ixU1zuXl=EHl6M1&zGwq-CUWwYK#tqlE1MLw zZDTg-4=gSNp_~@4lbNe3MtP=`rU#{$p4G#hLyoi@?&vP*QYV&X7ixZPTCvMq2o4E% zmjnGlx3O8C>w#hZ;qD<_Sq`U0-Y&gUAGP#+^W>(Xae>!r+)2Qp_jk6}h8&unSNTWn zOk?%3aYu&HZu%I`H+pmz&JT~TRT{Im%}!f&R}MQPqqo*)KDTXr?F_x)SCYk(9G)QD z*XZnT^l4u1J094#xJ5iCHmGj3c$#x|NtW^Pi8A2I#x;^j&J+7ZO?xA(=ZdzmQT`Lv zfU*^;lE~1SiM0{)8VV=8VP+<0=Wo>0etraJEZjOP0 z?fwtaedfLh?`H-$XCfQcJ?_eTb-JTgmX{S}XeHm>ig#1_lWs*zyAO^(zIWGD_qsFY z5n+kU?68oXe&wB)rp|JD6})Y$SY*suRXTS?cl@Y|^W$X6w18=8n;S~If-*%pXh8ai z9N@ZJ!;k8M+XD&&jo%Lz=*%Y`Ubr*xC|(uiPMeueJhQN0O%bt$PLvY9O$biG4-h6NJ68^*DiwB{^r0GP)o~dC~YPSuUw&}z5_M*}BZ?;^$w@`a-c2K%g?s2TXDf8tP zymZa>Nu%S(-WzmpVOs`$#>G>0*Mk%V*_;dSWYLM(=;txXX!G3Fo2z{Kt!kg#{F}XG zL&)a%8(RHaoh zjI)19*0NB~ho-1+`A=w9(u&~4twZZtjPEaSYwmPx@v>IGX&!sPp1a}d@>^}@B!;1} zb;1%>O=ioZLiW?c8d>-8+$!;ZC?T)x@=pNPg}pkm*S9mp^)FOJsHFR+CM@|I8C>$0 diff --git a/OsmAnd/res/drawable-xxhdpi/ic_action_previous_route.png b/OsmAnd/res/drawable-xxhdpi/ic_action_previous_route.png deleted file mode 100644 index fca798f46a83a66573df5dcee08bcde18250a3ff..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 786 zcmV+t1MU2YP)IQ3bFnM_yJP@3xbF@#`eYz#(F&Ri_YzgZD4KKnUWlx<2QWw2EPUZJ-s4&!8LD_n2P470;vCgR)r7gXty5RN5?@VZ6hhLI*8_E|R3=ngU&)l&kmn z9B{?IZtO?^KdO2ry>?PL{%uxOrj-TbFv}&rU-(X?h0}nm|Q@99p z?H$_)ViDOEE&_c3CkiWZERtdwIHuSD0s}Y;!~zj01E)TSMM{Nm8pT+`If7UW_uL|A zmqNwEO7 z6UB?{lSa3lF12OuI$|+@3NQ3v-Ru!WH`39u{VC_mNV7qV>a;RKnkEBF&j%pAzrg1?iSdF+Z(N_+Na% z{5Cs9?ViZ~c*jrlp33;pP%|YW8T(82k8Jo`H7(8nmTlPlA6O0zErHW^wXRE?fj1IK zL(7~gl7=;KqDUIn#6*!atdT;IG_0A7NE(EwNE(DAfk+yJ*N{jW1fdz80doSkIt2iB Qg#Z8m07*qoM6N<$f&xHbs{jB1 diff --git a/OsmAnd/res/drawable-xxhdpi/ic_action_ruler.png b/OsmAnd/res/drawable-xxhdpi/ic_action_ruler.png deleted file mode 100644 index 9a510906610ea7fcc991ba894ceff0c564ae7218..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1332 zcmaJ>ZEO=|9KRLR0a>*XVPmMrHNFsedN1wudY9I{^j6kr$I=xk28E}0Pq$m!yW{S* zcJqS^zM;qmF*;EBV8m#qF)`u?C5kg3Sz^@a3~>;nF{UGGOh8^tB=Na+otP|Ka{uS$ z{x84Z|K*G<8UkUHsYnmc! zDo!Cr)j?%b{bby*5XlF^Kw;PrDTo1<4-2BOiRAE^W+F7l07jJfpu}+G!b9O`mYSE+ za$+GCKE@nSe6`B#JF$#YPsG2H;cva2i!ePLL!yzCtArXk8 z%7HLq5wGMzD4$asewMQ5gDlJO5k`n~3oP5icgw6GGh93_b|-?I7;M-kb=!fuf*P?k z9J_8SB(7^K#VrIK!^#*&vC#$nLxyA6LxxGl=E;1RzuthQW7S2y>|0tJmbO-lzBm^DrB5q+FPT ztPK{Y;m4y0i7^pWA$Ar#B3ryxsKNwCnU=4+VbmQogPo(<`R-&CPab zcRhS~gKx#*%MX0o^5Oi8=US!jx4*nGw`G-Qg77qxHQ~9XlW1D*3i;7xBS&6$!2UP4 z$J^IdTh~T$4|t>Pn;tut86RzGJGuXv$mR7%{Mzub6Kn4H<>2yfKPq@% zVZmg})MR$})pw)MvGYGn6or|izh3;}&ab7tPf?2j2+#Z~?eQyPSF5Ljd;W*u>gUG$ z?@S%vJ^x)Ctv%g5$L42eZa8}4tz!Qt7te0}`_klR1FyZ|yuJR+&M(_m<|3`=Z8t|C2IU!;hXsJtJFjj@dU8% TK`DQ``yWg8^vUma@7nV(j%v1y diff --git a/OsmAnd/res/drawable-xxhdpi/ic_action_settings.png b/OsmAnd/res/drawable-xxhdpi/ic_action_settings.png deleted file mode 100644 index 0fac002ad8fc92bd610c4705ab9ecdf332b4b3f6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2167 zcmbVOc~ld39uGHyAhuwO(q#zsmBWxbWCB?UXQ%|iAxE`9k{KY9i)4TRl{KMOplU$` zEkZd(D^xk$MUX{dv51I@c%Y!rtp~7(fUKZ$?1aPJKYaaT=l5oQ*Z1@J-tSEo*Wbs) zXtNOpgE8@Cdj_F1Tk{&~qu-q`8hp^n67dR0f~7G?GEWX;Sdf$t1HNKjEF1*$pp=9z z*cF4(NfL&HBjFrBhCnKI;%Q`@lwui*#$a5xD`h-EJd6N*I94cOVqadogaw2U6B|b5 z5I8aqI8Mk;mBYcQ{vm?YcmW7uxBnS%RWeWlF^up4rC20UFqBN}GA{#NYmV_)U|9r- zXJS{33g>VE52+jms7^GTfIy@G&Y%;KN^=ICw*e${k0;RaBm#~AGN@z*fds5RSX7%F zieUtKdavq2cT8*?g2)(nd~$NKQ!?2}Dv!kzK@h|fNO%$nhf3fSDH4RI#7PvkYYd*S zLLe8)5TR58Xc&2XX(GbJqL!|>AeM1B?};Uf)j**k!z+0*Jkg1O7mGE1ElVqqAo#y# zd{9~uk|KlgL9jxaC>Nmlh_PJ*qp|yAMH)fW8b*Lzh$e+6@{|e^#jphN^<-kv8z)Ez zF(_0B;`3=V9EnDw;6MTe#DO40!qH$NOcn4ca10+>6R3h1BE-iLczhT~ib4IS zlVK1?AyEkgGL;TF!>Io&cv?4Xj_pN|#-Zv90K|4r}wn}|y z<1P$F_n5C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v{-9+_zMB@xhfpGY&cW z>T<18=G=9+5ae^$` azDuVpzEHcmxNkN5>vTFQ?SsWfyZ!-I4ff;! diff --git a/OsmAnd/res/drawable-xxhdpi/ic_action_work.png b/OsmAnd/res/drawable-xxhdpi/ic_action_work.png deleted file mode 100644 index 7bea54d8eb314fb6962b4a689677314568eea2d7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 335 zcmeAS@N?(olHy`uVBq!ia0vp^9w5xY1|&n@ZgvM!oCO|{#S9GG!XV7ZFl&wkP>``W z$lZxy-8q?;Kn_c~qpu?a!^VE@KZ&eB{u56Z$B+ufx3>ecm>dNdE*d_mvCPq%@rE&{ zyHPZ@@_q2p)FVdQ&MBb@0QI1Cj{pDw diff --git a/OsmAnd/res/drawable-xxhdpi/ic_configure_screen_dark.png b/OsmAnd/res/drawable-xxhdpi/ic_configure_screen_dark.png deleted file mode 100644 index b6a40f9d15534557c48d45dbe9f90e63ad6ce457..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2049 zcmbVNYg7|w8cuoTOeQ9S1Sl>h z70{Im#bdQtR4U%lrP4*~#znSR@q*lTJruDjh^4z;K-#KkyAuSvKRo@hbI#27z2Emf z&wD?!F;$by@C);!(P#{nQm&;|rRRN>PJJ`)98ac}-;qf=GM&gF3-vaXCN&WT6j0&% zTvUtdO+{-u(O4SIdo7lsBX#N}h>^hAdXEmS2(|Yd zbC|%i3YjNiK66T^P6cFy4F&jY0m}$-VL&KmbNK?HSQrC9l*|D|90+8AVua5_KnR$5 zn3Oe}DF@NY6*IOdNy0Rfq!rc$JT?HNT@l%qxMM1jpn)gvcz7EI;tw+(p|DQ}RaHjFBYK3`543vkpzs^k(Tb;CAc zCIsf2Oa_BMz=8wpAR&frb|Z~i!xQyfpT{7>`D9#I|X**+fyN_aj@sD+v!8#O9ffNv>{ z=JR`%T$?^ZFO9ly@DQ{Nd>X<(4ZET@lyZU;otg#=5$aqu-vq zcPcmT_V;sqyf*pY35{e`(^am$(%#+Yz^H{=omt&4d$D^vCRpg@8(9xUrylLNK3B(X zd#CgjfopA=e}ixtr&1g_zR**-Z z>C$#H*X(P4`P()Wb?`vZGFNW)Vc$zr*Ugo_YqG-~7bgzstB^l-XZ(ZKl$x(?Y*@jV zkcuA$|7Bqn@bTFDX)4Z0spi`cvgZu$JwX4me_P1< zRdXKKO|}fNr2~uZ{Sw+g6khP=@-vF=JZKA9lhUp2zW6AoB;nA8*a`L4dcVNK`)_xM zqI|F3ay*2>i!#E^>6uqMKD%`*p*eICGfzoBXWWTEE)RJvyT7^!3tXd+o$A_WY3Q=w z-rh4&{5i66xcJZNA-gJIXv-C5 zW^)npS+4s#ul;S#KsOige((4R`QU5X_RJ2)&7GUBVRfIhJQ??c%QSUaw{E;wJGxOL z*f%!kOT}QUI^>YEZ+r)yvbJR4QeRyEwd%ZB$kguYVY9ze=zAYDMr637+dcC>eNd5xubw%5!h{ zTU^;4DdM}E7MnX9X=tjw5aAsVI&wwl>b$9|J85F>ssI$pe_)sp_tl>338nixhwG+@GqZj;y-4G^sHfsdMO%2s&#J=5qfhHo>h=aN72Q4P w^HdZ5)zq=K8w4X_jG7i@*qe-bqMu&{X;q*^6ue}^GS5$0m86j$P0V)w7nu4gPyhe` diff --git a/OsmAnd/res/drawable-xxhdpi/ic_map.png b/OsmAnd/res/drawable-xxhdpi/ic_map.png deleted file mode 100644 index 49079a9e1b3591a8c4f368413cd06d31ebd221ac..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1776 zcmaJ?c~BEq7>{xYBGm%c8ZF%kR1L7%WOHs5Y#;$5f;51DC!6exq#@b3Ss)RL8ntS@ zs0vn*%Gg>v7A#;H#RFxmiYZ42T5Bs-trhBk1;w*g+6@r(567Li`}TeN`+fH}yD>Q_ z&VMX>EQ`hRSH~+g%pUK$eY}}x+MOeD%r==;WzZ?4p3cW9z)}#T7C>qfz6@vpPS}@U z1hZHykF|!>3_2rmu3Sf&c(@D0vzaU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cOIi+M0~!PXWLuHhqMAQM!*#nLkFT+Gh7imP!mFO;pRmzi(BmsVaq z=-GK@();k{RQ2hz3tvAMxvuT}(M#Nhjr)#XzJHTk{I&VO4)mJIJwLDa?%9$0d!2w% z`=#+4w;x{Z?MQWvy*v125iTUBO;8KEyu5fWdjHsA@MH6@Pn#nx{#4g3uKU8Kom^(N V^WLY;*Y74jhSK0@;nBd^g+Gk^XA}Sc diff --git a/OsmAnd/res/drawable-xxhdpi/ic_plugin_srtm.png b/OsmAnd/res/drawable-xxhdpi/ic_plugin_srtm.png deleted file mode 100644 index 4c98804578b867d66411b1d10dcb536e82c00d34..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2797 zcmaJ@X;c&E8V*6(0t$%8ri5TA*o5o}2?oe2ltpASA}U!17$6HtkX;D~B4E*qUZE^O z*%hp)MFj<`;I#ot1uaD=s9>>IL8)vOOM^;pfAn+3@mNJP%OWgF*2kyL|*K(@LkN_m19Kmq3ik)W7{m}+T5z(FAmv6JYF z@s%=xD9|%m1_UPi1qqU41Qa2{-3`7qk*XmO0SX>GQ4}kdQxj>3_qdw0e^3z zh@l}qh~oPC!2Cz6EeQ9#cxQ<$5{;!$C}<20jl-cd7ASd=Siws~iRJby z3@kt{kbzPKC=tV#8F_q3yn=?%DE$zENb2kR7qM9WF;SY7p%ZyhG}ak|7KxVQdT%XP z1OWe+@sHN>pd=}P4glnmc$q*`j|lq}uqJo^?r7OiqlUU&25O4Ji)Bd!@ghL1@M6&r znlH{mP)H>Zg+e}`L_*<6Bm#*4 zfW@*2bPj_~$8%iB7#54oz>-$5UShd|Cl&xJzCn%ek66;bVyR3Sz*9(MK@v&qN*DM? zNfZ)!ltc<=GT&Dn?zj^a3ndA1r{ywzh?)h+!2N)bBa?{W@AFIr|3L$V#1oLP_z0Ac zkH?|-ctQlqB_aZg!fR3?a3NzUga|U?BVPEo{C((C&50%s>53dGPaq)jZ~`8R50H5% zEEXW3_&Ab=7Yhin1fc*c;P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{VL_HBq67;)eY9%N9KnPR17NFe3ZRUhoLOqq6$jYD@ zqWN4|wu*bNEYsAYK6rwjSD~T*MYEgG7O=vlcj$S+UXA+1xO-_|h$Z!J4Os5Z&~?;b zJ*>W;4Ruon+cgpWuUC$-trxgrIU~eq44@fNEhu!*zN4(8|1G;Q&gkvATDq%?HDL3X zcLzDY*~9Mg?!BPj5Y?9zG=^^alPG&Gnw>h(w8_)@0f%Ln1<;h#aqh{f$^d8a%SzaN z#HSr#xx4$DWapD8a8N+gEKRyb9K4Lr1I<@2HgG&}rgMK3LJMf?$2|Fsmv6TUpdJ#i zAM%8jeay2}1{lQ}gy-u+Fl)mB?A`a7CCNNl(tV}f*Hb$>IyyQ!IyyQ!I$Fj5CB0Gq TvFwt600000NkvXXu0mjftOj@4 diff --git a/OsmAnd/res/drawable-xxxhdpi/ic_action_gsave_dark.png b/OsmAnd/res/drawable-xxxhdpi/ic_action_gsave_dark.png deleted file mode 100644 index ca8ea70cad4371e51ad644f6571286a4a37f1232..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 752 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD1|%QND7OGooCO|{#S9GG!XV7ZFl&wkP>``W z$lZxy-8q?;Kn_c~qpu?a!^VE@KZ&di3{0(_E{-7;jBoEW7G8D`XnmO8#uUU9!cf96 z_X4A8O0Y&4$`HYa^j?!K(kemrq8gAx>M5@*lp z5uaXHr?EjXUm=9cVHraTC4|0G!|r4 zF`ZxRezvj>=ZB1swbupbMgCdEaZmEWnMd!9549fUSFUhxNci|&bYap*eYcKzU(S3p z?e_0JP$3>t&3^j$ryXBe-}gOxe(&7xRU3C&x9ytJYPkOU{h0!}e-d_23;%ay1M9^= zlQ+w?owhvO<9q9oyS3A{iNYWHI7DwR-S=tnT*ccjI4i1K1aIFlHt8zs$dMHOu#ID} zgq4f6>$WwVKXwW7%v~g_9Q}-?W-dn?>!P{J(cf5X%$pJyW-z2gCo|0xK4{=z!m(+s zDWkmf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r5;=gIWt>Su$ZeiAW7efM{pV^0nrp(OrD{MOs5fcP$W2zDd!x3De74MTi) z98Dp&1eX>7@l9}lEdk=&(t`;Q-<1wcfcU<2U;@N%OA8Yqeph&y z0P(xV!32ok7ZxT!{Jv>00pbrug$WRUXbL7k{7`5UAU*)e@*iC)ng{T7FkAot002ov JPDHLkV1n$Q4oLt2 diff --git a/OsmAnd/res/drawable-xxxhdpi/ic_action_work.png b/OsmAnd/res/drawable-xxxhdpi/ic_action_work.png deleted file mode 100644 index 86aeafcb89ed1a6236d03366bf5faaf851228369..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 395 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD1|%QND7OGooCO|{#S9GG!XV7ZFl&wkP>``W z$lZxy-8q?;Kn_c~qpu?a!^VE@KZ&eBIR#G_$B+ufw|Bj}m<&Z6F5dX^t7_w3$F-tA z*cR@|nrr;Exu9}_gwtA}+L*JsRfqp>*mvXY1}FRODGY{;NlZsrIyeP{6~65@yZZXY z$=&aheH?rmW*|$cp$go#m*{5S8E(QGfaS4cxOXvS|wLt&tUk*wYJopJuZ lIU6^>XZJzX4h*diN&Esc4T^KCl>&i022WQ%mvv4FO#q1sg`xle diff --git a/OsmAnd/res/drawable/ic_action_bug_dark.xml b/OsmAnd/res/drawable/ic_action_bug_dark.xml new file mode 100644 index 0000000000..fe7b8af253 --- /dev/null +++ b/OsmAnd/res/drawable/ic_action_bug_dark.xml @@ -0,0 +1,9 @@ + + + diff --git a/OsmAnd/res/drawable/ic_action_compass_widget.xml b/OsmAnd/res/drawable/ic_action_compass_widget.xml new file mode 100644 index 0000000000..108cfcdf2b --- /dev/null +++ b/OsmAnd/res/drawable/ic_action_compass_widget.xml @@ -0,0 +1,13 @@ + + + + diff --git a/OsmAnd/res/drawable/ic_action_compass_widget_hide.xml b/OsmAnd/res/drawable/ic_action_compass_widget_hide.xml new file mode 100644 index 0000000000..0b1eb4b8cb --- /dev/null +++ b/OsmAnd/res/drawable/ic_action_compass_widget_hide.xml @@ -0,0 +1,13 @@ + + + + diff --git a/OsmAnd/res/drawable/ic_action_coordinates_latitude.xml b/OsmAnd/res/drawable/ic_action_coordinates_latitude.xml new file mode 100644 index 0000000000..a7ee81cb1a --- /dev/null +++ b/OsmAnd/res/drawable/ic_action_coordinates_latitude.xml @@ -0,0 +1,10 @@ + + + diff --git a/OsmAnd/res/drawable/ic_action_coordinates_longitude.xml b/OsmAnd/res/drawable/ic_action_coordinates_longitude.xml new file mode 100644 index 0000000000..6c8e01f542 --- /dev/null +++ b/OsmAnd/res/drawable/ic_action_coordinates_longitude.xml @@ -0,0 +1,10 @@ + + + diff --git a/OsmAnd/res/drawable/ic_action_coordinates_widget.xml b/OsmAnd/res/drawable/ic_action_coordinates_widget.xml new file mode 100644 index 0000000000..4cf5271120 --- /dev/null +++ b/OsmAnd/res/drawable/ic_action_coordinates_widget.xml @@ -0,0 +1,16 @@ + + + + diff --git a/OsmAnd/res/drawable/ic_action_copy.xml b/OsmAnd/res/drawable/ic_action_copy.xml new file mode 100644 index 0000000000..ebb2b35c22 --- /dev/null +++ b/OsmAnd/res/drawable/ic_action_copy.xml @@ -0,0 +1,13 @@ + + + + diff --git a/OsmAnd/res/drawable/ic_action_delete_dark.xml b/OsmAnd/res/drawable/ic_action_delete_dark.xml new file mode 100644 index 0000000000..a05bd21abe --- /dev/null +++ b/OsmAnd/res/drawable/ic_action_delete_dark.xml @@ -0,0 +1,10 @@ + + + diff --git a/OsmAnd/res/drawable/ic_action_gprint_dark.xml b/OsmAnd/res/drawable/ic_action_gprint_dark.xml new file mode 100644 index 0000000000..5f70128718 --- /dev/null +++ b/OsmAnd/res/drawable/ic_action_gprint_dark.xml @@ -0,0 +1,9 @@ + + + diff --git a/OsmAnd/res/drawable/ic_action_gsave_dark.xml b/OsmAnd/res/drawable/ic_action_gsave_dark.xml new file mode 100644 index 0000000000..a25a0996de --- /dev/null +++ b/OsmAnd/res/drawable/ic_action_gsave_dark.xml @@ -0,0 +1,9 @@ + + + diff --git a/OsmAnd/res/drawable/ic_action_gshare_dark.xml b/OsmAnd/res/drawable/ic_action_gshare_dark.xml new file mode 100644 index 0000000000..edad7213e2 --- /dev/null +++ b/OsmAnd/res/drawable/ic_action_gshare_dark.xml @@ -0,0 +1,15 @@ + + + + diff --git a/OsmAnd/res/drawable/ic_action_home_dark.xml b/OsmAnd/res/drawable/ic_action_home_dark.xml new file mode 100644 index 0000000000..b665594692 --- /dev/null +++ b/OsmAnd/res/drawable/ic_action_home_dark.xml @@ -0,0 +1,17 @@ + + + + + diff --git a/OsmAnd/res/drawable/ic_action_import.xml b/OsmAnd/res/drawable/ic_action_import.xml new file mode 100644 index 0000000000..8bf929c6b3 --- /dev/null +++ b/OsmAnd/res/drawable/ic_action_import.xml @@ -0,0 +1,10 @@ + + + diff --git a/OsmAnd/res/drawable/ic_action_info_dark.xml b/OsmAnd/res/drawable/ic_action_info_dark.xml new file mode 100644 index 0000000000..15cb857d72 --- /dev/null +++ b/OsmAnd/res/drawable/ic_action_info_dark.xml @@ -0,0 +1,10 @@ + + + diff --git a/OsmAnd/res/drawable/ic_action_marker_dark.xml b/OsmAnd/res/drawable/ic_action_marker_dark.xml new file mode 100644 index 0000000000..9dfc2cb852 --- /dev/null +++ b/OsmAnd/res/drawable/ic_action_marker_dark.xml @@ -0,0 +1,10 @@ + + + diff --git a/OsmAnd/res/drawable/ic_action_micro_dark.xml b/OsmAnd/res/drawable/ic_action_micro_dark.xml new file mode 100644 index 0000000000..e0224a0233 --- /dev/null +++ b/OsmAnd/res/drawable/ic_action_micro_dark.xml @@ -0,0 +1,10 @@ + + + diff --git a/OsmAnd/res/drawable/ic_action_parking_dark.xml b/OsmAnd/res/drawable/ic_action_parking_dark.xml new file mode 100644 index 0000000000..e0b15af75f --- /dev/null +++ b/OsmAnd/res/drawable/ic_action_parking_dark.xml @@ -0,0 +1,10 @@ + + + diff --git a/OsmAnd/res/drawable/ic_action_photo_dark.xml b/OsmAnd/res/drawable/ic_action_photo_dark.xml new file mode 100644 index 0000000000..dac4cd7253 --- /dev/null +++ b/OsmAnd/res/drawable/ic_action_photo_dark.xml @@ -0,0 +1,10 @@ + + + diff --git a/OsmAnd/res/drawable/ic_action_previous_route.xml b/OsmAnd/res/drawable/ic_action_previous_route.xml new file mode 100644 index 0000000000..f4ecad8fa7 --- /dev/null +++ b/OsmAnd/res/drawable/ic_action_previous_route.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + diff --git a/OsmAnd/res/drawable/ic_action_ruler.xml b/OsmAnd/res/drawable/ic_action_ruler.xml new file mode 100644 index 0000000000..a0c4afb370 --- /dev/null +++ b/OsmAnd/res/drawable/ic_action_ruler.xml @@ -0,0 +1,10 @@ + + + diff --git a/OsmAnd/res/drawable/ic_action_settings.xml b/OsmAnd/res/drawable/ic_action_settings.xml new file mode 100644 index 0000000000..bd93d68f88 --- /dev/null +++ b/OsmAnd/res/drawable/ic_action_settings.xml @@ -0,0 +1,10 @@ + + + diff --git a/OsmAnd/res/drawable/ic_action_travel.xml b/OsmAnd/res/drawable/ic_action_travel.xml new file mode 100644 index 0000000000..4875093f17 --- /dev/null +++ b/OsmAnd/res/drawable/ic_action_travel.xml @@ -0,0 +1,26 @@ + + + + + + + diff --git a/OsmAnd/res/drawable/ic_action_video_dark.xml b/OsmAnd/res/drawable/ic_action_video_dark.xml new file mode 100644 index 0000000000..8a1561bc17 --- /dev/null +++ b/OsmAnd/res/drawable/ic_action_video_dark.xml @@ -0,0 +1,10 @@ + + + diff --git a/OsmAnd/res/drawable/ic_action_work.xml b/OsmAnd/res/drawable/ic_action_work.xml new file mode 100644 index 0000000000..4656d02c65 --- /dev/null +++ b/OsmAnd/res/drawable/ic_action_work.xml @@ -0,0 +1,34 @@ + + + + + + + + + + diff --git a/OsmAnd/res/drawable/ic_configure_screen_dark.xml b/OsmAnd/res/drawable/ic_configure_screen_dark.xml new file mode 100644 index 0000000000..f3f7b78cac --- /dev/null +++ b/OsmAnd/res/drawable/ic_configure_screen_dark.xml @@ -0,0 +1,13 @@ + + + + diff --git a/OsmAnd/res/drawable/ic_map.xml b/OsmAnd/res/drawable/ic_map.xml new file mode 100644 index 0000000000..48040318f4 --- /dev/null +++ b/OsmAnd/res/drawable/ic_map.xml @@ -0,0 +1,9 @@ + + + diff --git a/OsmAnd/res/drawable/ic_navigation_drawer.xml b/OsmAnd/res/drawable/ic_navigation_drawer.xml new file mode 100644 index 0000000000..34b1b9881f --- /dev/null +++ b/OsmAnd/res/drawable/ic_navigation_drawer.xml @@ -0,0 +1,15 @@ + + + + + diff --git a/OsmAnd/res/drawable/ic_plugin_srtm.xml b/OsmAnd/res/drawable/ic_plugin_srtm.xml new file mode 100644 index 0000000000..9562493d37 --- /dev/null +++ b/OsmAnd/res/drawable/ic_plugin_srtm.xml @@ -0,0 +1,15 @@ + + + + From 621521bb107b68d6212ceea55c6d17d11f7758be Mon Sep 17 00:00:00 2001 From: josep constanti Date: Mon, 6 Apr 2020 15:42:59 +0000 Subject: [PATCH 071/202] Translated using Weblate (Catalan) Currently translated at 97.5% (3175 of 3254 strings) --- OsmAnd/res/values-ca/strings.xml | 37 ++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/OsmAnd/res/values-ca/strings.xml b/OsmAnd/res/values-ca/strings.xml index 3e8c98c001..c8c2bb5c0d 100644 --- a/OsmAnd/res/values-ca/strings.xml +++ b/OsmAnd/res/values-ca/strings.xml @@ -144,7 +144,7 @@ Accessibilitat Utilitza colors fluorescents per mostrar traces i rutes. S\'està pujant… - Configureu els advertiments de trànsit (límits de velocitat, cues, bandes rugoses, túnels), avisos de radars i informació dels carrils. + Configureu els avisos de trànsit (límits de velocitat, cues, bandes rugoses, túnels), avisos de radars i informació dels carrils. Afegeix un avís a Calendari Fes transparents totes les característiques d\'àrees de sòl al mapa. S\'ha creat el filtre \'%1$s\' @@ -874,7 +874,7 @@ Comença Connector de l\'OsmAnd per a corbes de nivell fora de línia Mesura de distàncies - Encara no teniu definida la localització de la nota. «Usa localització…» per assignar una nota a la localització especificada. + Premeu «Usa localització…» per afegir una nota a la localització. Feu notes d\'àudio/fotografies/vídeo durant un trajecte, mitjançant un botó a la pantalla o directament al menú de localització contextual. Connector de notes d\'àudio peces @@ -915,7 +915,7 @@ Aquest connector proporciona tant corbes de nivell superposades com una capa d\'ombres amb efecte relleu per superposar als mapes de OsmAnd. Corredors, ciclistes, excursionistes i qualsevol interessat en el perfil de relleu del terreny ho agrairan força. (Fixeu-vos que les corbes de nivell i/o els efectes de relleu són baixades independents i complementàries, disponibles un cop s\'hagi activat el connector). \n \nLes dades globals (entre 70 ° nord i 70 ° sud) estan basades en mesures del SRTM (Shuttle Radar Topography Mission) i del ASTER (Advanced Spaceborne Thermal Emission and Reflection Radiometer), un instrument de generació d\'imatges a bord de Terra, el satèl·lit insígnia del Sistema d\'Observació de la Terra de la NASA. ASTER és un esforç de col·laboració entre la NASA, el Ministeri d\'Economia i Comerç del Japó (METI) i la fundació Japan Space Systems (J-spacesystems). - Indiqueu quan mostrar mapes de només carreteres: + Trieu quan mostrar mapes de carreteres i prou: Inicia els anuncis automàtics Per a veure la localització seguiu l\'enllaç web %1$s o l\'enllaç Android %2$s L\'obtenció del llistat de versions de l\'OsmAnd ha fallat @@ -2152,12 +2152,12 @@ Per retornar a l\'estil habitual dels mapes d\'OsmAnd, només cal desactivar aqu Un botó per afegir un PDI al centre de la pantalla. Un botó per activar o desactivar la orientació de veu durant la navegació. Un botó per afegir una posició d\'aparcament al centre de la pantalla. - " s\'ha desat a " + " desat a " Lloc - El nom d\'acció directa indicat ja s\'està utilitzant, s\'ha canviat pel de %1$s per evitar duplicats. + S\'ha canviat el nom d\'acció directa pel de %1$s per evitar duplicats. El nom de l\'acció directa està duplicat - Prement aquest botó d\'acció es mostra o s\'amaga els punts Preferits en el mapa. - Prement aquest botó d\'acció mostreu o amagueu els PDIs en el mapa. + 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 @@ -2171,8 +2171,8 @@ Per retornar a l\'estil habitual dels mapes d\'OsmAnd, només cal desactivar aqu Deixeu-lo buit per utilitzar l\'adreça o el nom d\'un lloc. Aquest missatge s\'inclou en el camp de comentaris. Missatge - Seleccioneu la categoria on desar-hi el Preferit. - Seleccioneu una categoria opcional. + Categoria on desar-hi el Preferit: + Trieu una categoria opcional. Llista de PDI Afegiu un estil de mapa Ompliu tots els paràmetres @@ -2192,8 +2192,8 @@ Per retornar a l\'estil habitual dels mapes d\'OsmAnd, només cal desactivar aqu Mostra un diàleg provisional Afegiu una o més categories de PDI per mostrar-les al mapa. Nom de l\'acció - La superposició del mapa s\'ha canviat a \"%s\". - El fons del mapa s\'ha canviat a \"%s\". + S\'ha canviat el mapa superposat a \"%s\". + S\'ha canviat el mapa de fons a \"%s\". Codi de localització obert OLC no vàlid @@ -2201,7 +2201,7 @@ Per retornar a l\'estil habitual dels mapes d\'OsmAnd, només cal desactivar aqu Proporcioneu el codi complet OLC complet vàlid Abasta l\'àrea: %1$s x %2$s - Prement aquest botó d\'acció pagineu per la llista que segueix. + Un botó per paginar la llista que segueix. Divisió automàtica de les gravacions un cop aturades Comença un nou segment desprès de 6 min d\'interrupció, una traça nova si es superen les 2 hores o un nou fitxer si encara dura més i ha canviat la data. Mostra isòbates i fondàries puntuals. @@ -2890,9 +2890,9 @@ Abasta l\'àrea: %1$s x %2$s Voleu iniciar OsmAnd\? Guaraní Un botó per canviar entre els modes diürn i nocturn d\'OsmAnd. - Mode Diürn - Mode Nocturn - Canvia mode Diürn/Nocturn + Mode diürn + Mode nocturn + Canvia mode diürn/nocturn Establiu destinació Afegeix punt intermedi Establiu el punt inicial @@ -3416,7 +3416,7 @@ Abasta l\'àrea: %1$s x %2$s El connector ha afegit els perfils Desactiva S\'ha afegit un nou connector - A deserts i altre àrees poc poblades. Mostra més detalls en una escala de visualització. + Per deserts i altre àrees poc poblades. Més detallat. Límit d\'amplada Indica el límit d\'amplada de vehicle permesa en les rutes. Via aèria @@ -3610,4 +3610,9 @@ Abasta l\'àrea: %1$s x %2$s Les pistes es mostren sobre el terreny i amb colors. Pistes Connector d\'OsmAnd adaptat + Substitueix un altre punt per aquest + S\'han fet els canvis al perfil %1$s. + No s\'ha pogut llegir %1$s. + No s\'ha pogut escriure % 1$s. + No s\'ha pogut importar %1$s. \ No newline at end of file From 530f41431317e32edd7796099a1bda35a1a2c4fb Mon Sep 17 00:00:00 2001 From: jan madsen Date: Mon, 6 Apr 2020 14:33:29 +0000 Subject: [PATCH 072/202] Translated using Weblate (Danish) Currently translated at 89.9% (2926 of 3254 strings) --- OsmAnd/res/values-da/strings.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/OsmAnd/res/values-da/strings.xml b/OsmAnd/res/values-da/strings.xml index ef609bec13..4f2b3f28cb 100644 --- a/OsmAnd/res/values-da/strings.xml +++ b/OsmAnd/res/values-da/strings.xml @@ -3593,4 +3593,5 @@ Repræsenterer område: %1$s x %2$s Kunne ikke læse %1$s. Kunne ikke skrive til %1$s. Kunne ikke importere %1$s. + Erstat et andet punkt med dette \ No newline at end of file From fc754d87bca78c6d42cd3722accdcbc6eacd0fea Mon Sep 17 00:00:00 2001 From: iman Date: Mon, 6 Apr 2020 18:00:51 +0000 Subject: [PATCH 073/202] Translated using Weblate (Persian) Currently translated at 99.8% (3248 of 3254 strings) --- OsmAnd/res/values-fa/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/res/values-fa/strings.xml b/OsmAnd/res/values-fa/strings.xml index f4537299c5..3b2047ef55 100644 --- a/OsmAnd/res/values-fa/strings.xml +++ b/OsmAnd/res/values-fa/strings.xml @@ -3424,7 +3424,7 @@ پروفایل‌هایی که افزونه افزوده افزونهٔ تازه اضافه شد نمایش مسیرهای دوچرخهٔ شبکه‌های گره - %1$s پاک‌سازی شود؟ + ‏%1$s پاک‌سازی شود؟ شبکه‌های گره خاموش پیوند پاره‌ها From a1a59c89a0c1938fe869e47335a733fbbf1b8fd9 Mon Sep 17 00:00:00 2001 From: Ajeje Brazorf Date: Mon, 6 Apr 2020 15:24:57 +0000 Subject: [PATCH 074/202] Translated using Weblate (Sardinian) Currently translated at 99.3% (3232 of 3254 strings) --- OsmAnd/res/values-sc/strings.xml | 38 ++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/OsmAnd/res/values-sc/strings.xml b/OsmAnd/res/values-sc/strings.xml index d672156ebf..45d1e70ecc 100644 --- a/OsmAnd/res/values-sc/strings.xml +++ b/OsmAnd/res/values-sc/strings.xml @@ -158,7 +158,7 @@ A: Pro: Dae: - Predefinidu + Esplora sa mapa Profilu predefinidu Issèbera unu profilu de impreu cun impostatziones personalizadas pro sa mapa e sa navigatzione. Destinatzione %1$s @@ -1239,7 +1239,7 @@ Amenidades prus a curtzu Màchina Bitzicleta - A pede + A pee In tzentru In bassu Inserta sa latitùdine e sa longitùdine in su formadu ischertadu (G - grados, M - minutos, S - segundos) @@ -3580,4 +3580,38 @@ Pro praghere iscrie su còdighe intreu S\'àndala at a torrare a èssere carculada si sa distàntzia dae s\'àndala a sa positzione de su momentu at a èssere prus manna de su valore ischertadu. Ischerta sa distàntzia a pustis de sa cale s\'àndala at a torrare a èssere carculada. Torra a carculare s\'àndala in casu de deviatzione + Mapa de sas umbraduras de sos rilevos chi impreat umbras iscuras pro ammustrare pendèntzias, cùcuros e pranos. + Terrinu + Sa pista benit ammustrada cun colores in su terrinu. + Imposta sos livellos de ismanniamentu mìnimu e màssimu pro ammustrare s\'istratu. + Pro bìdere sas umbraduras de sos rilievos in sa mapa b\'at bisòngiu de mapas additzionales. + Pro bìdere sas pistas in sa mapa b\'at bisòngiu de mapas additzionales. + Podes lèghere àteras informatziones a pitzu de sas pistas in %1$s. + Trasparèntzia + Livellos de ismanniada + Legenda + Abìlita·lu pro ammustrare sas mapas de sas umbraduras de sos rilievos o de sas pistas. Podes lèghere àteras informatziones a pitzu de custas castas de mapas in su situ nostru + Umbraduras de sos rilievos + %1$s de %2$s + Pistas + Ammustra/cua su terrinu + 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 + Ischerta su grupu + Ischerta sa forma + Tzìrculu + Otàgonu + Cuadradu + Mìn + Remplasa un\'àteru puntu cun custu + Iscì-alpinismu + Motoislita + Estensione de OsmAnd personalizada + Modìficas aplicadas a su profilu %1$s. + Leghidura de %1$s fallida. + Iscritura de %1$s fallida. + Importatzione de %1$s fallida. \ No newline at end of file From d831b1621e7428799c3d9dc65c4c17da99719bfd Mon Sep 17 00:00:00 2001 From: ce4 Date: Mon, 6 Apr 2020 15:21:33 +0000 Subject: [PATCH 075/202] Translated using Weblate (German) Currently translated at 99.9% (3797 of 3798 strings) --- OsmAnd/res/values-de/phrases.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/res/values-de/phrases.xml b/OsmAnd/res/values-de/phrases.xml index 9bf1893c62..897fd51bfb 100644 --- a/OsmAnd/res/values-de/phrases.xml +++ b/OsmAnd/res/values-de/phrases.xml @@ -462,7 +462,7 @@ Nebenleuchtfeuer Feuerschiff Liegeplatz - Hinweis + Schifffahrtszeichen Pfahl Radarsender Funkstation From fd35c146ff71adc5b39abd6b122557bf18e11963 Mon Sep 17 00:00:00 2001 From: Franco Date: Mon, 6 Apr 2020 16:55:36 +0000 Subject: [PATCH 076/202] Translated using Weblate (Spanish (Argentina)) Currently translated at 100.0% (3254 of 3254 strings) --- OsmAnd/res/values-es-rAR/strings.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/OsmAnd/res/values-es-rAR/strings.xml b/OsmAnd/res/values-es-rAR/strings.xml index cc7490d03a..1000d41c7b 100644 --- a/OsmAnd/res/values-es-rAR/strings.xml +++ b/OsmAnd/res/values-es-rAR/strings.xml @@ -1060,7 +1060,7 @@ Lon %2$s Centrado automático del mapa activado. Opciones específicas de dibujo vectorial Superpuesta / subyacente - Ajustes del repositorio del mapa + Ajustes del repositorio de mapas Ajustes del mapa vectorial ¿Borrar «%1$s»? Suburbio @@ -1143,7 +1143,7 @@ Lon %2$s Pasar a lo largo de la traza completa Mapa vectorial presente para esta ubicación. \n\t -\n\tPara usarlo activa «Menú» → «Configurar mapa» → «Repositorio del mapa…» → «Mapas vectoriales sin conexión». +\n\tPara usarlo activa «Menú» → «Configurar mapa» → «Repositorio de mapas…» → «Mapas vectoriales sin conexión». Salida de indicaciones por voz Elige que altavoz reproducirá indicaciones por voz. Audio de llamada telefónica (para altavoces estéreos con Bluetooth) @@ -1307,7 +1307,7 @@ Lon %2$s Ruta Notas de OSM (en línea) Superposición de PDI… - Repositorio del mapa… + Repositorio de mapas… Capas de mapas Buscar PDI Usa un dispositivo con rueda de desplazamiento para mover el mapa. From f50fb927a06e20ade4c8f48b270a4a72c562957f Mon Sep 17 00:00:00 2001 From: solokot Date: Mon, 6 Apr 2020 19:40:40 +0000 Subject: [PATCH 077/202] Translated using Weblate (Russian) Currently translated at 100.0% (3254 of 3254 strings) --- OsmAnd/res/values-ru/strings.xml | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/OsmAnd/res/values-ru/strings.xml b/OsmAnd/res/values-ru/strings.xml index 2fd42ef883..472c5413b5 100644 --- a/OsmAnd/res/values-ru/strings.xml +++ b/OsmAnd/res/values-ru/strings.xml @@ -542,7 +542,7 @@ Выберите слой наложения поверх основной карты Карта уже установлена, настройки будут обновлены. Выберите (тайловые) карты для установки или обновления. - Требуется Интернет соединение для данной операции, но оно недоступно. + Для данной операции требуется подключение к интернету, но оно недоступно. Загрузить еще… Минимальный масштаб для использования векторных карт. Минимальный уровень векторных карт @@ -3567,9 +3567,9 @@ Выберите расстояние, после которого маршрут будет пересчитан. Легенда Невозможно разобрать геоссылку \"%s\". - + Для отображения затенения рельефа на карте необходимы дополнительные карты. Мин. - + Отображение затенения рельефа или склонов. Подробнее об этих типах карт вы можете прочитать на нашем сайте. Прозрачность Уровни масштаба Пересчитывать маршрут в случае отклонения @@ -3590,4 +3590,21 @@ Выберите фигуру Круг Восьмиугольник + Сообщение о доступности + Примечание: проверка скорости > 0: большинство модулей GPS сообщают значение скорости только в том случае, если алгоритм определяет, что вы движетесь, и ничего, если вы не перемещаетесь. Следовательно, использование параметра > 0 в этом фильтре в некотором смысле приводит к обнаружению факта перемещения модуля GPS. Но даже если мы не производим данную фильтрацию во время записи, то все равно эта функция используется при анализе GPX для определения скорректированного расстояния, то есть значение, отображаемое в этом поле, является расстоянием, записанным во время движения. + Разделение записи + Укажите веб-адрес со следующими параметрами: lat={0}, lon={1}, timestamp={2}, hdop={3}, altitude={4}, speed={5}, bearing={6}. + В этом случае будут записываться только точки, измеренные с минимальной точностью (в метрах/футах согласно настройкам устройства). Точность относится к разбросу повторяющихся измерений и не связана непосредственно с точностью, которая определяет, насколько ваши измерения близки к вашему истинному положению. + Рекомендация: попробуйте сначала воспользоваться детектором движения через фильтр минимального смещения (B), что может дать лучшие результаты и вы потеряете меньше данных. Если треки остаются шумными на низких скоростях, попробуйте использовать ненулевые значения. Обратите внимание, что некоторые измерения могут вообще не указывать значения скорости (некоторые сетевые методы), и в этом случае ничего не будет записываться. + Склон выделяется цветовой визуализацией на рельефе местности. + Подробнее о склонах можно прочитать в %1$s. + Затенение рельефа + Затенение рельефа использует темные оттенки для отображения склонов, вершин и низменностей. + Для отображения склонов на карте необходимы дополнительные карты. + Склоны + Заменить другую точку на эту + Изменения применены к профилю %1$s. + Невозможно прочитать %1$s. + Невозможно записать %1$s. + Невозможно импортировать %1$s. \ No newline at end of file From 198fd1a19a9175a265d083591298dae5cf7b884d Mon Sep 17 00:00:00 2001 From: ace shadow Date: Mon, 6 Apr 2020 20:09:41 +0000 Subject: [PATCH 078/202] Translated using Weblate (Slovak) Currently translated at 100.0% (3254 of 3254 strings) --- OsmAnd/res/values-sk/strings.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/OsmAnd/res/values-sk/strings.xml b/OsmAnd/res/values-sk/strings.xml index 0f60f18027..5bb067456e 100644 --- a/OsmAnd/res/values-sk/strings.xml +++ b/OsmAnd/res/values-sk/strings.xml @@ -3599,4 +3599,9 @@ Zodpovedá oblasti: %1$s x %2$s Lyžiarske okruhy Snežný skúter Vlastný modul pre OsmAnd + Nahradiť iný bod týmto + Zmeny boli použité na profil %1$s. + Nepodarilo sa prečítať %1$s. + Nepodarilo sa zapísať %1$s. + Nepodarilo sa importovať %1$s. \ No newline at end of file From bb808bbaf78f954848e497d06f5b23d71d574be7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Allan=20Nordh=C3=B8y?= Date: Tue, 7 Apr 2020 00:48:45 +0000 Subject: [PATCH 079/202] =?UTF-8?q?Translated=20using=20Weblate=20(Norwegi?= =?UTF-8?q?an=20Bokm=C3=A5l)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently translated at 3.4% (113 of 3254 strings) --- OsmAnd/res/values-nb/strings.xml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/OsmAnd/res/values-nb/strings.xml b/OsmAnd/res/values-nb/strings.xml index a7d926cf99..521e62848f 100644 --- a/OsmAnd/res/values-nb/strings.xml +++ b/OsmAnd/res/values-nb/strings.xml @@ -3475,4 +3475,28 @@ Importerer data fra %1$s Importerer Velg form + Minimumshastighet + Min. nøyaktighet + Merknad + Nettadresse + Opptegningsstil + %1$s/%2$s + Kun vis om natten + Legg til egendefinert kategori + Meny + Åpne innstillinger + Terreng + %1$s av %2$s + Vis/skjul terreng + Skjul terreng + Vis terreng + Slett beskrivelse + Legg til beskrivelse + Velg gruppe + Sirkel + Oktogon + Firkant + Kunne ikke lese %1$s. + Kunne ikke importere %1$s. + Kunne ikke skrive %1$s. \ No newline at end of file From 0d7e8bb6c0f624ba14063aa9addacff9cc5fe3a2 Mon Sep 17 00:00:00 2001 From: solokot Date: Mon, 6 Apr 2020 20:17:49 +0000 Subject: [PATCH 080/202] Translated using Weblate (Russian) Currently translated at 96.9% (3683 of 3798 strings) --- OsmAnd/res/values-ru/phrases.xml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/OsmAnd/res/values-ru/phrases.xml b/OsmAnd/res/values-ru/phrases.xml index 66a046a938..3d0e90f46b 100644 --- a/OsmAnd/res/values-ru/phrases.xml +++ b/OsmAnd/res/values-ru/phrases.xml @@ -3659,4 +3659,36 @@ Доступ для трейлеров Тип Статус + Да + Да + Да + Да + Выделенный + Да + Доступ для такси: нет + Доступ для такси: выделенный + Доступ для такси: да + Доступ на лыжах: нет + Доступ на лыжах: да + Доступ для снегохода: нет + Доступ для снегохода: частный + Доступ для туристического автобуса: выделенный + Доступ для туристического автобуса: нет + Доступ для туристического автобуса: да + Доступ для автобуса: нет + Доступ для каравана: нет + Доступ для дома на колесах: нет + Доступ для трейлера: нет + Ледопад + Скалолазание + Тип карты: топоскоп + Плата за парковку + Искусственное покрытие + УКВ-канал + Шаурма + Сухой баррель + Высота просвета (открытая) + Высота просвета (закрытая) + Видео + SMS \ No newline at end of file From 3231446ed8e387d78d23f163dfb7607ab3dfeb7e Mon Sep 17 00:00:00 2001 From: solokot Date: Mon, 6 Apr 2020 20:04:16 +0000 Subject: [PATCH 081/202] Translated using Weblate (Russian) Currently translated at 97.3% (260 of 267 strings) Translation: OsmAnd/Telegram Translate-URL: https://hosted.weblate.org/projects/osmand/telegram/ru/ --- OsmAnd-telegram/res/values-ru/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd-telegram/res/values-ru/strings.xml b/OsmAnd-telegram/res/values-ru/strings.xml index c1c2124e85..8a232e948c 100644 --- a/OsmAnd-telegram/res/values-ru/strings.xml +++ b/OsmAnd-telegram/res/values-ru/strings.xml @@ -158,7 +158,7 @@ Политика конфиденциальности Telegram Политика конфиденциальности OsmAnd Получено точек GPX: %1$s - Внешний вид + Вид Показать количество собранных и отправленных точек GPS. Обновите OsmAnd для просмотра данных на карте Обновить From 07557d8bfb10042142bc9c003cb3199276d72bd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Allan=20Nordh=C3=B8y?= Date: Tue, 7 Apr 2020 00:48:16 +0000 Subject: [PATCH 082/202] =?UTF-8?q?Translated=20using=20Weblate=20(Norwegi?= =?UTF-8?q?an=20Bokm=C3=A5l)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently translated at 94.7% (253 of 267 strings) Translation: OsmAnd/Telegram Translate-URL: https://hosted.weblate.org/projects/osmand/telegram/nb_NO/ --- OsmAnd-telegram/res/values-nb/strings.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/OsmAnd-telegram/res/values-nb/strings.xml b/OsmAnd-telegram/res/values-nb/strings.xml index 33680e1089..4715a16091 100644 --- a/OsmAnd-telegram/res/values-nb/strings.xml +++ b/OsmAnd-telegram/res/values-nb/strings.xml @@ -268,4 +268,5 @@ Siste oppdatering fra Telegram: %1$s siden Siste respons: %1$s siden %1$s siden + ERR \ No newline at end of file From c1c2d391ca0f0b841482bf97ffdc264e17363320 Mon Sep 17 00:00:00 2001 From: MadWasp79 Date: Tue, 7 Apr 2020 09:38:04 +0300 Subject: [PATCH 083/202] fix string format --- OsmAnd/res/values-ca/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/res/values-ca/strings.xml b/OsmAnd/res/values-ca/strings.xml index c8c2bb5c0d..c67ded97ad 100644 --- a/OsmAnd/res/values-ca/strings.xml +++ b/OsmAnd/res/values-ca/strings.xml @@ -3613,6 +3613,6 @@ Abasta l\'àrea: %1$s x %2$s Substitueix un altre punt per aquest S\'han fet els canvis al perfil %1$s. No s\'ha pogut llegir %1$s. - No s\'ha pogut escriure % 1$s. + No s\'ha pogut escriure %1$s. No s\'ha pogut importar %1$s. \ No newline at end of file From 7cba59bdaf55afe45ad3e4cdbac7d284db350a56 Mon Sep 17 00:00:00 2001 From: Dima-1 Date: Tue, 7 Apr 2020 14:07:39 +0300 Subject: [PATCH 084/202] Fix npe. --- .../SettingsAudioVideoActivity.java | 216 ++++++++++-------- 1 file changed, 115 insertions(+), 101 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/audionotes/SettingsAudioVideoActivity.java b/OsmAnd/src/net/osmand/plus/audionotes/SettingsAudioVideoActivity.java index a19e9d09cb..815b77108c 100644 --- a/OsmAnd/src/net/osmand/plus/audionotes/SettingsAudioVideoActivity.java +++ b/OsmAnd/src/net/osmand/plus/audionotes/SettingsAudioVideoActivity.java @@ -21,10 +21,8 @@ import net.osmand.plus.activities.SettingsBaseActivity; import org.apache.commons.logging.Log; import java.io.File; -import java.text.MessageFormat; import java.util.ArrayList; import java.util.List; -import java.util.Locale; import static net.osmand.plus.audionotes.AudioVideoNotesPlugin.AUDIO_BITRATE_DEFAULT; import static net.osmand.plus.audionotes.AudioVideoNotesPlugin.AV_CAMERA_FOCUS_AUTO; @@ -78,105 +76,8 @@ public class SettingsAudioVideoActivity extends SettingsBaseActivity { R.string.av_use_external_camera_descr)); Parameters parameters = cam.getParameters(); - - // Photo picture size - // get supported sizes - List psps = parameters.getSupportedPictureSizes(); - // list of megapixels of each resolution - List mpix = new ArrayList(); - // list of index each resolution in list, returned by getSupportedPictureSizes() - List picSizesValues = new ArrayList(); - // fill lists for sort - for (int index = 0; index < psps.size(); index++) { - mpix.add((psps.get(index)).width * (psps.get(index)).height); - picSizesValues.add(index); - } - // sort list for max resolution in begining of list - for (int i = 0; i < mpix.size(); i++) { - for (int j = 0; j < mpix.size() - i - 1; j++) { - if (mpix.get(j) < mpix.get(j + 1)) { - // change elements - int tmp = mpix.get(j + 1); - mpix.set(j + 1, mpix.get(j)); - mpix.set(j, tmp); - - tmp = picSizesValues.get(j + 1); - picSizesValues.set(j + 1, picSizesValues.get(j)); - picSizesValues.set(j, tmp); - } - } - } - // set default photo size to max resolution (set index of element with max resolution in List, returned by getSupportedPictureSizes() ) - cameraPictureSizeDefault = picSizesValues.get(0); - log.debug("onCreate() set cameraPictureSizeDefault=" + cameraPictureSizeDefault); - - List itemsPicSizes = new ArrayList(); - String prefix; - for (int index = 0; index < psps.size(); index++) { - float px = (float) ((psps.get(picSizesValues.get(index))).width * (psps.get(picSizesValues.get(index))).height); - if (px > 102400) // 100 K - { - px = px / 1048576; - prefix = "Mpx"; - } else { - px = px / 1024; - prefix = "Kpx"; - } - - itemsPicSizes.add((psps.get(picSizesValues.get(index))).width + - "x" + - (psps.get(picSizesValues.get(index))).height + - " ( " + - String.format("%.2f", px) + - " " + - prefix + - " )"); - } - log.debug("onCreate() set default size: width=" + psps.get(cameraPictureSizeDefault).width + " height=" - + psps.get(cameraPictureSizeDefault).height + " index in ps=" + cameraPictureSizeDefault); - - entries = itemsPicSizes.toArray(new String[itemsPicSizes.size()]); - intValues = picSizesValues.toArray(new Integer[picSizesValues.size()]); - if (entries.length > 0) { - ListPreference camSizes = createListPreference(p.AV_CAMERA_PICTURE_SIZE, entries, intValues, R.string.av_camera_pic_size, - R.string.av_camera_pic_size_descr); - photo.addPreference(camSizes); - } - - // focus mode settings - // show in menu only suppoted modes - List sfm = parameters.getSupportedFocusModes(); - List items = new ArrayList(); - List itemsValues = new ArrayList(); - // filtering known types for translate and set index - for (int index = 0; index < sfm.size(); index++) { - if (sfm.get(index).equals("auto")) { - items.add(getString(R.string.av_camera_focus_auto)); - itemsValues.add(AV_CAMERA_FOCUS_AUTO); - } else if (sfm.get(index).equals("fixed")) { - items.add(getString(R.string.av_camera_focus_hiperfocal)); - itemsValues.add(AV_CAMERA_FOCUS_HIPERFOCAL); - } else if (sfm.get(index).equals("edof")) { - items.add(getString(R.string.av_camera_focus_edof)); - itemsValues.add(AV_CAMERA_FOCUS_EDOF); - } else if (sfm.get(index).equals("infinity")) { - items.add(getString(R.string.av_camera_focus_infinity)); - itemsValues.add(AV_CAMERA_FOCUS_INFINITY); - } else if (sfm.get(index).equals("macro")) { - items.add(getString(R.string.av_camera_focus_macro)); - itemsValues.add(AV_CAMERA_FOCUS_MACRO); - } else if (sfm.get(index).equals("continuous-picture")) { - items.add(getString(R.string.av_camera_focus_continuous)); - itemsValues.add(AV_CAMERA_FOCUS_CONTINUOUS); - } - } - entries = items.toArray(new String[items.size()]); - intValues = itemsValues.toArray(new Integer[itemsValues.size()]); - if (entries.length > 0) { - ListPreference camFocus = createListPreference(p.AV_CAMERA_FOCUS_TYPE, entries, intValues, R.string.av_camera_focus, - R.string.av_camera_focus_descr); - photo.addPreference(camFocus); - } + createCameraPictureSizesPref(p, photo, parameters); + createCameraFocusModesPref(p, photo, parameters); // play sound on success photo photo.addPreference(createCheckBoxPreference(p.AV_PHOTO_PLAY_SOUND, R.string.av_photo_play_sound, @@ -309,6 +210,119 @@ public class SettingsAudioVideoActivity extends SettingsBaseActivity { } } + private void createCameraPictureSizesPref(AudioVideoNotesPlugin p, PreferenceCategory photo, Parameters parameters) { + String[] entries; + Integer[] intValues; + // Photo picture size + // get supported sizes + List psps = parameters.getSupportedPictureSizes(); + if (psps == null) { + return; + } + // list of megapixels of each resolution + List mpix = new ArrayList(); + // list of index each resolution in list, returned by getSupportedPictureSizes() + List picSizesValues = new ArrayList(); + // fill lists for sort + for (int index = 0; index < psps.size(); index++) { + mpix.add((psps.get(index)).width * (psps.get(index)).height); + picSizesValues.add(index); + } + // sort list for max resolution in begining of list + for (int i = 0; i < mpix.size(); i++) { + for (int j = 0; j < mpix.size() - i - 1; j++) { + if (mpix.get(j) < mpix.get(j + 1)) { + // change elements + int tmp = mpix.get(j + 1); + mpix.set(j + 1, mpix.get(j)); + mpix.set(j, tmp); + + tmp = picSizesValues.get(j + 1); + picSizesValues.set(j + 1, picSizesValues.get(j)); + picSizesValues.set(j, tmp); + } + } + } + // set default photo size to max resolution (set index of element with max resolution in List, returned by getSupportedPictureSizes() ) + cameraPictureSizeDefault = picSizesValues.get(0); + log.debug("onCreate() set cameraPictureSizeDefault=" + cameraPictureSizeDefault); + + List itemsPicSizes = new ArrayList(); + String prefix; + for (int index = 0; index < psps.size(); index++) { + float px = (float) ((psps.get(picSizesValues.get(index))).width * (psps.get(picSizesValues.get(index))).height); + if (px > 102400) // 100 K + { + px = px / 1048576; + prefix = "Mpx"; + } else { + px = px / 1024; + prefix = "Kpx"; + } + + itemsPicSizes.add((psps.get(picSizesValues.get(index))).width + + "x" + + (psps.get(picSizesValues.get(index))).height + + " ( " + + String.format("%.2f", px) + + " " + + prefix + + " )"); + } + log.debug("onCreate() set default size: width=" + psps.get(cameraPictureSizeDefault).width + " height=" + + psps.get(cameraPictureSizeDefault).height + " index in ps=" + cameraPictureSizeDefault); + + entries = itemsPicSizes.toArray(new String[itemsPicSizes.size()]); + intValues = picSizesValues.toArray(new Integer[picSizesValues.size()]); + if (entries.length > 0) { + ListPreference camSizes = createListPreference(p.AV_CAMERA_PICTURE_SIZE, entries, intValues, R.string.av_camera_pic_size, + R.string.av_camera_pic_size_descr); + photo.addPreference(camSizes); + } + } + + private void createCameraFocusModesPref(AudioVideoNotesPlugin p, PreferenceCategory photo, Parameters parameters) { + String[] entries; + Integer[] intValues; + // focus mode settings + // show in menu only suppoted modes + List sfm = parameters.getSupportedFocusModes(); + if (sfm == null) { + return; + } + List items = new ArrayList(); + List itemsValues = new ArrayList(); + // filtering known types for translate and set index + for (int index = 0; index < sfm.size(); index++) { + if (sfm.get(index).equals("auto")) { + items.add(getString(R.string.av_camera_focus_auto)); + itemsValues.add(AV_CAMERA_FOCUS_AUTO); + } else if (sfm.get(index).equals("fixed")) { + items.add(getString(R.string.av_camera_focus_hiperfocal)); + itemsValues.add(AV_CAMERA_FOCUS_HIPERFOCAL); + } else if (sfm.get(index).equals("edof")) { + items.add(getString(R.string.av_camera_focus_edof)); + itemsValues.add(AV_CAMERA_FOCUS_EDOF); + } else if (sfm.get(index).equals("infinity")) { + items.add(getString(R.string.av_camera_focus_infinity)); + itemsValues.add(AV_CAMERA_FOCUS_INFINITY); + } else if (sfm.get(index).equals("macro")) { + items.add(getString(R.string.av_camera_focus_macro)); + itemsValues.add(AV_CAMERA_FOCUS_MACRO); + } else if (sfm.get(index).equals("continuous-picture")) { + items.add(getString(R.string.av_camera_focus_continuous)); + itemsValues.add(AV_CAMERA_FOCUS_CONTINUOUS); + } + } + entries = items.toArray(new String[items.size()]); + intValues = itemsValues.toArray(new Integer[itemsValues.size()]); + if (entries.length > 0) { + ListPreference camFocus = createListPreference(p.AV_CAMERA_FOCUS_TYPE, entries, intValues, R.string.av_camera_focus, + R.string.av_camera_focus_descr); + photo.addPreference(camFocus); + } + } + protected Camera openCamera() { try { return Camera.open(); From 971db3f666c64017aa28c81c2fd14da3ad3d3986 Mon Sep 17 00:00:00 2001 From: veliymolfar Date: Tue, 7 Apr 2020 14:47:51 +0300 Subject: [PATCH 085/202] apply to all dialog / work in progress --- .../aidlapi/OsmAndCustomizationConstants.java | 4 + .../res/layout/context_menu_action_item.xml | 32 ++++ .../list_item_description_with_image.xml | 26 ++- OsmAnd/res/layout/list_item_move_header.xml | 3 +- OsmAnd/res/layout/profile_edit_list_item.xml | 2 + OsmAnd/res/values/strings.xml | 1 + OsmAnd/res/xml/configure_profile.xml | 5 +- .../net/osmand/plus/ContextMenuAdapter.java | 109 ++++++++++++ .../src/net/osmand/plus/OsmandSettings.java | 23 +++ .../osmand/plus/activities/MapActivity.java | 2 +- .../plus/activities/MapActivityActions.java | 138 +++++++++++---- .../osmand/plus/dashboard/DashboardOnMap.java | 2 + .../osmand/plus/dialogs/ConfigureMapMenu.java | 2 +- .../plus/mapcontextmenu/MapContextMenu.java | 20 ++- .../settings/ConfigureMenuItemsFragment.java | 161 +++++++++--------- .../settings/ConfigureMenuRootFragment.java | 44 +++-- .../settings/ConfigureProfileFragment.java | 7 +- .../settings/RearrangeMenuItemsAdapter.java | 40 ++++- .../ChangeGeneralProfilesPrefBottomSheet.java | 107 ++++++++++-- 19 files changed, 567 insertions(+), 161 deletions(-) create mode 100644 OsmAnd/res/layout/context_menu_action_item.xml diff --git a/OsmAnd-api/src/net/osmand/aidlapi/OsmAndCustomizationConstants.java b/OsmAnd-api/src/net/osmand/aidlapi/OsmAndCustomizationConstants.java index 6657e29bca..3fa80e316f 100644 --- a/OsmAnd-api/src/net/osmand/aidlapi/OsmAndCustomizationConstants.java +++ b/OsmAnd-api/src/net/osmand/aidlapi/OsmAndCustomizationConstants.java @@ -71,6 +71,10 @@ public interface OsmAndCustomizationConstants { //Map Context Menu Actions: String MAP_CONTEXT_MENU_ACTIONS = "point.actions."; + String MAP_CONTEXT_MENU_ADD_ID = MAP_CONTEXT_MENU_ACTIONS + "add"; + String MAP_CONTEXT_MENU_MARKER_ID = MAP_CONTEXT_MENU_ACTIONS + "marker"; + String MAP_CONTEXT_MENU_SHARE_ID = MAP_CONTEXT_MENU_ACTIONS + "share"; + String MAP_CONTEXT_MENU_MORE_ID = MAP_CONTEXT_MENU_ACTIONS + "more"; String MAP_CONTEXT_MENU_DIRECTIONS_FROM_ID = MAP_CONTEXT_MENU_ACTIONS + "directions_from"; String MAP_CONTEXT_MENU_SEARCH_NEARBY = MAP_CONTEXT_MENU_ACTIONS + "search_nearby"; String MAP_CONTEXT_MENU_CHANGE_MARKER_POSITION = MAP_CONTEXT_MENU_ACTIONS + "change_m_position"; diff --git a/OsmAnd/res/layout/context_menu_action_item.xml b/OsmAnd/res/layout/context_menu_action_item.xml new file mode 100644 index 0000000000..a2f3ea3b6d --- /dev/null +++ b/OsmAnd/res/layout/context_menu_action_item.xml @@ -0,0 +1,32 @@ + + + + + + + + + diff --git a/OsmAnd/res/layout/list_item_description_with_image.xml b/OsmAnd/res/layout/list_item_description_with_image.xml index 200ffd6107..72f94ed955 100644 --- a/OsmAnd/res/layout/list_item_description_with_image.xml +++ b/OsmAnd/res/layout/list_item_description_with_image.xml @@ -5,12 +5,30 @@ android:layout_height="wrap_content" android:orientation="vertical"> - + android:background="?attr/activity_background_basic" + tools:paddingEnd="56dp" + tools:paddingStart="56dp" + tools:paddingTop="16dp"> + + + + + + @@ -64,6 +64,7 @@ android:layout_height="wrap_content" android:letterSpacing="@dimen/description_letter_spacing" android:paddingBottom="@dimen/list_header_settings_top_margin" + android:lineSpacingExtra="@dimen/line_spacing_extra_description" android:textColor="?android:textColorSecondary" android:textSize="@dimen/default_desc_text_size" osmand:typeface="@string/font_roboto_regular" diff --git a/OsmAnd/res/layout/profile_edit_list_item.xml b/OsmAnd/res/layout/profile_edit_list_item.xml index 08c2880c37..8f7b962ef5 100644 --- a/OsmAnd/res/layout/profile_edit_list_item.xml +++ b/OsmAnd/res/layout/profile_edit_list_item.xml @@ -12,6 +12,7 @@ android:id="@+id/divider" android:layout_width="match_parent" android:layout_height="1dp" + android:layout_marginBottom="@dimen/content_padding_small" android:background="?attr/dashboard_divider" android:visibility="gone" tools:visibility="visible" /> @@ -79,6 +80,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:letterSpacing="@dimen/description_letter_spacing" + android:lineSpacingExtra="@dimen/line_spacing_extra_description" android:maxLines="4" android:textColor="?android:textColorSecondary" android:textSize="@dimen/default_desc_text_size" diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index dfc59b98cb..6728e3504d 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -34,6 +34,7 @@ Context menu actions Drawer UI Customization + Drawer items, context menu Customize the quantity of items in Drawer, Configure map and context menu.\n\nYou can disable unused plugins, to hide all its controls from the application. Min Square diff --git a/OsmAnd/res/xml/configure_profile.xml b/OsmAnd/res/xml/configure_profile.xml index a7477a6cdf..d86a80620f 100644 --- a/OsmAnd/res/xml/configure_profile.xml +++ b/OsmAnd/res/xml/configure_profile.xml @@ -52,14 +52,13 @@ android:title="@string/profile_appearance" tools:icon="@drawable/ic_action_offroad" /> - + tools:icon="@drawable/ic_action_ui_customization" /> getHiddenItemsIds(@NonNull OsmandApplication app, @NonNull ScreenType type) { + List hiddenItemsIds = null; + switch (type) { + case DRAWER: + hiddenItemsIds = app.getSettings().HIDDEN_DRAWER_ITEMS.getStringsList(); + break; + case CONFIGURE_MAP: + hiddenItemsIds = app.getSettings().HIDDEN_CONFIGURE_MAP_ITEMS.getStringsList(); + break; + case CONTEXT_MENU_ACTIONS: + hiddenItemsIds = app.getSettings().HIDDEN_CONTEXT_MENU_ACTIONS_ITEMS.getStringsList(); + break; + } + return hiddenItemsIds != null ? new ArrayList<>(hiddenItemsIds) : new ArrayList(); + } + + @NonNull + public List getItemsIdsOrder(@NonNull OsmandApplication app, @NonNull ScreenType type) { + List hiddenItemsIds = null; + switch (type) { + case DRAWER: + hiddenItemsIds = app.getSettings().DRAWER_ITEMS_ORDER.getStringsList(); + break; + case CONFIGURE_MAP: + hiddenItemsIds = app.getSettings().CONFIGURE_MAP_ITEMS_ORDER.getStringsList(); + break; + case CONTEXT_MENU_ACTIONS: + hiddenItemsIds = app.getSettings().CONTEXT_MENU_ACTIONS_ITEMS_ORDER.getStringsList(); + break; + } + return hiddenItemsIds != null ? new ArrayList<>(hiddenItemsIds) : new ArrayList(); + } + + public void saveHiddenItemsIds(@NonNull OsmandApplication app, @NonNull ScreenType type, @Nullable List hiddenItemsIds) { + switch (type) { + case DRAWER: + app.getSettings().HIDDEN_DRAWER_ITEMS.setStringsList(hiddenItemsIds); + break; + case CONFIGURE_MAP: + app.getSettings().HIDDEN_CONFIGURE_MAP_ITEMS.setStringsList(hiddenItemsIds); + break; + case CONTEXT_MENU_ACTIONS: + app.getSettings().HIDDEN_CONTEXT_MENU_ACTIONS_ITEMS.setStringsList(hiddenItemsIds); + break; + } + } + + public void saveItemsIdsOrder(@NonNull OsmandApplication app, @NonNull ScreenType type, @Nullable List itemsIdsOrder) { + switch (type) { + case DRAWER: + app.getSettings().DRAWER_ITEMS_ORDER.setStringsList(itemsIdsOrder); + break; + case CONFIGURE_MAP: + app.getSettings().CONFIGURE_MAP_ITEMS_ORDER.setStringsList(itemsIdsOrder); + break; + case CONTEXT_MENU_ACTIONS: + app.getSettings().CONTEXT_MENU_ACTIONS_ITEMS_ORDER.setStringsList(itemsIdsOrder); + break; + } + } + + public String getPrefIdOrder(@NonNull OsmandApplication app, @NonNull ScreenType type) { + switch (type) { + case DRAWER: + return app.getSettings().DRAWER_ITEMS_ORDER.getId(); + case CONFIGURE_MAP: + return app.getSettings().CONFIGURE_MAP_ITEMS_ORDER.getId(); + case CONTEXT_MENU_ACTIONS: + return app.getSettings().CONTEXT_MENU_ACTIONS_ITEMS_ORDER.get(); + } + return ""; + } + + public String getPrefIdHidden(@NonNull OsmandApplication app, @NonNull ScreenType type) { + switch (type) { + case DRAWER: + return app.getSettings().HIDDEN_DRAWER_ITEMS.getId(); + case CONFIGURE_MAP: + return app.getSettings().HIDDEN_CONFIGURE_MAP_ITEMS.getId(); + case CONTEXT_MENU_ACTIONS: + return app.getSettings().HIDDEN_CONTEXT_MENU_ACTIONS_ITEMS.get(); + } + return ""; + } + + public void initItemsCustomOrder(@NonNull OsmandApplication app, @NonNull ScreenType type) { + List savedOrder = getItemsIdsOrder(app, type); + List hiddenItems = getHiddenItemsIds(app, type); + + if (!savedOrder.isEmpty()) { + reorderMenuItems(items, getMenuItemsOrder(savedOrder)); + } + + if (!hiddenItems.isEmpty()) { + List filtered = new ArrayList<>(); + for (ContextMenuItem item : items) { + if (!hiddenItems.contains(item.getId())) { + filtered.add(item); + } + } + items = filtered; + } + } } \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/OsmandSettings.java b/OsmAnd/src/net/osmand/plus/OsmandSettings.java index b72f6022eb..30385c59f9 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandSettings.java +++ b/OsmAnd/src/net/osmand/plus/OsmandSettings.java @@ -412,6 +412,11 @@ public class OsmandSettings { ((BooleanPreference) preference).setModeValue(mode, (Boolean) value); return true; } + } else if (preference instanceof ListStringPreference) { + if (value instanceof List) { + ((ListStringPreference) preference).setModeValue(mode, (List) value); + return true; + } } else if (preference instanceof StringPreference) { if (value instanceof String) { ((StringPreference) preference).setModeValue(mode, (String) value); @@ -1078,6 +1083,24 @@ public class OsmandSettings { addValue(value); } } + + public boolean setModeValue(ApplicationMode mode, List values) { + if (values == null || values.size() == 0) { + set(null); + return false; + } + clearAll(); + String vl = get(); + for (String value : values) { + addValue(value); + if (vl == null || vl.isEmpty()) { + vl = value + delimiter; + } else { + vl = vl + value + delimiter; + } + } + return setModeValue(mode, vl); + } } public class EnumIntPreference> extends CommonPreference { diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java index ed1420014b..77a0af2fca 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java @@ -753,7 +753,7 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven } ConfigureMenuItemsFragment configureMenuItemsFragment = getConfigureMenuItemsFragment(); if (configureMenuItemsFragment != null) { - configureMenuItemsFragment.showExitDialog(); + configureMenuItemsFragment.exitFragment(); return; } diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java index d81e10f31d..3f081a547c 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java @@ -64,6 +64,7 @@ import net.osmand.plus.routepreparationmenu.WaypointsFragment; import net.osmand.plus.routing.RouteProvider.GPXRouteParamsBuilder; import net.osmand.plus.routing.RoutingHelper; import net.osmand.plus.settings.BaseSettingsFragment; +import net.osmand.plus.settings.ConfigureMenuRootFragment.ScreenType; import net.osmand.plus.views.BaseMapLayer; import net.osmand.plus.views.MapControlsLayer; import net.osmand.plus.views.MapTileLayer; @@ -98,11 +99,15 @@ import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_SEARCH_ID; import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_SETTINGS_ID; import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_TRAVEL_GUIDES_ID; import static net.osmand.aidlapi.OsmAndCustomizationConstants.MAP_CONTEXT_MENU_ADD_GPX_WAYPOINT; +import static net.osmand.aidlapi.OsmAndCustomizationConstants.MAP_CONTEXT_MENU_ADD_ID; import static net.osmand.aidlapi.OsmAndCustomizationConstants.MAP_CONTEXT_MENU_AVOID_ROAD; import static net.osmand.aidlapi.OsmAndCustomizationConstants.MAP_CONTEXT_MENU_DIRECTIONS_FROM_ID; import static net.osmand.aidlapi.OsmAndCustomizationConstants.MAP_CONTEXT_MENU_EDIT_GPX_WP; +import static net.osmand.aidlapi.OsmAndCustomizationConstants.MAP_CONTEXT_MENU_MARKER_ID; import static net.osmand.aidlapi.OsmAndCustomizationConstants.MAP_CONTEXT_MENU_MEASURE_DISTANCE; +import static net.osmand.aidlapi.OsmAndCustomizationConstants.MAP_CONTEXT_MENU_MORE_ID; import static net.osmand.aidlapi.OsmAndCustomizationConstants.MAP_CONTEXT_MENU_SEARCH_NEARBY; +import static net.osmand.aidlapi.OsmAndCustomizationConstants.MAP_CONTEXT_MENU_SHARE_ID; import static net.osmand.plus.ContextMenuAdapter.PROFILES_CHOSEN_PROFILE_TAG; import static net.osmand.plus.ContextMenuAdapter.PROFILES_CONTROL_BUTTON_TAG; import static net.osmand.plus.ContextMenuAdapter.PROFILES_NORMAL_PROFILE_TAG; @@ -332,9 +337,102 @@ public class MapActivityActions implements DialogProvider { } public void contextMenuPoint(final double latitude, final double longitude, final ContextMenuAdapter iadapter, Object selectedObj) { - final ContextMenuAdapter adapter = iadapter == null ? new ContextMenuAdapter() : iadapter; + final ContextMenuAdapter adapter = getContextMenuAdapter(iadapter, selectedObj); + final ArrayAdapter listAdapter = + adapter.createListAdapter(mapActivity, getMyApplication().getSettings().isLightContent()); + + AdditionalActionsBottomSheetDialogFragment actionsBottomSheetDialogFragment = new AdditionalActionsBottomSheetDialogFragment(); + actionsBottomSheetDialogFragment.setAdapter(adapter, new AdditionalActionsBottomSheetDialogFragment.ContextMenuItemClickListener() { + @Override + public void onItemClick(int position) { + ContextMenuItem item = adapter.getItem(position); + int standardId = item.getTitleId(); + ItemClickListener click = item.getItemClickListener(); + if (click != null) { + click.onContextMenuClick(listAdapter, standardId, position, false, null); + } else if (standardId == R.string.context_menu_item_search) { + mapActivity.showQuickSearch(latitude, longitude); + } else if (standardId == R.string.context_menu_item_directions_from) { + if (OsmAndLocationProvider.isLocationPermissionAvailable(mapActivity)) { + enterDirectionsFromPoint(latitude, longitude); + } else if (!ActivityCompat.shouldShowRequestPermissionRationale(mapActivity, Manifest.permission.ACCESS_FINE_LOCATION)) { + mapActivity.getMyApplication().showToastMessage(R.string.ask_for_location_permission); + } else { + ActivityCompat.requestPermissions(mapActivity, new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, REQUEST_LOCATION_FOR_DIRECTIONS_NAVIGATION_PERMISSION); + } + } else if (standardId == R.string.measurement_tool) { + mapActivity.getContextMenu().close(); + MeasurementToolFragment.showInstance(mapActivity.getSupportFragmentManager(), new LatLon(latitude, longitude)); + } else if (standardId == R.string.avoid_road) { + getMyApplication().getAvoidSpecificRoads().addImpassableRoad(mapActivity, new LatLon(latitude, longitude), true, false, null); + } + } + }); + actionsBottomSheetDialogFragment.show(mapActivity.getSupportFragmentManager(), AdditionalActionsBottomSheetDialogFragment.TAG); + } + + public void showActionsBottomSheet(final double latitude, final double longitude, final ContextMenuAdapter adapter) { + final ArrayAdapter listAdapter = + adapter.createListAdapter(mapActivity, getMyApplication().getSettings().isLightContent()); + + AdditionalActionsBottomSheetDialogFragment actionsBottomSheetDialogFragment = new AdditionalActionsBottomSheetDialogFragment(); + actionsBottomSheetDialogFragment.setAdapter(adapter, new AdditionalActionsBottomSheetDialogFragment.ContextMenuItemClickListener() { + @Override + public void onItemClick(int position) { + ContextMenuItem item = adapter.getItem(position); + int standardId = item.getTitleId(); + ItemClickListener click = item.getItemClickListener(); + if (click != null) { + click.onContextMenuClick(listAdapter, standardId, position, false, null); + } else if (standardId == R.string.context_menu_item_search) { + mapActivity.showQuickSearch(latitude, longitude); + } else if (standardId == R.string.context_menu_item_directions_from) { + if (OsmAndLocationProvider.isLocationPermissionAvailable(mapActivity)) { + enterDirectionsFromPoint(latitude, longitude); + } else if (!ActivityCompat.shouldShowRequestPermissionRationale(mapActivity, Manifest.permission.ACCESS_FINE_LOCATION)) { + mapActivity.getMyApplication().showToastMessage(R.string.ask_for_location_permission); + } else { + ActivityCompat.requestPermissions(mapActivity, new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, REQUEST_LOCATION_FOR_DIRECTIONS_NAVIGATION_PERMISSION); + } + } else if (standardId == R.string.measurement_tool) { + mapActivity.getContextMenu().close(); + MeasurementToolFragment.showInstance(mapActivity.getSupportFragmentManager(), new LatLon(latitude, longitude)); + } else if (standardId == R.string.avoid_road) { + getMyApplication().getAvoidSpecificRoads().addImpassableRoad(mapActivity, new LatLon(latitude, longitude), true, false, null); + } + } + }); + actionsBottomSheetDialogFragment.show(mapActivity.getSupportFragmentManager(), AdditionalActionsBottomSheetDialogFragment.TAG); + } + + public ContextMenuAdapter getContextMenuAdapter(final ContextMenuAdapter iadapter, Object selectedObj) { + ContextMenuAdapter adapter = iadapter == null ? new ContextMenuAdapter() : iadapter; ItemBuilder itemBuilder = new ItemBuilder(); + adapter.addItem(itemBuilder + .setTitleId(R.string.shared_string_add, mapActivity) + .setId(MAP_CONTEXT_MENU_ADD_ID) + .setIcon(R.drawable.map_action_fav_dark) + .setOrder(0) + .createItem()); + adapter.addItem(itemBuilder + .setTitleId(R.string.shared_string_marker, mapActivity) + .setId(MAP_CONTEXT_MENU_MARKER_ID) + .setIcon(R.drawable.map_action_flag_dark) + .setOrder(1) + .createItem()); + adapter.addItem(itemBuilder + .setTitleId(R.string.shared_string_share, mapActivity) + .setId(MAP_CONTEXT_MENU_SHARE_ID) + .setIcon(R.drawable.map_action_gshare_dark) + .setOrder(2) + .createItem()); + adapter.addItem(itemBuilder + .setTitleId(R.string.shared_string_actions, mapActivity) + .setId(MAP_CONTEXT_MENU_MORE_ID) + .setIcon(R.drawable.map_overflow_menu_white) + .setOrder(3) + .createItem()); adapter.addItem(itemBuilder .setTitleId(R.string.context_menu_item_directions_from, mapActivity) .setId(MAP_CONTEXT_MENU_DIRECTIONS_FROM_ID) @@ -348,7 +446,9 @@ public class MapActivityActions implements DialogProvider { .setOrder(SEARCH_NEAR_ITEM_ORDER) .createItem()); - OsmandPlugin.registerMapContextMenu(mapActivity, latitude, longitude, adapter, selectedObj); +// if (register){ +// OsmandPlugin.registerMapContextMenu(mapActivity, latitude, longitude, adapter, selectedObj); +// } ItemClickListener listener = new ItemClickListener() { @Override @@ -395,38 +495,7 @@ public class MapActivityActions implements DialogProvider { .createItem()); adapter.sortItemsByOrder(); - - final ArrayAdapter listAdapter = - adapter.createListAdapter(mapActivity, getMyApplication().getSettings().isLightContent()); - - AdditionalActionsBottomSheetDialogFragment actionsBottomSheetDialogFragment = new AdditionalActionsBottomSheetDialogFragment(); - actionsBottomSheetDialogFragment.setAdapter(adapter, new AdditionalActionsBottomSheetDialogFragment.ContextMenuItemClickListener() { - @Override - public void onItemClick(int position) { - ContextMenuItem item = adapter.getItem(position); - int standardId = item.getTitleId(); - ItemClickListener click = item.getItemClickListener(); - if (click != null) { - click.onContextMenuClick(listAdapter, standardId, position, false, null); - } else if (standardId == R.string.context_menu_item_search) { - mapActivity.showQuickSearch(latitude, longitude); - } else if (standardId == R.string.context_menu_item_directions_from) { - if (OsmAndLocationProvider.isLocationPermissionAvailable(mapActivity)) { - enterDirectionsFromPoint(latitude, longitude); - } else if (!ActivityCompat.shouldShowRequestPermissionRationale(mapActivity, Manifest.permission.ACCESS_FINE_LOCATION)) { - mapActivity.getMyApplication().showToastMessage(R.string.ask_for_location_permission); - } else { - ActivityCompat.requestPermissions(mapActivity, new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, REQUEST_LOCATION_FOR_DIRECTIONS_NAVIGATION_PERMISSION); - } - } else if (standardId == R.string.measurement_tool) { - mapActivity.getContextMenu().close(); - MeasurementToolFragment.showInstance(mapActivity.getSupportFragmentManager(), new LatLon(latitude, longitude)); - } else if (standardId == R.string.avoid_road) { - getMyApplication().getAvoidSpecificRoads().addImpassableRoad(mapActivity, new LatLon(latitude, longitude), true, false, null); - } - } - }); - actionsBottomSheetDialogFragment.show(mapActivity.getSupportFragmentManager(), AdditionalActionsBottomSheetDialogFragment.TAG); + return adapter; } public void enterDirectionsFromPoint(final double latitude, final double longitude) { @@ -1125,6 +1194,7 @@ public class MapActivityActions implements DialogProvider { } menuItemsListView.setDivider(null); final ContextMenuAdapter contextMenuAdapter = createMainOptionsMenu(); + contextMenuAdapter.initItemsCustomOrder(getMyApplication(), ScreenType.DRAWER); contextMenuAdapter.setDefaultLayoutId(R.layout.simple_list_menu_item); final ArrayAdapter simpleListAdapter = contextMenuAdapter.createListAdapter(mapActivity, !nightMode); diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java b/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java index 8815bd0e22..6bc0462bc9 100644 --- a/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java +++ b/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java @@ -77,6 +77,7 @@ import net.osmand.plus.rastermaps.OsmandRasterMapsPlugin; import net.osmand.plus.routepreparationmenu.RoutingOptionsHelper.LocalRoutingParameter; import net.osmand.plus.routing.IRouteInformationListener; import net.osmand.plus.routing.RoutingHelper; +import net.osmand.plus.settings.ConfigureMenuRootFragment.ScreenType; import net.osmand.plus.srtmplugin.ContourLinesMenu; import net.osmand.plus.srtmplugin.SRTMPlugin; import net.osmand.plus.srtmplugin.TerrainFragment; @@ -697,6 +698,7 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks, IRouteInfo cm = mapActivity.getMapLayers().getMapWidgetRegistry().getViewConfigureMenuAdapter(mapActivity); } else if (visibleType == DashboardType.CONFIGURE_MAP) { cm = new ConfigureMapMenu().createListAdapter(mapActivity); + cm.initItemsCustomOrder(getMyApplication(), ScreenType.CONFIGURE_MAP); } else if (visibleType == DashboardType.LIST_MENU) { cm = mapActivity.getMapActions().createMainOptionsMenu(); } else if (visibleType == DashboardType.ROUTE_PREFERENCES) { diff --git a/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java b/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java index 4b991c2b8e..f9336ea1aa 100644 --- a/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java +++ b/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java @@ -51,6 +51,7 @@ import net.osmand.plus.inapp.InAppPurchaseHelper; import net.osmand.plus.poi.PoiFiltersHelper; import net.osmand.plus.rastermaps.OsmandRasterMapsPlugin; import net.osmand.plus.render.RendererRegistry; +import net.osmand.plus.settings.ConfigureMenuRootFragment.ScreenType; import net.osmand.plus.srtmplugin.SRTMPlugin; import net.osmand.plus.views.OsmandMapTileView; import net.osmand.plus.views.corenative.NativeCoreContext; @@ -151,7 +152,6 @@ public class ConfigureMapMenu { adapter.setNightMode(nightMode); createLayersItems(customRules, adapter, ma, themeRes, nightMode); createRenderingAttributeItems(customRules, adapter, ma, themeRes, nightMode); - return adapter; } diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenu.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenu.java index 2d0377ea0d..b67a70b1c0 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenu.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenu.java @@ -1064,16 +1064,24 @@ public class MapContextMenu extends MenuTitleController implements StateChangedL public void buttonMorePressed() { MapActivity mapActivity = getMapActivity(); if (mapActivity != null) { - final ContextMenuAdapter menuAdapter = new ContextMenuAdapter(); LatLon latLon = getLatLon(); - for (OsmandMapLayer layer : mapActivity.getMapView().getLayers()) { - layer.populateObjectContextMenu(latLon, getObject(), menuAdapter, mapActivity); - } - - mapActivity.getMapActions().contextMenuPoint(latLon.getLatitude(), latLon.getLongitude(), menuAdapter, getObject()); + mapActivity.getMapActions().contextMenuPoint(latLon.getLatitude(), latLon.getLongitude(), getAdapter(), getObject()); } } + public ContextMenuAdapter getAdapter() { + final ContextMenuAdapter menuAdapter = new ContextMenuAdapter(); + MapActivity mapActivity = getMapActivity(); + if (mapActivity != null) { +// LatLon latLon = getLatLon(); +// for (OsmandMapLayer layer : mapActivity.getMapView().getLayers()) { +// layer.populateObjectContextMenu(latLon, getObject(), menuAdapter, mapActivity); +// } + mapActivity.getMapActions().getContextMenuAdapter(menuAdapter, getObject()); + } + return menuAdapter; + } + private void callMenuAction(boolean waitForAddressLookup, MenuAction menuAction) { if (searchingAddress() && waitForAddressLookup) { ProgressDialog dlg = buildSearchActionDialog(); diff --git a/OsmAnd/src/net/osmand/plus/settings/ConfigureMenuItemsFragment.java b/OsmAnd/src/net/osmand/plus/settings/ConfigureMenuItemsFragment.java index 0ecfe40248..6f74f76c3f 100644 --- a/OsmAnd/src/net/osmand/plus/settings/ConfigureMenuItemsFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/ConfigureMenuItemsFragment.java @@ -5,6 +5,7 @@ import android.content.Context; import android.content.DialogInterface; import android.os.Build; import android.os.Bundle; +import android.view.ContextMenu; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -19,9 +20,11 @@ import androidx.fragment.app.FragmentActivity; import androidx.fragment.app.FragmentManager; import androidx.recyclerview.widget.ItemTouchHelper; import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.PagerSnapHelper; import androidx.recyclerview.widget.RecyclerView; import net.osmand.AndroidUtils; +import net.osmand.plus.ApplicationMode; import net.osmand.plus.ContextMenuAdapter; import net.osmand.plus.ContextMenuItem; import net.osmand.plus.OsmandApplication; @@ -31,17 +34,21 @@ import net.osmand.plus.activities.MapActivity; import net.osmand.plus.activities.MapActivityActions; import net.osmand.plus.base.BaseOsmAndFragment; import net.osmand.plus.dialogs.ConfigureMapMenu; +import net.osmand.plus.mapcontextmenu.MapContextMenu; import net.osmand.plus.settings.ConfigureMenuRootFragment.ScreenType; +import net.osmand.plus.settings.bottomsheets.ChangeGeneralProfilesPrefBottomSheet; import net.osmand.plus.views.controls.ReorderItemTouchHelperCallback; import net.osmand.plus.settings.RearrangeMenuItemsAdapter.AdapterItem; import net.osmand.plus.settings.RearrangeMenuItemsAdapter.MenuItemsAdapterListener; +import java.io.Serializable; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.List; +import static net.osmand.aidlapi.OsmAndCustomizationConstants.MAP_CONTEXT_MENU_MORE_ID; import static net.osmand.plus.settings.RearrangeMenuItemsAdapter.AdapterItemType.BUTTON; import static net.osmand.plus.settings.RearrangeMenuItemsAdapter.AdapterItemType.DESCRIPTION; import static net.osmand.plus.settings.RearrangeMenuItemsAdapter.AdapterItemType.DIVIDER; @@ -63,6 +70,7 @@ public class ConfigureMenuItemsFragment extends BaseOsmAndFragment { private ScreenType screenType; private boolean nightMode; private boolean wasReset = false; + private boolean isChanged = false; @Override public void onSaveInstanceState(@NonNull Bundle outState) { @@ -100,6 +108,8 @@ public class ConfigureMenuItemsFragment extends BaseOsmAndFragment { contextMenuAdapter = configureMapMenu.createListAdapter((MapActivity) activity); break; case CONTEXT_MENU_ACTIONS: + MapContextMenu menu = ((MapActivity) activity).getContextMenu(); + contextMenuAdapter = menu.getAdapter(); break; } } @@ -111,19 +121,20 @@ public class ConfigureMenuItemsFragment extends BaseOsmAndFragment { hiddenMenuItems = savedInstanceState.getStringArrayList(HIDDEN_ITEMS_KEY); menuItemsOrder = (HashMap) savedInstanceState.getSerializable(ITEMS_ORDER_KEY); } else { - hiddenMenuItems = getHiddenItemsIds(screenType); - menuItemsOrder = contextMenuAdapter.getMenuItemsOrder(getItemsIdsOrder(screenType)); + hiddenMenuItems = contextMenuAdapter.getHiddenItemsIds(app, screenType); + menuItemsOrder = contextMenuAdapter.getMenuItemsOrder(contextMenuAdapter.getItemsIdsOrder(app, screenType)); } } @Nullable @Override - public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { + public View onCreateView(@NonNull LayoutInflater inflater, @Nullable final ViewGroup container, @Nullable Bundle savedInstanceState) { View root = mInflater.inflate(R.layout.edit_arrangement_list_fragment, container, false); Toolbar toolbar = root.findViewById(R.id.toolbar); TextView toolbarTitle = root.findViewById(R.id.toolbar_title); ImageButton toolbarButton = root.findViewById(R.id.close_button); RecyclerView recyclerView = root.findViewById(R.id.profiles_list); + recyclerView.setPadding(0, 0, 0, AndroidUtils.dpToPx(app, 72)); toolbar.setBackgroundColor(nightMode ? getResources().getColor(R.color.list_background_color_dark) : getResources().getColor(R.color.list_background_color_light)); @@ -135,7 +146,7 @@ public class ConfigureMenuItemsFragment extends BaseOsmAndFragment { toolbarButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { - showExitDialog(); + exitFragment(); } }); @@ -174,6 +185,7 @@ public class ConfigureMenuItemsFragment extends BaseOsmAndFragment { hiddenMenuItems.remove(menuItemBase.getId()); } wasReset = false; + isChanged = true; rearrangeAdapter.updateItems(getAdapterItems()); } } @@ -182,6 +194,7 @@ public class ConfigureMenuItemsFragment extends BaseOsmAndFragment { public void onItemMoved(String id, int position) { menuItemsOrder.put(id, position); wasReset = false; + isChanged = true; } }; rearrangeAdapter.setListener(listener); @@ -204,19 +217,45 @@ public class ConfigureMenuItemsFragment extends BaseOsmAndFragment { applyButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { - if (wasReset) { - resetMenuItems(screenType); - } else { - saveHiddenItemsIds(screenType, hiddenMenuItems); +// if (wasReset) { +// contextMenuAdapter.resetMenuItems(app, screenType); +// } else { + HashMap prefsMap = new HashMap<>(); + prefsMap.put(contextMenuAdapter.getPrefIdHidden(app, screenType), (Serializable) hiddenMenuItems); +// contextMenuAdapter.saveHiddenItemsIds(app, screenType, hiddenMenuItems); + List defItems = contextMenuAdapter.getDefaultItems(screenType); contextMenuAdapter.reorderMenuItems(defItems, menuItemsOrder); List ids = new ArrayList<>(); for (ContextMenuItem item : defItems) { ids.add(item.getId()); } - saveItemsIdsOrder(screenType, ids); - } - dismissFragment(); + prefsMap.put(contextMenuAdapter.getPrefIdOrder(app, screenType), (Serializable) ids); + + FragmentManager fm = getFragmentManager(); + ApplicationMode appMode = app.getSettings().getApplicationMode(); + if (fm != null) { + ChangeGeneralProfilesPrefBottomSheet.showInstance( + fm, + prefsMap, + getTargetFragment(), + false, + appMode, + new ChangeGeneralProfilesPrefBottomSheet.OnChangeSettingListener() { + @Override + public void onApplied() { + dismissFragment(); + } + + @Override + public void onDiscard() { + + } + }); + } +// contextMenuAdapter.saveItemsIdsOrder(app, screenType, ids); +// } +// dismissFragment(); } }); if (Build.VERSION.SDK_INT >= 21) { @@ -231,7 +270,29 @@ public class ConfigureMenuItemsFragment extends BaseOsmAndFragment { List visible = contextMenuAdapter.getItemsForRearrangeAdapter(screenType, hiddenMenuItems, wasReset ? null : menuItemsOrder, false); List hiddenItems = contextMenuAdapter.getItemsForRearrangeAdapter(screenType, hiddenMenuItems, wasReset ? null : menuItemsOrder, true); - items.addAll(visible); + if (screenType == ScreenType.CONTEXT_MENU_ACTIONS) { + List main = new ArrayList<>(); + int actionsIndex = 3; + for (int i = 0; i < visible.size(); i++) { + if (((ContextMenuItem) visible.get(i).getValue()).getId().equals(MAP_CONTEXT_MENU_MORE_ID)) { + actionsIndex = i; + break; + } + } + for (int i = 0; i < actionsIndex + 1; i++) { + main.add(visible.get(i)); + } + items.add(new AdapterItem(HEADER, new RearrangeMenuItemsAdapter.HeaderItem(R.string.main_actions, R.string.main_actions_descr))); + items.addAll(main); + items.add(new AdapterItem(HEADER, new RearrangeMenuItemsAdapter.HeaderItem(R.string.additional_actions, R.string.additional_actions_descr))); + List additional = new ArrayList<>(); + for (int i = 4; i < visible.size(); i++) { + additional.add(visible.get(i)); + } + items.addAll(additional); + } else { + items.addAll(visible); + } if (!hiddenItems.isEmpty()) { items.add(new AdapterItem(HEADER, new RearrangeMenuItemsAdapter.HeaderItem(R.string.shared_string_hidden, R.string.hidden_items_descr))); items.addAll(hiddenItems); @@ -246,6 +307,7 @@ public class ConfigureMenuItemsFragment extends BaseOsmAndFragment { hiddenMenuItems.clear(); menuItemsOrder.clear(); wasReset = true; + isChanged = true; rearrangeAdapter.updateItems(getAdapterItems()); } }))); @@ -261,6 +323,14 @@ public class ConfigureMenuItemsFragment extends BaseOsmAndFragment { return items; } + public void exitFragment() { + if (isChanged) { + showExitDialog(); + } else { + dismissFragment(); + } + } + public void showExitDialog() { Context themedContext = UiUtilities.getThemedContext(getActivity(), nightMode); AlertDialog.Builder dismissDialog = new AlertDialog.Builder(themedContext); @@ -286,71 +356,4 @@ public class ConfigureMenuItemsFragment extends BaseOsmAndFragment { private void setScreenType(@NonNull ScreenType screenType) { this.screenType = screenType; } - - private void resetMenuItems(@NonNull ScreenType screenType) { - saveHiddenItemsIds(screenType, null); - saveItemsIdsOrder(screenType, null); - } - - @NonNull - private List getHiddenItemsIds(@NonNull ScreenType type) { - List hiddenItemsIds = null; - switch (type) { - case DRAWER: - hiddenItemsIds = app.getSettings().HIDDEN_DRAWER_ITEMS.getStringsList(); - break; - case CONFIGURE_MAP: - hiddenItemsIds = app.getSettings().HIDDEN_CONFIGURE_MAP_ITEMS.getStringsList(); - break; - case CONTEXT_MENU_ACTIONS: - hiddenItemsIds = app.getSettings().HIDDEN_CONTEXT_MENU_ACTIONS_ITEMS.getStringsList(); - break; - } - return hiddenItemsIds != null ? new ArrayList<>(hiddenItemsIds) : new ArrayList(); - } - - @NonNull - private List getItemsIdsOrder(@NonNull ScreenType type) { - List hiddenItemsIds = null; - switch (type) { - case DRAWER: - hiddenItemsIds = app.getSettings().DRAWER_ITEMS_ORDER.getStringsList(); - break; - case CONFIGURE_MAP: - hiddenItemsIds = app.getSettings().CONFIGURE_MAP_ITEMS_ORDER.getStringsList(); - break; - case CONTEXT_MENU_ACTIONS: - hiddenItemsIds = app.getSettings().CONTEXT_MENU_ACTIONS_ITEMS_ORDER.getStringsList(); - break; - } - return hiddenItemsIds != null ? new ArrayList<>(hiddenItemsIds) : new ArrayList(); - } - - private void saveHiddenItemsIds(@NonNull ScreenType type, @Nullable List hiddenItemsIds) { - switch (type) { - case DRAWER: - app.getSettings().HIDDEN_DRAWER_ITEMS.setStringsList(hiddenItemsIds); - break; - case CONFIGURE_MAP: - app.getSettings().HIDDEN_CONFIGURE_MAP_ITEMS.setStringsList(hiddenItemsIds); - break; - case CONTEXT_MENU_ACTIONS: - app.getSettings().HIDDEN_CONTEXT_MENU_ACTIONS_ITEMS.setStringsList(hiddenItemsIds); - break; - } - } - - private void saveItemsIdsOrder(@NonNull ScreenType type, @Nullable List itemsIdsOrder) { - switch (type) { - case DRAWER: - app.getSettings().DRAWER_ITEMS_ORDER.setStringsList(itemsIdsOrder); - break; - case CONFIGURE_MAP: - app.getSettings().CONFIGURE_MAP_ITEMS_ORDER.setStringsList(itemsIdsOrder); - break; - case CONTEXT_MENU_ACTIONS: - app.getSettings().CONTEXT_MENU_ACTIONS_ITEMS_ORDER.setStringsList(itemsIdsOrder); - break; - } - } } diff --git a/OsmAnd/src/net/osmand/plus/settings/ConfigureMenuRootFragment.java b/OsmAnd/src/net/osmand/plus/settings/ConfigureMenuRootFragment.java index 238bb5ac9e..c85c4ebd14 100644 --- a/OsmAnd/src/net/osmand/plus/settings/ConfigureMenuRootFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/ConfigureMenuRootFragment.java @@ -1,5 +1,6 @@ package net.osmand.plus.settings; +import android.app.Activity; import android.content.Intent; import android.os.Build; import android.os.Bundle; @@ -26,11 +27,15 @@ import androidx.recyclerview.widget.RecyclerView; import net.osmand.AndroidUtils; import net.osmand.PlatformUtil; import net.osmand.plus.ApplicationMode; +import net.osmand.plus.ContextMenuAdapter; import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; import net.osmand.plus.UiUtilities; +import net.osmand.plus.activities.MapActivity; +import net.osmand.plus.activities.MapActivityActions; import net.osmand.plus.activities.PluginsActivity; import net.osmand.plus.base.BaseOsmAndFragment; +import net.osmand.plus.dialogs.ConfigureMapMenu; import net.osmand.plus.helpers.FontCache; import net.osmand.plus.widgets.style.CustomTypefaceSpan; @@ -41,6 +46,8 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import static net.osmand.plus.settings.ConfigureMenuRootFragment.ScreenType.CONFIGURE_MAP; + public class ConfigureMenuRootFragment extends BaseOsmAndFragment { public static final String TAG = ConfigureMenuRootFragment.class.getName(); @@ -202,22 +209,29 @@ public class ConfigureMenuRootFragment extends BaseOsmAndFragment { } private String getSubTitleText(ScreenType type) { - List hiddenItems = null; - switch (type) { - case DRAWER: - hiddenItems = app.getSettings().HIDDEN_DRAWER_ITEMS.getStringsList(); - break; - case CONFIGURE_MAP: - hiddenItems = app.getSettings().HIDDEN_CONFIGURE_MAP_ITEMS.getStringsList(); - break; - case CONTEXT_MENU_ACTIONS: - hiddenItems = app.getSettings().HIDDEN_CONTEXT_MENU_ACTIONS_ITEMS.getStringsList(); - break; + ContextMenuAdapter contextMenuAdapter = null; + Activity activity = getActivity(); + if (activity instanceof MapActivity) { + switch (type) { + case DRAWER: + MapActivityActions mapActivityActions = new MapActivityActions((MapActivity) activity); + contextMenuAdapter = mapActivityActions.createMainOptionsMenu(); + break; + case CONFIGURE_MAP: + ConfigureMapMenu configureMapMenu = new ConfigureMapMenu(); + contextMenuAdapter = configureMapMenu.createListAdapter((MapActivity) activity); + break; + case CONTEXT_MENU_ACTIONS: + ConfigureMapMenu configureaMapMenu = new ConfigureMapMenu(); + contextMenuAdapter = configureaMapMenu.createListAdapter((MapActivity) activity); + break; + } + int hiddenCount = contextMenuAdapter.getHiddenItemsIds(app, type).size(); + int allCount = contextMenuAdapter.getDefaultItems(type).size(); + String amount = getString(R.string.n_items_of_z, String.valueOf(allCount - hiddenCount), String.valueOf(allCount)); + return getString(R.string.ltr_or_rtl_combine_via_colon, getString(R.string.shared_string_items), amount); } - int hiddenCount = hiddenItems != null ? hiddenItems.size() : 0; - int allCount = 0; - String amount = getString(R.string.n_items_of_z, String.valueOf(allCount - hiddenCount), String.valueOf(allCount)); - return getString(R.string.ltr_or_rtl_combine_via_colon, getString(R.string.shared_string_items), amount); + return ""; } class DescriptionHolder extends RecyclerView.ViewHolder { diff --git a/OsmAnd/src/net/osmand/plus/settings/ConfigureProfileFragment.java b/OsmAnd/src/net/osmand/plus/settings/ConfigureProfileFragment.java index 256c376e42..52a921e68e 100644 --- a/OsmAnd/src/net/osmand/plus/settings/ConfigureProfileFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/ConfigureProfileFragment.java @@ -390,9 +390,10 @@ public class ConfigureProfileFragment extends BaseSettingsFragment implements Co return; } Preference uiCustomization = findPreference(UI_CUSTOMIZATION); -// TODO change icon - uiCustomization.setIcon(getContentIcon(getSelectedAppMode().getIconRes())); - uiCustomization.setFragment(ConfigureMenuRootFragment.TAG); + if (uiCustomization != null) { + uiCustomization.setIcon(getContentIcon(R.drawable.ic_action_ui_customization)); + uiCustomization.setFragment(ConfigureMenuRootFragment.TAG); + } } @Override diff --git a/OsmAnd/src/net/osmand/plus/settings/RearrangeMenuItemsAdapter.java b/OsmAnd/src/net/osmand/plus/settings/RearrangeMenuItemsAdapter.java index ec90689e9d..5f92b061f7 100644 --- a/OsmAnd/src/net/osmand/plus/settings/RearrangeMenuItemsAdapter.java +++ b/OsmAnd/src/net/osmand/plus/settings/RearrangeMenuItemsAdapter.java @@ -6,6 +6,7 @@ import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; +import android.widget.FrameLayout; import android.widget.ImageView; import android.widget.TextView; @@ -21,6 +22,7 @@ import net.osmand.plus.ContextMenuItem; import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; import net.osmand.plus.UiUtilities; +import net.osmand.plus.helpers.FontCache; import net.osmand.plus.views.controls.ReorderItemTouchHelperCallback; import net.osmand.plus.settings.ConfigureMenuRootFragment.ScreenType; @@ -29,6 +31,7 @@ import java.util.Collections; import java.util.List; import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_DIVIDER_ID; +import static net.osmand.aidlapi.OsmAndCustomizationConstants.MAP_CONTEXT_MENU_MORE_ID; import static net.osmand.aidlapi.OsmAndCustomizationConstants.MAP_RENDERING_CATEGORY_ID; import static net.osmand.aidlapi.OsmAndCustomizationConstants.RENDERING_ITEMS_ID_SCHEME; import static net.osmand.aidlapi.OsmAndCustomizationConstants.SHOW_CATEGORY_ID; @@ -96,14 +99,30 @@ public class RearrangeMenuItemsAdapter extends RecyclerView.Adapter prefsMap; + + @Nullable + private OnChangeSettingListener listener; + + public void setListener(@Nullable OnChangeSettingListener listener) { + this.listener = listener; + } + @Override public void createMenuItems(Bundle savedInstanceState) { final OsmandApplication app = getMyApplication(); @@ -39,11 +58,12 @@ public class ChangeGeneralProfilesPrefBottomSheet extends BasePreferenceBottomSh if (app == null || args == null) { return; } - final String prefId = args.getString(PREFERENCE_ID); + prefId = args.getString(PREFERENCE_ID); newValue = args.getSerializable(NEW_VALUE_KEY); - if (newValue == null || prefId == null) { - return; - } + prefsMap = (HashMap) args.getSerializable(PREFS_MAP_KEY); +// if (newValue == null || prefId == null) { +// return; +// } items.add(new TitleItem(getString(R.string.change_default_settings))); items.add(new LongDescriptionItem(getString(R.string.apply_preference_to_all_profiles))); @@ -55,8 +75,15 @@ public class ChangeGeneralProfilesPrefBottomSheet extends BasePreferenceBottomSh .setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { - app.getSettings().setPreferenceForAllModes(prefId, newValue); + if (prefsMap != null) { + savePrefs(app, prefsMap, true); + } else if (newValue != null || prefId != null) { + app.getSettings().setPreferenceForAllModes(prefId, newValue); + } updateTargetSettings(false, true); + if (listener != null) { + listener.onApplied(); + } dismiss(); } }) @@ -72,8 +99,15 @@ public class ChangeGeneralProfilesPrefBottomSheet extends BasePreferenceBottomSh .setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { - app.getSettings().setPreference(prefId, newValue, getAppMode()); + if (prefsMap != null) { + savePrefs(app, prefsMap, false); + } else if (newValue != null || prefId != null) { + app.getSettings().setPreference(prefId, newValue, getAppMode()); + } updateTargetSettings(false, false); + if (listener != null) { + listener.onApplied(); + } dismiss(); } }) @@ -88,6 +122,9 @@ public class ChangeGeneralProfilesPrefBottomSheet extends BasePreferenceBottomSh @Override public void onClick(View v) { updateTargetSettings(true, false); + if (listener != null) { + listener.onDiscard(); + } dismiss(); } }) @@ -106,6 +143,18 @@ public class ChangeGeneralProfilesPrefBottomSheet extends BasePreferenceBottomSh outState.putSerializable(NEW_VALUE_KEY, newValue); } + private void savePrefs(@NonNull OsmandApplication app, + @NonNull HashMap prefsMap, boolean toAllProfiles) { + List ids = new ArrayList<>(prefsMap.keySet()); + for (String id : ids) { + if (toAllProfiles) { + app.getSettings().setPreferenceForAllModes(id, prefsMap.get(id)); + } else { + app.getSettings().setPreference(id, prefsMap.get(id), getAppMode()); + } + } + } + private void updateTargetSettings(boolean discard, boolean appliedToAllProfiles) { BaseSettingsFragment target = (BaseSettingsFragment) getTargetFragment(); if (target != null) { @@ -129,23 +178,61 @@ public class ChangeGeneralProfilesPrefBottomSheet extends BasePreferenceBottomSh } } - public static void showInstance(@NonNull FragmentManager fm, String prefId, Serializable newValue, Fragment target, - boolean usedOnMap, @Nullable ApplicationMode appMode) { + public static void showInstance(@NonNull FragmentManager fm, + @Nullable String prefId, + @Nullable Serializable newValue, + Fragment target, + boolean usedOnMap, + @Nullable ApplicationMode appMode) { + showFragmentInstance(fm, prefId, newValue, null, target, usedOnMap, appMode, null); + } + + public static void showInstance(@NonNull FragmentManager fm, + @Nullable HashMap prefs, + Fragment target, + boolean usedOnMap, + @Nullable ApplicationMode appMode, + @Nullable OnChangeSettingListener listener) { + showFragmentInstance(fm, null, null, prefs, target, usedOnMap, appMode, listener); + } + + private static void showFragmentInstance(@NonNull FragmentManager fm, + @Nullable String prefId, + @Nullable Serializable newValue, + @Nullable HashMap prefs, + Fragment target, + boolean usedOnMap, + @Nullable ApplicationMode appMode, + @Nullable OnChangeSettingListener listener) { try { if (fm.findFragmentByTag(ChangeGeneralProfilesPrefBottomSheet.TAG) == null) { Bundle args = new Bundle(); - args.putString(PREFERENCE_ID, prefId); - args.putSerializable(NEW_VALUE_KEY, newValue); + if (prefId != null) { + args.putString(PREFERENCE_ID, prefId); + } + if (newValue != null) { + args.putSerializable(NEW_VALUE_KEY, newValue); + } + if (prefs != null) { + args.putSerializable(PREFS_MAP_KEY, prefs); + } ChangeGeneralProfilesPrefBottomSheet fragment = new ChangeGeneralProfilesPrefBottomSheet(); fragment.setArguments(args); fragment.setUsedOnMap(usedOnMap); fragment.setAppMode(appMode); fragment.setTargetFragment(target, 0); + fragment.setListener(listener); fragment.show(fm, ChangeGeneralProfilesPrefBottomSheet.TAG); } } catch (RuntimeException e) { LOG.error("showInstance", e); } } + + public interface OnChangeSettingListener { + void onApplied(); + + void onDiscard(); + } } \ No newline at end of file From 3fa6eb2bd89d3d9f8f9b2d1cb5ca38fc52b26312 Mon Sep 17 00:00:00 2001 From: Dima-1 Date: Tue, 7 Apr 2020 16:30:27 +0300 Subject: [PATCH 086/202] Fix sizes. --- OsmAnd/res/layout/preference_select_icon_button.xml | 12 ++++++------ OsmAnd/res/values/sizes.xml | 2 ++ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/OsmAnd/res/layout/preference_select_icon_button.xml b/OsmAnd/res/layout/preference_select_icon_button.xml index dde4fb5d64..d92a103c86 100644 --- a/OsmAnd/res/layout/preference_select_icon_button.xml +++ b/OsmAnd/res/layout/preference_select_icon_button.xml @@ -3,11 +3,11 @@ xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:padding="6dp"> + android:padding="@dimen/map_button_margin"> + android:layout_width="@dimen/setting_select_icon_button_width" + android:layout_height="@dimen/setting_select_icon_button_height"> + android:layout_gravity="center" /> + android:layout_gravity="center" /> \ No newline at end of file diff --git a/OsmAnd/res/values/sizes.xml b/OsmAnd/res/values/sizes.xml index 57f4331982..c0451504f4 100644 --- a/OsmAnd/res/values/sizes.xml +++ b/OsmAnd/res/values/sizes.xml @@ -356,6 +356,8 @@ 72dp 72dp 42dp + 128dp + 164dp 8dp 12dp From a000d0d30dadcede0672a683ccbc575f83894e55 Mon Sep 17 00:00:00 2001 From: Yaron Shahrabani Date: Tue, 7 Apr 2020 10:21:06 +0000 Subject: [PATCH 087/202] Translated using Weblate (Hebrew) Currently translated at 99.4% (3237 of 3254 strings) --- OsmAnd/res/values-he/strings.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OsmAnd/res/values-he/strings.xml b/OsmAnd/res/values-he/strings.xml index 543697755e..48e482faf1 100644 --- a/OsmAnd/res/values-he/strings.xml +++ b/OsmAnd/res/values-he/strings.xml @@ -3599,4 +3599,6 @@ לא ניתן לקרוא את %1$s. לא ניתן לכתוב את %1$s. לא ניתן לייבא את %1$s. + זה מסנן שחותך מהירויות נמוכות כדי לא להקליט נקודות מתחת למהירות מסוימת. הפעלת המסנן תגרום לכך שהמסלולים ייראו חלקים יותר כשמסתכלים על המפה. + טיולי סקי \ No newline at end of file From 6c2e143f77b1cb7e23192bf6adc0ee39a00f5277 Mon Sep 17 00:00:00 2001 From: ce4 Date: Tue, 7 Apr 2020 09:32:44 +0000 Subject: [PATCH 088/202] Translated using Weblate (German) Currently translated at 100.0% (3798 of 3798 strings) --- OsmAnd/res/values-de/phrases.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OsmAnd/res/values-de/phrases.xml b/OsmAnd/res/values-de/phrases.xml index 897fd51bfb..9d7b2ab0ea 100644 --- a/OsmAnd/res/values-de/phrases.xml +++ b/OsmAnd/res/values-de/phrases.xml @@ -740,7 +740,7 @@ Höchstgewicht Betreiber Eingestellt - Aufgelassen + Aufgegeben Maximale Höhe Telefon Internetseite @@ -848,7 +848,7 @@ Schwingtor Barriere Höhendurchfahrtbegrenzung - Ausfalltor + Ausfallstor Drehkreuz Kutschendurchlass Fußgängerübergang From 2233ed2db6a104ae9b91e3c70bd3aa1a82ec45b4 Mon Sep 17 00:00:00 2001 From: Hakuchi Date: Tue, 7 Apr 2020 11:55:23 +0000 Subject: [PATCH 089/202] Translated using Weblate (German) Currently translated at 100.0% (3798 of 3798 strings) --- OsmAnd/res/values-de/phrases.xml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/OsmAnd/res/values-de/phrases.xml b/OsmAnd/res/values-de/phrases.xml index 9d7b2ab0ea..605afd91f5 100644 --- a/OsmAnd/res/values-de/phrases.xml +++ b/OsmAnd/res/values-de/phrases.xml @@ -462,7 +462,7 @@ Nebenleuchtfeuer Feuerschiff Liegeplatz - Schifffahrtszeichen + Hinweis Pfahl Radarsender Funkstation @@ -3778,8 +3778,8 @@ Schichtvulkan Schild Maar - Caldera - Lavadom + Kessel + Lavakuppel Erde Letzter Ausbruch Erloschen @@ -3787,7 +3787,7 @@ Aktiv Inaktiv Anzahl der Ausbrüche - Gedenk-Geisterfahrrad + Geisterfahrrad Paintball Bergrettung Sicherheitsgeschäft @@ -3797,12 +3797,12 @@ Tauchzentrum SMS Video - Ja - Nein - Ja - Nein + ja + nein + ja + nein Nur wenn Gehen erlaubt ist - Kontrastiert + Kontrastreich Falsch Unterstand Unterstand-Art @@ -3819,6 +3819,6 @@ Behinderung Trinkwassernachfüllung: ja Trinkwassernachfüllung: nein - Trinkwassernachfüllnetz + Trinkwasser-Nachfüllnetzwerk Internetzugangsgebühr für Kunden \ No newline at end of file From aa839d4d4d99cdccc930a10ecdff6d0c0e7fa088 Mon Sep 17 00:00:00 2001 From: carmelo gayubi Date: Tue, 7 Apr 2020 09:30:09 +0000 Subject: [PATCH 090/202] Translated using Weblate (Aragonese) Currently translated at 0.0% (0 of 267 strings) Translation: OsmAnd/Telegram Translate-URL: https://hosted.weblate.org/projects/osmand/telegram/an/ --- OsmAnd-telegram/res/values-an/strings.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OsmAnd-telegram/res/values-an/strings.xml b/OsmAnd-telegram/res/values-an/strings.xml index a6b3daec93..271f0790cd 100644 --- a/OsmAnd-telegram/res/values-an/strings.xml +++ b/OsmAnd-telegram/res/values-an/strings.xml @@ -1,2 +1,4 @@ - \ No newline at end of file + + + \ No newline at end of file From ceb534c6d2243830c41ae2b72ceb36d4a40a00a2 Mon Sep 17 00:00:00 2001 From: veliymolfar Date: Tue, 7 Apr 2020 17:07:24 +0300 Subject: [PATCH 091/202] copy from another profile --- .../src/net/osmand/plus/OsmandSettings.java | 6 +-- .../settings/ConfigureMenuItemsFragment.java | 54 +++++++++++++------ 2 files changed, 41 insertions(+), 19 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/OsmandSettings.java b/OsmAnd/src/net/osmand/plus/OsmandSettings.java index 30385c59f9..ed3a6128d8 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandSettings.java +++ b/OsmAnd/src/net/osmand/plus/OsmandSettings.java @@ -414,7 +414,7 @@ public class OsmandSettings { } } else if (preference instanceof ListStringPreference) { if (value instanceof List) { - ((ListStringPreference) preference).setModeValue(mode, (List) value); + ((ListStringPreference) preference).setModeValues(mode, (List) value); return true; } } else if (preference instanceof StringPreference) { @@ -1084,9 +1084,9 @@ public class OsmandSettings { } } - public boolean setModeValue(ApplicationMode mode, List values) { + public boolean setModeValues(ApplicationMode mode, List values) { if (values == null || values.size() == 0) { - set(null); + setModeValue(mode,null); return false; } clearAll(); diff --git a/OsmAnd/src/net/osmand/plus/settings/ConfigureMenuItemsFragment.java b/OsmAnd/src/net/osmand/plus/settings/ConfigureMenuItemsFragment.java index 6f74f76c3f..f4aca1993f 100644 --- a/OsmAnd/src/net/osmand/plus/settings/ConfigureMenuItemsFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/ConfigureMenuItemsFragment.java @@ -5,7 +5,6 @@ import android.content.Context; import android.content.DialogInterface; import android.os.Build; import android.os.Bundle; -import android.view.ContextMenu; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -20,7 +19,6 @@ import androidx.fragment.app.FragmentActivity; import androidx.fragment.app.FragmentManager; import androidx.recyclerview.widget.ItemTouchHelper; import androidx.recyclerview.widget.LinearLayoutManager; -import androidx.recyclerview.widget.PagerSnapHelper; import androidx.recyclerview.widget.RecyclerView; import net.osmand.AndroidUtils; @@ -28,6 +26,7 @@ import net.osmand.plus.ApplicationMode; import net.osmand.plus.ContextMenuAdapter; import net.osmand.plus.ContextMenuItem; import net.osmand.plus.OsmandApplication; +import net.osmand.plus.OsmandSettings; import net.osmand.plus.R; import net.osmand.plus.UiUtilities; import net.osmand.plus.activities.MapActivity; @@ -35,6 +34,7 @@ import net.osmand.plus.activities.MapActivityActions; import net.osmand.plus.base.BaseOsmAndFragment; import net.osmand.plus.dialogs.ConfigureMapMenu; import net.osmand.plus.mapcontextmenu.MapContextMenu; +import net.osmand.plus.profiles.SelectCopyAppModeBottomSheet; import net.osmand.plus.settings.ConfigureMenuRootFragment.ScreenType; import net.osmand.plus.settings.bottomsheets.ChangeGeneralProfilesPrefBottomSheet; import net.osmand.plus.views.controls.ReorderItemTouchHelperCallback; @@ -43,9 +43,7 @@ import net.osmand.plus.settings.RearrangeMenuItemsAdapter.MenuItemsAdapterListen import java.io.Serializable; import java.util.ArrayList; -import java.util.Collections; import java.util.HashMap; -import java.util.LinkedHashMap; import java.util.List; import static net.osmand.aidlapi.OsmAndCustomizationConstants.MAP_CONTEXT_MENU_MORE_ID; @@ -54,7 +52,8 @@ import static net.osmand.plus.settings.RearrangeMenuItemsAdapter.AdapterItemType import static net.osmand.plus.settings.RearrangeMenuItemsAdapter.AdapterItemType.DIVIDER; import static net.osmand.plus.settings.RearrangeMenuItemsAdapter.AdapterItemType.HEADER; -public class ConfigureMenuItemsFragment extends BaseOsmAndFragment { +public class ConfigureMenuItemsFragment extends BaseOsmAndFragment + implements SelectCopyAppModeBottomSheet.CopyAppModePrefsListener { public static final String TAG = ConfigureMenuItemsFragment.class.getName(); private static final String ITEM_TYPE_KEY = "item_type_key"; @@ -65,6 +64,7 @@ public class ConfigureMenuItemsFragment extends BaseOsmAndFragment { private HashMap menuItemsOrder; private ContextMenuAdapter contextMenuAdapter; private List hiddenMenuItems; + private ApplicationMode appMode; private LayoutInflater mInflater; private OsmandApplication app; private ScreenType screenType; @@ -94,6 +94,7 @@ public class ConfigureMenuItemsFragment extends BaseOsmAndFragment { public void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); app = requireMyApplication(); + appMode = app.getSettings().getApplicationMode(); nightMode = !app.getSettings().isLightContent(); mInflater = UiUtilities.getInflater(app, nightMode); Activity activity = getActivity(); @@ -217,13 +218,8 @@ public class ConfigureMenuItemsFragment extends BaseOsmAndFragment { applyButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { -// if (wasReset) { -// contextMenuAdapter.resetMenuItems(app, screenType); -// } else { HashMap prefsMap = new HashMap<>(); prefsMap.put(contextMenuAdapter.getPrefIdHidden(app, screenType), (Serializable) hiddenMenuItems); -// contextMenuAdapter.saveHiddenItemsIds(app, screenType, hiddenMenuItems); - List defItems = contextMenuAdapter.getDefaultItems(screenType); contextMenuAdapter.reorderMenuItems(defItems, menuItemsOrder); List ids = new ArrayList<>(); @@ -231,9 +227,7 @@ public class ConfigureMenuItemsFragment extends BaseOsmAndFragment { ids.add(item.getId()); } prefsMap.put(contextMenuAdapter.getPrefIdOrder(app, screenType), (Serializable) ids); - FragmentManager fm = getFragmentManager(); - ApplicationMode appMode = app.getSettings().getApplicationMode(); if (fm != null) { ChangeGeneralProfilesPrefBottomSheet.showInstance( fm, @@ -253,9 +247,6 @@ public class ConfigureMenuItemsFragment extends BaseOsmAndFragment { } }); } -// contextMenuAdapter.saveItemsIdsOrder(app, screenType, ids); -// } -// dismissFragment(); } }); if (Build.VERSION.SDK_INT >= 21) { @@ -317,7 +308,15 @@ public class ConfigureMenuItemsFragment extends BaseOsmAndFragment { new View.OnClickListener() { @Override public void onClick(View view) { - + FragmentManager fm = getFragmentManager(); + if (fm != null) { + SelectCopyAppModeBottomSheet.showInstance( + fm, + ConfigureMenuItemsFragment.this, + false, + appMode + ); + } } }))); return items; @@ -356,4 +355,27 @@ public class ConfigureMenuItemsFragment extends BaseOsmAndFragment { private void setScreenType(@NonNull ScreenType screenType) { this.screenType = screenType; } + + @Override + public void copyAppModePrefs(ApplicationMode appMode) { + if (appMode != null) { + List prefs = new ArrayList<>(); + switch (screenType) { + case DRAWER: + prefs.add(app.getSettings().DRAWER_ITEMS_ORDER); + prefs.add(app.getSettings().HIDDEN_DRAWER_ITEMS); + break; + case CONFIGURE_MAP: + prefs.add(app.getSettings().CONFIGURE_MAP_ITEMS_ORDER); + prefs.add(app.getSettings().HIDDEN_CONFIGURE_MAP_ITEMS); + break; + case CONTEXT_MENU_ACTIONS: + prefs.add(app.getSettings().CONTEXT_MENU_ACTIONS_ITEMS_ORDER); + prefs.add(app.getSettings().HIDDEN_CONTEXT_MENU_ACTIONS_ITEMS); + break; + } + app.getSettings().copyProfilePreferences(appMode, this.appMode, prefs); + dismissFragment(); + } + } } From ee792e4f5305248c2f03c92417ef655f9e771dee Mon Sep 17 00:00:00 2001 From: Dima-1 Date: Tue, 7 Apr 2020 17:38:20 +0300 Subject: [PATCH 092/202] Fix MultimediaNotesFragment possible npe. --- .../osmand/plus/audionotes/MultimediaNotesFragment.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/OsmAnd/src/net/osmand/plus/audionotes/MultimediaNotesFragment.java b/OsmAnd/src/net/osmand/plus/audionotes/MultimediaNotesFragment.java index 6031fdacd6..267fc8d177 100644 --- a/OsmAnd/src/net/osmand/plus/audionotes/MultimediaNotesFragment.java +++ b/OsmAnd/src/net/osmand/plus/audionotes/MultimediaNotesFragment.java @@ -136,6 +136,10 @@ public class MultimediaNotesFragment extends BaseSettingsFragment implements Cop // Photo picture size // get supported sizes List psps = parameters.getSupportedPictureSizes(); + if (psps == null) { + cameraPictureSize.setVisible(false); + return; + } // list of megapixels of each resolution List mpix = new ArrayList(); // list of index each resolution in list, returned by getSupportedPictureSizes() @@ -209,6 +213,10 @@ public class MultimediaNotesFragment extends BaseSettingsFragment implements Cop // focus mode settings // show in menu only suppoted modes List sfm = parameters.getSupportedFocusModes(); + if (sfm == null) { + cameraFocusType.setVisible(false); + return; + } List items = new ArrayList(); List itemsValues = new ArrayList(); // filtering known types for translate and set index From b095942d55cfd7298353c786f686b9395414c83e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20Kotr=C4=8D?= Date: Tue, 7 Apr 2020 19:53:25 +0000 Subject: [PATCH 093/202] Translated using Weblate (Czech) Currently translated at 81.4% (2651 of 3254 strings) --- OsmAnd/res/values-cs/strings.xml | 44 ++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/OsmAnd/res/values-cs/strings.xml b/OsmAnd/res/values-cs/strings.xml index 89e013c03e..911917fda4 100644 --- a/OsmAnd/res/values-cs/strings.xml +++ b/OsmAnd/res/values-cs/strings.xml @@ -3294,4 +3294,48 @@ Zobrazená oblast: %1$s x %2$s Nelze přečíst %1$s. Nelze zapsat %1$s. Nelze importovat %1$s. + Stínování svahů + Terén + Stínované svahy používají tmavé odstíny pro vyjádření svahů, vrcholů a nížin. + Svahy jsou barevné vizualizace terénu. + Nastavte minimální a maximální úroveň přiblížení, při které bude vrstva zobrazená. + Pro zobrazení stínování kopců jsou potřeba další mapy. + Pro zobrazení svahů jsou potřeba další mapy. + O svazích si můžete přečíst více na %1$s. + Průhlednost + Úrovně přiblížení + Legenda + Zapněte pro zobrazení stínovaných svahů. O tomto typu map se dozvíte více na našich stránkách + Všechna data z %1$s jsou naimportovaná, můžete použít tlačítka níže k otevření části aplikace pro jejich správu. + Import dokončen + Položky přidány + OsmAnd kontroluje %1$s na duplicity s existujícími položkami v aplikaci. +\n +\nMůže to chvíli trvat. + Importování + Importování dat z %1$s + Nepodařilo se zálohovat profil. + Ukládání nového profilu + Obnovit všechna nastavení profilu\? + Po vytvoření/importování tohoto profilu budou všechna nastavení profilu resetována do původního stavu. + Opravdu chcete vymazat zaznamenané údaje\? + Přepočítat trasu v případě odchýlení + Zvolte vzdálenost, při které bude trasa přepočítána. + Trasa bude přepočítaná pokud vzdálenost od trasy k aktuální poloze je větší než zvolená hodnota. + %1$s z %2$s + Svahy + Zobrazit/skrýt terén + Skrýt terén + Zobrazit terén + Tlačítko pro zobrazení nebo skrytí vrstvy terénu na mapě. + Smazat popis + Přidat popis + Vyberte skupinu + Vyberte tvar + Kruh + Osmiúhelník + Čtverec + Min + Nahradit jiný bod tímto + Lyžařské okruhy \ No newline at end of file From 3ae77957d4fb09bb4471e53bdaa3fb5192cf1f88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hardi=20H=C3=B5imoja?= Date: Tue, 7 Apr 2020 20:35:41 +0000 Subject: [PATCH 094/202] Translated using Weblate (Estonian) Currently translated at 99.7% (3788 of 3798 strings) --- OsmAnd/res/values-et/phrases.xml | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/OsmAnd/res/values-et/phrases.xml b/OsmAnd/res/values-et/phrases.xml index 42528c34d6..43cce7313c 100644 --- a/OsmAnd/res/values-et/phrases.xml +++ b/OsmAnd/res/values-et/phrases.xml @@ -1587,7 +1587,7 @@ Internet: olemas Internet: puudub Internet - tasuline - Internet - tasuta + Tasuta internet Ürituste toimumiskoht Ainult taimetoit Taimetoit @@ -3767,4 +3767,27 @@ Mitteaktiivne Pursete arv Kummitusratas + Veetase: kuival + Veetase: vee all + Veetase: osaliselt vee all + Algeline + Ebaõige + Kontrastne + Ainult kui jalakäijatele lubatud + Tasuline internetipunkt + Ei + Jah + Kioski tüüp + Kiosk + Ei + Jah + Sukeldumiskeskus + Jahibaas + Raja viitenumber + Bowlingukeskus + Turvakauplus + Mägipääste + Värvisõda + Video + SMS \ No newline at end of file From 3d301a607c3f44ded27cd9d1a1557449af6c26f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hardi=20H=C3=B5imoja?= Date: Tue, 7 Apr 2020 19:48:19 +0000 Subject: [PATCH 095/202] Translated using Weblate (Estonian) Currently translated at 94.9% (3089 of 3254 strings) --- OsmAnd/res/values-et/strings.xml | 75 ++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) diff --git a/OsmAnd/res/values-et/strings.xml b/OsmAnd/res/values-et/strings.xml index 142c132032..6d2e58c040 100644 --- a/OsmAnd/res/values-et/strings.xml +++ b/OsmAnd/res/values-et/strings.xml @@ -3404,4 +3404,79 @@ Kasuta süsteemi rakendust Kaamera katiku heli Autoriseerimine õnnestus + Ava seaded + Keela ümberarvutus + Määra profiili nimi + Vali imporditavad andmed. + Mõned kirjed on juba olemas + OsmAndis on juba samade nimedega kirjed kui need, mis imporditud. +\n +\nVali toiming. + Imporditud kirjetele lisatakse eesliide + Säilita mõlemad + Asenda kõik + Olemasolevad kirjed asendatakse failis olevate kirjetega + Märgitud %1$s on juba OsmAndis olemas. + Profiilid + Kiirtoimingud + Midagi pole valitud + Huvipunktide tüübid + Ettevalmistus + Rakenduse vaikeväärtus (%s) + Vähim nurk minu asukoha ja teekonna vahel + Minu asukoha ja arvutatud teekonna vahel kuvatakse teekonna ümberarvutuseni täiendav sirglõik + Renderdusfaili import + Nurk + Nurk: %s° + Kohandatud profiil + Maastik + Kõrgusreljeefi kaart tumedate varjunditega nõlvade, tippude ja tasandike kirjeldamiseks. + Nõlv märgib maastikku värvidega. + Määra vähima ja suurima suurenduse kaardikihi kuvamisel. + Kõrgusreljeefi kuvamiseks on vaja täiendavaid kaarte. + Nõlvade kuvamiseks on vaja täiendavaid kaarte. + Nõlvadest saab rohkem lugeda %1$s-s. + Läbipaistvus + Suurendus + Tingmärgid + Luba kõrgusreljeefi või nõlvakaardi kuvamiseks. Nendest kaarditüüpidest saab rohkem lugeda meie kodulehel + Kõrgusreljeef + Kõik andmed %1$s-st imporditud, rakenduse vajaliku osaga töötamiseks võib kasutada nuppe allpool. + Imporditud + Kirjed lisatud + OsmAnd kontrollib %1$s rakenduses korduvate kirjete osas. +\n +\nSelleks võib kuluda aega. + Importimine + Andmete import %1$s-st + Ei saanud profiili varundada. + Uue profiili salvestamine + Kas taastada kõik profiili seaded\? + Kõik profiili seaded lähtestatakse peale selle profiili loomist/importimist algväärtustele. + Kas tõesti kustutada salvestatud andmed\? + Arvutada teekond kõrvalekaldel ümber + Vali eemaldumine alates millest teekond arvutatakse ümber. + Teekonna ümberarvutus, kui kaugus teekonnast praegusesse asukohta on suurem valitud väärtusest. + %1$s %2$s-st + Nõlvad + Kuva/peida maastik + Peida maastik + Kuva maastik + Nupp maastikukihi kuvamiseks või peitmiseks kaardil. + Kustuta kirjeldus + Lisa kirjeldus + Vali grupp + Vali kujund + Ring + Kaheksanurk + Ruut + Min + Asenda sellega mõni teine punkt + Suusasõit + Mootorsaan + Kohandatud OsmAnd pistik + Profiil %1$s muudetud. + Ei saanud lugeda %1$s. + Ei saanud kirjutada %1$s. + Ei saanud importida %1$s. \ No newline at end of file From ac9837c55c7f1de6c9bc782d48784fced9675714 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sveinn=20=C3=AD=20Felli?= Date: Tue, 7 Apr 2020 17:32:10 +0000 Subject: [PATCH 096/202] Translated using Weblate (Icelandic) Currently translated at 100.0% (3254 of 3254 strings) --- OsmAnd/res/values-is/strings.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/OsmAnd/res/values-is/strings.xml b/OsmAnd/res/values-is/strings.xml index 0f8006dfa4..38feecc760 100644 --- a/OsmAnd/res/values-is/strings.xml +++ b/OsmAnd/res/values-is/strings.xml @@ -3624,4 +3624,5 @@ Stendur fyrir svæði: %1$s x %2$s Vélsleðar Sérsniðin OsmAnd-viðbót Átthyrningur + Lágm \ No newline at end of file From 5afde34ac7b5934e930c66e31a6d68c7fab6b955 Mon Sep 17 00:00:00 2001 From: Yaron Shahrabani Date: Wed, 8 Apr 2020 06:28:49 +0000 Subject: [PATCH 097/202] Translated using Weblate (Hebrew) Currently translated at 99.5% (3238 of 3254 strings) --- OsmAnd/res/values-he/strings.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/OsmAnd/res/values-he/strings.xml b/OsmAnd/res/values-he/strings.xml index 48e482faf1..3235a1d66f 100644 --- a/OsmAnd/res/values-he/strings.xml +++ b/OsmAnd/res/values-he/strings.xml @@ -3601,4 +3601,5 @@ לא ניתן לייבא את %1$s. זה מסנן שחותך מהירויות נמוכות כדי לא להקליט נקודות מתחת למהירות מסוימת. הפעלת המסנן תגרום לכך שהמסלולים ייראו חלקים יותר כשמסתכלים על המפה. טיולי סקי + %1$s — %2$s — %3$s \ No newline at end of file From 3d3da9ee8efcd3318913fc9be0a303c88f227ae9 Mon Sep 17 00:00:00 2001 From: Nazar-Kutz Date: Wed, 8 Apr 2020 12:15:20 +0300 Subject: [PATCH 098/202] Wikipedia Poi (Fixes 1) --- .../main/java/net/osmand/osm/MapPoiTypes.java | 29 +++++-- .../dash_item_with_description_72dp.xml | 4 +- OsmAnd/res/values-large/sizes.xml | 1 + OsmAnd/res/values/sizes.xml | 1 + OsmAnd/src/net/osmand/AndroidUtils.java | 12 --- .../src/net/osmand/plus/OsmandSettings.java | 2 +- .../plus/activities/MapActivityLayers.java | 3 +- .../activities/search/SearchPOIActivity.java | 3 +- .../osmand/plus/dialogs/ConfigureMapMenu.java | 10 +-- .../osmand/plus/helpers/WaypointHelper.java | 1 - .../net/osmand/plus/poi/PoiFiltersHelper.java | 54 ++++++++---- .../net/osmand/plus/poi/PoiTemplateList.java | 5 -- .../src/net/osmand/plus/poi/PoiUIFilter.java | 6 +- .../actions/ShowHidePoiAction.java | 3 +- .../MapRouteInfoMenu.java | 3 +- .../ShowAlongTheRouteBottomSheet.java | 3 +- .../search/QuickSearchDialogFragment.java | 2 +- .../osmand/plus/search/QuickSearchHelper.java | 3 +- .../net/osmand/plus/views/POIMapLayer.java | 1 - .../SelectWikiLanguagesBottomSheet.java | 49 +++-------- .../plus/wikipedia/WikipediaPoiMenu.java | 86 ++++++++++++------- 21 files changed, 155 insertions(+), 126 deletions(-) delete mode 100644 OsmAnd/src/net/osmand/plus/poi/PoiTemplateList.java diff --git a/OsmAnd-java/src/main/java/net/osmand/osm/MapPoiTypes.java b/OsmAnd-java/src/main/java/net/osmand/osm/MapPoiTypes.java index 38e914a63d..0edd44aa6e 100644 --- a/OsmAnd-java/src/main/java/net/osmand/osm/MapPoiTypes.java +++ b/OsmAnd-java/src/main/java/net/osmand/osm/MapPoiTypes.java @@ -36,8 +36,10 @@ public class MapPoiTypes { private PoiCategory otherCategory; private PoiCategory otherMapCategory; - public static final String WIKI_LANG_KEY_PREFFIX = "wiki_lang:"; - static final String OSM_WIKI_CATEGORY = "osmwiki"; + public static final String WIKI_LANG = "wiki_lang"; + public static final String WIKI_PLACE = "wiki_place"; + public static final String OSM_WIKI_CATEGORY = "osmwiki"; + private PoiTranslator poiTranslator = null; private boolean init; Map poiTypesByTag = new LinkedHashMap(); @@ -137,6 +139,19 @@ public class MapPoiTypes { return null; } + public List getAllAvailableWikiLocales() { + List availableWikiLocales = new ArrayList<>(); + for (PoiType type : getOsmwiki().getPoiTypeByKeyName(WIKI_PLACE).getPoiAdditionals()) { + String name = type.getKeyName(); + String wikiLang = WIKI_LANG + ":"; + if (name != null && name.startsWith(wikiLang)) { + String locale = name.substring(wikiLang.length()); + availableWikiLocales.add(locale); + } + } + return availableWikiLocales; + } + private void sortList(List lf) { final Collator instance = Collator.getInstance(); Collections.sort(lf, new Comparator() { @@ -411,7 +426,7 @@ public class MapPoiTypes { } else if (name.equals("poi_type")) { if (lastCategory == null) { lastCategory = getOtherMapCategory(); - } + } if(!Algorithms.isEmpty(parser.getAttributeValue("", "deprecated_of"))){ String vl = parser.getAttributeValue("", "name"); String target = parser.getAttributeValue("", "deprecated_of"); @@ -605,7 +620,7 @@ public class MapPoiTypes { tp.setOsmValue(parser.getAttributeValue("", "value")); tp.setOsmEditTagValue(parser.getAttributeValue("", "edit_tag"), parser.getAttributeValue("", "edit_value")); - + tp.setOsmTag2(parser.getAttributeValue("", "tag2")); tp.setOsmValue2(parser.getAttributeValue("", "value2")); tp.setText("text".equals(parser.getAttributeValue("", "type"))); @@ -816,7 +831,7 @@ public class MapPoiTypes { poiTypesByTag.put(key, p); } } - + public String replaceDeprecatedSubtype(PoiCategory type, String subtype) { if(deprecatedTags.containsKey(subtype)) { return deprecatedTags.get(subtype); @@ -902,9 +917,9 @@ public class MapPoiTypes { } - - + + } diff --git a/OsmAnd/res/layout/dash_item_with_description_72dp.xml b/OsmAnd/res/layout/dash_item_with_description_72dp.xml index 768ae56024..cf4bdf9f36 100644 --- a/OsmAnd/res/layout/dash_item_with_description_72dp.xml +++ b/OsmAnd/res/layout/dash_item_with_description_72dp.xml @@ -36,7 +36,9 @@ android:paddingLeft="@dimen/content_padding" android:paddingRight="@dimen/content_padding" android:paddingStart="@dimen/content_padding" - android:paddingEnd="@dimen/content_padding"> + android:paddingEnd="@dimen/content_padding" + android:paddingTop="@dimen/content_padding" + android:paddingBottom="@dimen/content_padding"> 84dp 15dp 84dp + 192dp 354dp 102dp diff --git a/OsmAnd/res/values/sizes.xml b/OsmAnd/res/values/sizes.xml index 57f4331982..4b6eb58c81 100644 --- a/OsmAnd/res/values/sizes.xml +++ b/OsmAnd/res/values/sizes.xml @@ -258,6 +258,7 @@ 10dp 56dp 1.25 + 128dp 236dp 68dp diff --git a/OsmAnd/src/net/osmand/AndroidUtils.java b/OsmAnd/src/net/osmand/AndroidUtils.java index 5a9025c088..de35fad5a0 100644 --- a/OsmAnd/src/net/osmand/AndroidUtils.java +++ b/OsmAnd/src/net/osmand/AndroidUtils.java @@ -252,18 +252,6 @@ public class AndroidUtils { return ""; } - public static String makeStringFromList(@NonNull List strings, @NonNull String divider) { - if (strings.size() == 0) { - return ""; - } - StringBuilder result = new StringBuilder(strings.get(0)); - for (int i = 1; i < strings.size(); i++) { - result.append(divider); - result.append(strings.get(i)); - } - return result.toString(); - } - public static View findParentViewById(View view, int id) { ViewParent viewParent = view.getParent(); diff --git a/OsmAnd/src/net/osmand/plus/OsmandSettings.java b/OsmAnd/src/net/osmand/plus/OsmandSettings.java index b5d2cf32a8..287b235e31 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandSettings.java +++ b/OsmAnd/src/net/osmand/plus/OsmandSettings.java @@ -1287,7 +1287,7 @@ public class OsmandSettings { public final CommonPreference WIKI_ARTICLE_SHOW_IMAGES = new EnumIntPreference<>("wikivoyage_show_imgs", WikiArticleShowImages.OFF, WikiArticleShowImages.values()).makeGlobal(); public final CommonPreference SHOW_WIKIPEDIA_POI = new BooleanPreference("show_wikipedia_poi", false).makeProfile(); public final CommonPreference GLOBAL_WIKIPEDIA_POI_ENABLED = new BooleanPreference("global_wikipedia_poi_enabled", false).makeProfile(); - public final ListStringPreference WIKIPEDIA_POI_ENABLED_LANGUAGES = (ListStringPreference) new ListStringPreference("wikipedia_poi_enabled_languages", null, ",,").makeProfile().cache(); + public final ListStringPreference WIKIPEDIA_POI_ENABLED_LANGUAGES = (ListStringPreference) new ListStringPreference("wikipedia_poi_enabled_languages", null, ",").makeProfile().cache(); public final CommonPreference SELECT_MARKER_ON_SINGLE_TAP = new BooleanPreference("select_marker_on_single_tap", false).makeProfile(); public final CommonPreference KEEP_PASSED_MARKERS_ON_MAP = new BooleanPreference("keep_passed_markers_on_map", true).makeProfile(); diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java b/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java index a112d0ed96..e516f997be 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java @@ -35,7 +35,6 @@ import net.osmand.plus.activities.MapActivity.ShowQuickSearchMode; import net.osmand.plus.helpers.GpxUiHelper; import net.osmand.plus.measurementtool.MeasurementToolLayer; import net.osmand.plus.poi.PoiFiltersHelper; -import net.osmand.plus.poi.PoiTemplateList; import net.osmand.plus.poi.PoiUIFilter; import net.osmand.plus.rastermaps.OsmandRasterMapsPlugin; import net.osmand.plus.render.MapVectorLayer; @@ -66,6 +65,8 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map.Entry; +import static net.osmand.plus.poi.PoiFiltersHelper.PoiTemplateList; + /** * Object is responsible to maintain layers using by map activity */ diff --git a/OsmAnd/src/net/osmand/plus/activities/search/SearchPOIActivity.java b/OsmAnd/src/net/osmand/plus/activities/search/SearchPOIActivity.java index cbc165ad99..819600f085 100644 --- a/OsmAnd/src/net/osmand/plus/activities/search/SearchPOIActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/search/SearchPOIActivity.java @@ -58,7 +58,6 @@ import net.osmand.plus.activities.EditPOIFilterActivity; import net.osmand.plus.activities.MapActivity; import net.osmand.plus.activities.OsmandListActivity; import net.osmand.plus.poi.NominatimPoiFilter; -import net.osmand.plus.poi.PoiTemplateList; import net.osmand.plus.poi.PoiUIFilter; import net.osmand.plus.poi.PoiUIFilter.AmenityNameFilter; import net.osmand.plus.render.RenderingIcons; @@ -79,6 +78,8 @@ import java.util.TreeMap; import gnu.trove.set.hash.TLongHashSet; +import static net.osmand.plus.poi.PoiFiltersHelper.PoiTemplateList; + /** * Search poi activity */ diff --git a/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java b/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java index 424d936d98..d036379d6d 100644 --- a/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java +++ b/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java @@ -50,7 +50,6 @@ import net.osmand.plus.activities.SettingsActivity; import net.osmand.plus.dashboard.DashboardOnMap; import net.osmand.plus.inapp.InAppPurchaseHelper; import net.osmand.plus.poi.PoiFiltersHelper; -import net.osmand.plus.poi.PoiTemplateList; import net.osmand.plus.rastermaps.OsmandRasterMapsPlugin; import net.osmand.plus.render.RendererRegistry; import net.osmand.plus.srtmplugin.SRTMPlugin; @@ -102,6 +101,7 @@ import static net.osmand.aidlapi.OsmAndCustomizationConstants.TEXT_SIZE_ID; import static net.osmand.aidlapi.OsmAndCustomizationConstants.TRANSPORT_ID; import static net.osmand.aidlapi.OsmAndCustomizationConstants.TRANSPORT_RENDERING_ID; import static net.osmand.aidlapi.OsmAndCustomizationConstants.WIKIPEDIA_ID; +import static net.osmand.plus.poi.PoiFiltersHelper.PoiTemplateList; import static net.osmand.plus.srtmplugin.SRTMPlugin.CONTOUR_DENSITY_ATTR; import static net.osmand.plus.srtmplugin.SRTMPlugin.CONTOUR_LINES_ATTR; import static net.osmand.plus.srtmplugin.SRTMPlugin.CONTOUR_LINES_SCHEME_ATTR; @@ -306,7 +306,7 @@ public class ConfigureMapMenu { } } - private void createLayersItems(List customRules, ContextMenuAdapter adapter, + private void createLayersItems(List customRules, ContextMenuAdapter adapter, final MapActivity activity, final int themeRes, final boolean nightMode) { final OsmandApplication app = activity.getMyApplication(); final OsmandSettings settings = app.getSettings(); @@ -537,7 +537,7 @@ public class ConfigureMapMenu { .setSecondaryIcon(R.drawable.ic_action_additional_option) .setListener(l).createItem()); - selected = settings.SHOW_WIKIPEDIA_POI.get(); + selected = app.getPoiFilters().isShowingAnyPoi(PoiTemplateList.WIKI); adapter.addItem(new ContextMenuItem.ItemBuilder() .setId(WIKIPEDIA_ID) .setTitleId(R.string.shared_string_wikipedia, activity) @@ -588,7 +588,7 @@ public class ConfigureMapMenu { final OsmandSettings settings = app.getSettings(); final int selectedProfileColorRes = settings.APPLICATION_MODE.get().getIconColorInfo().getColor(nightMode); final int selectedProfileColor = ContextCompat.getColor(app, selectedProfileColorRes); - + adapter.addItem(new ContextMenuItem.ItemBuilder().setTitleId(R.string.map_widget_map_rendering, activity) .setId(MAP_RENDERING_CATEGORY_ID) .setCategory(true).setLayout(R.layout.list_group_title_with_switch).createItem()); @@ -1172,7 +1172,7 @@ public class ConfigureMapMenu { final AlertDialog dialog = bld.create(); dialogAdapter.setDialog(dialog); - + if (customRulesIncluded != null) { for (RenderingRuleProperty p : customRulesIncluded) { if (!p.isBoolean()) { diff --git a/OsmAnd/src/net/osmand/plus/helpers/WaypointHelper.java b/OsmAnd/src/net/osmand/plus/helpers/WaypointHelper.java index 6443915ab3..7f51847964 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/WaypointHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/WaypointHelper.java @@ -25,7 +25,6 @@ import net.osmand.plus.TargetPointsHelper.TargetPoint; import net.osmand.plus.UiUtilities; import net.osmand.plus.activities.IntermediatePointsDialog; import net.osmand.plus.base.FavoriteImageDrawable; -import net.osmand.plus.poi.PoiTemplateList; import net.osmand.plus.poi.PoiUIFilter; import net.osmand.plus.render.RenderingIcons; import net.osmand.plus.routing.AlarmInfo; diff --git a/OsmAnd/src/net/osmand/plus/poi/PoiFiltersHelper.java b/OsmAnd/src/net/osmand/plus/poi/PoiFiltersHelper.java index 90447f2bf4..8e8864af75 100644 --- a/OsmAnd/src/net/osmand/plus/poi/PoiFiltersHelper.java +++ b/OsmAnd/src/net/osmand/plus/poi/PoiFiltersHelper.java @@ -32,6 +32,8 @@ import java.util.Set; import java.util.TreeMap; import java.util.TreeSet; +import static net.osmand.osm.MapPoiTypes.WIKI_PLACE; + public class PoiFiltersHelper { private final OsmandApplication application; @@ -45,6 +47,7 @@ public class PoiFiltersHelper { private PoiUIFilter localWikiPoiFilter; private PoiUIFilter globalWikiPoiFilter; private List cacheTopStandardFilters; + private List cacheWikipediaFilters; private Map> selectedPoiFilters = new TreeMap<>(); private static final String UDF_CAR_AID = "car_aid"; @@ -62,6 +65,10 @@ public class PoiFiltersHelper { UDF_CAR_AID, UDF_FOR_TOURISTS, UDF_FOOD_SHOP, UDF_FUEL, UDF_SIGHTSEEING, UDF_EMERGENCY, UDF_PUBLIC_TRANSPORT, UDF_ACCOMMODATION, UDF_RESTAURANTS, UDF_PARKING }; + + public enum PoiTemplateList { + POI, WIKI + } public PoiFiltersHelper(OsmandApplication application) { this.application = application; @@ -110,7 +117,7 @@ public class PoiFiltersHelper { public PoiUIFilter getLocalWikiPOIFilter() { if (localWikiPoiFilter == null) { - PoiType place = application.getPoiTypes().getPoiTypeByKey("wiki_place"); + PoiType place = application.getPoiTypes().getPoiTypeByKey(WIKI_PLACE); if (place != null && !Algorithms.isEmpty(application.getLanguage())) { PoiUIFilter filter = new PoiUIFilter(place, application, " " + application.getLangTranslation(application.getLanguage())); @@ -135,26 +142,41 @@ public class PoiFiltersHelper { return globalWikiPoiFilter; } - public List getWikiPOIFilters() { - List cacheWikipediaFilters = new ArrayList<>(); - List enabledLanguages = null; - Bundle wikiPoiSettings = WikipediaPoiMenu.getWikiPoiSettings(application); - if (wikiPoiSettings != null) { - enabledLanguages = wikiPoiSettings.getStringArrayList(WikipediaPoiMenu.ENABLED_WIKI_POI_LANGUAGES_KEY); - } - if (enabledLanguages != null) { - for (String language : enabledLanguages) { - PoiType place = application.getPoiTypes().getPoiTypeByKey("wiki_place"); - if (place != null) { - String locale = new Locale(language).getLanguage(); + public List getLocalWikipediaPoiFilters(boolean onlyActiveLocales) { + String wikiLang = "wiki:lang:"; + if (cacheWikipediaFilters == null) { + cacheWikipediaFilters = new ArrayList<>(); + PoiType place = application.getPoiTypes().getPoiTypeByKey(WIKI_PLACE); + if (place != null) { + for (String locale : application.getPoiTypes().getAllAvailableWikiLocales()) { PoiUIFilter filter = new PoiUIFilter(place, application, " " + - application.getLangTranslation(locale)); - filter.setSavedFilterByName("wiki:lang:" + locale); + WikipediaPoiMenu.getTranslation(application, locale)); + filter.setSavedFilterByName(wikiLang + locale); filter.setStandardFilter(true); cacheWikipediaFilters.add(filter); } } } + if (onlyActiveLocales && cacheWikipediaFilters.size() > 0) { + List onlyActiveLocalFilters = new ArrayList<>(); + Bundle wikiPoiSettings = WikipediaPoiMenu.getWikiPoiSettings(application); + if (wikiPoiSettings != null) { + List enabledWikipediaPoiLocales = + wikiPoiSettings.getStringArrayList(WikipediaPoiMenu.ENABLED_WIKI_POI_LANGUAGES_KEY); + if (enabledWikipediaPoiLocales != null) { + for (PoiUIFilter filter : cacheWikipediaFilters) { + for (String locale : enabledWikipediaPoiLocales) { + String filterId = filter.getSavedFilterByName(); + String filterLocale = filterId.substring(wikiLang.length()); + if (locale.equalsIgnoreCase(filterLocale)) { + onlyActiveLocalFilters.add(filter); + } + } + } + } + } + return onlyActiveLocalFilters; + } return cacheWikipediaFilters; } @@ -202,7 +224,7 @@ public class PoiFiltersHelper { return f; } } - for (PoiUIFilter f : getWikiPOIFilters()) { + for (PoiUIFilter f : getLocalWikipediaPoiFilters(true)) { if (f.getFilterId().equals(filterId)) { return f; } diff --git a/OsmAnd/src/net/osmand/plus/poi/PoiTemplateList.java b/OsmAnd/src/net/osmand/plus/poi/PoiTemplateList.java deleted file mode 100644 index 59a790b3ab..0000000000 --- a/OsmAnd/src/net/osmand/plus/poi/PoiTemplateList.java +++ /dev/null @@ -1,5 +0,0 @@ -package net.osmand.plus.poi; - -public enum PoiTemplateList { - POI, WIKI -} \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/poi/PoiUIFilter.java b/OsmAnd/src/net/osmand/plus/poi/PoiUIFilter.java index 5afdd742cc..59d22aef93 100644 --- a/OsmAnd/src/net/osmand/plus/poi/PoiUIFilter.java +++ b/OsmAnd/src/net/osmand/plus/poi/PoiUIFilter.java @@ -39,6 +39,9 @@ import java.util.Map.Entry; import java.util.Set; import java.util.TreeSet; +import static net.osmand.osm.MapPoiTypes.OSM_WIKI_CATEGORY; +import static net.osmand.osm.MapPoiTypes.WIKI_PLACE; + public class PoiUIFilter implements SearchPoiTypeFilter, Comparable, CustomSearchPoiFilter { public final static String STD_PREFIX = "std_"; //$NON-NLS-1$ @@ -147,7 +150,8 @@ public class PoiUIFilter implements SearchPoiTypeFilter, Comparable } public boolean isWikiFilter() { - return filterId.startsWith(STD_PREFIX + "wiki_place") || filterId.equals(STD_PREFIX + "osmwiki"); + return filterId.startsWith(STD_PREFIX + WIKI_PLACE) + || filterId.equals(STD_PREFIX + OSM_WIKI_CATEGORY); } public String getFilterByName() { diff --git a/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHidePoiAction.java b/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHidePoiAction.java index 8186951771..2052bbe020 100644 --- a/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHidePoiAction.java +++ b/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHidePoiAction.java @@ -23,7 +23,6 @@ import net.osmand.plus.R; import net.osmand.plus.UiUtilities; import net.osmand.plus.activities.MapActivity; import net.osmand.plus.poi.PoiFiltersHelper; -import net.osmand.plus.poi.PoiTemplateList; import net.osmand.plus.poi.PoiUIFilter; import net.osmand.plus.quickaction.QuickAction; import net.osmand.plus.quickaction.QuickActionType; @@ -34,6 +33,8 @@ import java.util.Collections; import java.util.List; import java.util.Set; +import static net.osmand.plus.poi.PoiFiltersHelper.PoiTemplateList; + public class ShowHidePoiAction extends QuickAction { diff --git a/OsmAnd/src/net/osmand/plus/routepreparationmenu/MapRouteInfoMenu.java b/OsmAnd/src/net/osmand/plus/routepreparationmenu/MapRouteInfoMenu.java index 81f0f6a3d0..e16c872c91 100644 --- a/OsmAnd/src/net/osmand/plus/routepreparationmenu/MapRouteInfoMenu.java +++ b/OsmAnd/src/net/osmand/plus/routepreparationmenu/MapRouteInfoMenu.java @@ -70,7 +70,6 @@ import net.osmand.plus.helpers.GpxUiHelper; import net.osmand.plus.helpers.WaypointHelper; import net.osmand.plus.mapcontextmenu.other.TrackDetailsMenuFragment; import net.osmand.plus.mapmarkers.MapMarkerSelectionFragment; -import net.osmand.plus.poi.PoiTemplateList; import net.osmand.plus.poi.PoiUIFilter; import net.osmand.plus.profiles.AppModesBottomSheetDialogFragment; import net.osmand.plus.profiles.ConfigureAppModesBottomSheetDialogFragment; @@ -120,6 +119,8 @@ import java.util.Map; import java.util.Set; import java.util.Stack; +import static net.osmand.plus.poi.PoiFiltersHelper.PoiTemplateList; + public class MapRouteInfoMenu implements IRouteInformationListener, CardListener, FavoritesListener { private static final Log LOG = PlatformUtil.getLog(MapRouteInfoMenu.class); diff --git a/OsmAnd/src/net/osmand/plus/routepreparationmenu/ShowAlongTheRouteBottomSheet.java b/OsmAnd/src/net/osmand/plus/routepreparationmenu/ShowAlongTheRouteBottomSheet.java index 466d18cd40..8f40582bdc 100644 --- a/OsmAnd/src/net/osmand/plus/routepreparationmenu/ShowAlongTheRouteBottomSheet.java +++ b/OsmAnd/src/net/osmand/plus/routepreparationmenu/ShowAlongTheRouteBottomSheet.java @@ -36,7 +36,6 @@ import net.osmand.plus.base.bottomsheetmenu.SimpleBottomSheetItem; import net.osmand.plus.base.bottomsheetmenu.simpleitems.SimpleDividerItem; import net.osmand.plus.helpers.WaypointDialogHelper; import net.osmand.plus.helpers.WaypointHelper; -import net.osmand.plus.poi.PoiTemplateList; import net.osmand.plus.poi.PoiUIFilter; import net.osmand.plus.routing.IRouteInformationListener; import net.osmand.plus.routing.IRoutingDataUpdateListener; @@ -45,6 +44,8 @@ import java.lang.ref.WeakReference; import java.util.ArrayList; import java.util.List; +import static net.osmand.plus.poi.PoiFiltersHelper.PoiTemplateList; + public class ShowAlongTheRouteBottomSheet extends MenuBottomSheetDialogFragment implements IRouteInformationListener, IRoutingDataUpdateListener { public static final String TAG = "ShowAlongTheRouteBottomSheet"; diff --git a/OsmAnd/src/net/osmand/plus/search/QuickSearchDialogFragment.java b/OsmAnd/src/net/osmand/plus/search/QuickSearchDialogFragment.java index 91cd25a83d..17bf11ee5b 100644 --- a/OsmAnd/src/net/osmand/plus/search/QuickSearchDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/search/QuickSearchDialogFragment.java @@ -79,7 +79,6 @@ import net.osmand.plus.activities.MapActivity; import net.osmand.plus.activities.MapActivity.ShowQuickSearchMode; import net.osmand.plus.helpers.SearchHistoryHelper; import net.osmand.plus.helpers.SearchHistoryHelper.HistoryEntry; -import net.osmand.plus.poi.PoiTemplateList; import net.osmand.plus.poi.PoiUIFilter; import net.osmand.plus.poi.RearrangePoiFiltersFragment; import net.osmand.plus.resources.RegionAddressRepository; @@ -108,6 +107,7 @@ import java.io.IOException; import java.util.ArrayList; import java.util.List; +import static net.osmand.plus.poi.PoiFiltersHelper.PoiTemplateList; 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.POI_TYPE; diff --git a/OsmAnd/src/net/osmand/plus/search/QuickSearchHelper.java b/OsmAnd/src/net/osmand/plus/search/QuickSearchHelper.java index 93b4c3127a..e51454e548 100644 --- a/OsmAnd/src/net/osmand/plus/search/QuickSearchHelper.java +++ b/OsmAnd/src/net/osmand/plus/search/QuickSearchHelper.java @@ -27,7 +27,6 @@ import net.osmand.plus.helpers.SearchHistoryHelper; import net.osmand.plus.helpers.SearchHistoryHelper.HistoryEntry; import net.osmand.plus.poi.NominatimPoiFilter; import net.osmand.plus.poi.PoiFiltersHelper; -import net.osmand.plus.poi.PoiTemplateList; import net.osmand.plus.poi.PoiUIFilter; import net.osmand.plus.resources.ResourceManager.ResourceListener; import net.osmand.plus.views.mapwidgets.MapInfoWidgetsFactory.TopToolbarController; @@ -47,6 +46,8 @@ import java.io.IOException; import java.util.Arrays; import java.util.List; +import static net.osmand.plus.poi.PoiFiltersHelper.PoiTemplateList; + public class QuickSearchHelper implements ResourceListener { public static final int SEARCH_FAVORITE_API_PRIORITY = 50; diff --git a/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java b/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java index ba7a9eee85..ebb3efa034 100644 --- a/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java @@ -39,7 +39,6 @@ import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; import net.osmand.plus.activities.MapActivity; import net.osmand.plus.helpers.WaypointHelper; -import net.osmand.plus.poi.PoiTemplateList; import net.osmand.plus.poi.PoiUIFilter; import net.osmand.plus.render.RenderingIcons; import net.osmand.plus.routing.IRouteInformationListener; diff --git a/OsmAnd/src/net/osmand/plus/wikipedia/SelectWikiLanguagesBottomSheet.java b/OsmAnd/src/net/osmand/plus/wikipedia/SelectWikiLanguagesBottomSheet.java index 474cac110c..97bd1d746a 100644 --- a/OsmAnd/src/net/osmand/plus/wikipedia/SelectWikiLanguagesBottomSheet.java +++ b/OsmAnd/src/net/osmand/plus/wikipedia/SelectWikiLanguagesBottomSheet.java @@ -11,9 +11,6 @@ import androidx.core.content.ContextCompat; import net.osmand.AndroidUtils; import net.osmand.CallbackWithObject; -import net.osmand.osm.MapPoiTypes; -import net.osmand.osm.PoiCategory; -import net.osmand.osm.PoiType; import net.osmand.plus.ApplicationMode; import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandSettings; @@ -53,6 +50,9 @@ public class SelectWikiLanguagesBottomSheet extends MenuBottomSheetDialogFragmen app = requiredMyApplication(); settings = app.getSettings(); initLanguagesData(); + if (savedInstanceState != null) { + dismiss(); + } } @Override @@ -105,18 +105,12 @@ public class SelectWikiLanguagesBottomSheet extends MenuBottomSheetDialogFragmen @Override public void onClick(View v) { boolean newValue = !languageItem[0].isChecked(); + languageItem[0].setChecked(newValue); language.setChecked(newValue); } }) .create(); languageItems.add(languageItem[0]); - language.setOnCheckLanguageCallback(new CallbackWithObject() { - @Override - public boolean processResult(Boolean result) { - languageItem[0].setChecked(result); - return true; - } - }); } items.addAll(languageItems); } @@ -125,29 +119,19 @@ public class SelectWikiLanguagesBottomSheet extends MenuBottomSheetDialogFragmen languages = new ArrayList<>(); Bundle wikiPoiSettings = WikipediaPoiMenu.getWikiPoiSettings(app); - List activatedLocales = null; + List enabledWikiPoiLocales = null; if (wikiPoiSettings != null) { isGlobalWikiPoiEnabled = wikiPoiSettings.getBoolean(GLOBAL_WIKI_POI_ENABLED_KEY); - activatedLocales = wikiPoiSettings.getStringArrayList(ENABLED_WIKI_POI_LANGUAGES_KEY); + enabledWikiPoiLocales = wikiPoiSettings.getStringArrayList(ENABLED_WIKI_POI_LANGUAGES_KEY); } - - PoiCategory osmwiki = app.getPoiTypes().getOsmwiki(); - if (activatedLocales != null) { - for (PoiType type : osmwiki.getPoiTypeByKeyName("wiki_place").getPoiAdditionals()) { - String name = type.getKeyName(); - if (name != null && name.startsWith(MapPoiTypes.WIKI_LANG_KEY_PREFFIX)) { - String locale = name.substring(MapPoiTypes.WIKI_LANG_KEY_PREFFIX.length()); - boolean checked = activatedLocales.contains(locale); - languages.add(new WikiLanguageItem(locale, app.getLangTranslation(locale), checked)); - } + if (enabledWikiPoiLocales != null) { + for (String locale : app.getPoiTypes().getAllAvailableWikiLocales()) { + boolean checked = enabledWikiPoiLocales.contains(locale); + languages.add(new WikiLanguageItem(locale, WikipediaPoiMenu.getTranslation(app, locale), checked)); } } else { - for (PoiType type : osmwiki.getPoiTypeByKeyName("wiki_place").getPoiAdditionals()) { - String name = type.getKeyName(); - if (name != null && name.startsWith(MapPoiTypes.WIKI_LANG_KEY_PREFFIX)) { - String locale = name.substring(MapPoiTypes.WIKI_LANG_KEY_PREFFIX.length()); - languages.add(new WikiLanguageItem(locale, app.getLangTranslation(locale), false)); - } + for (String locale : app.getPoiTypes().getAllAvailableWikiLocales()) { + languages.add(new WikiLanguageItem(locale, WikipediaPoiMenu.getTranslation(app, locale), false)); } } @@ -224,7 +208,6 @@ public class SelectWikiLanguagesBottomSheet extends MenuBottomSheetDialogFragmen private String locale; private String title; private boolean checked; - private CallbackWithObject onCheckLanguageCallback; public WikiLanguageItem(String locale, String title, boolean checked) { this.locale = locale; @@ -242,20 +225,12 @@ public class SelectWikiLanguagesBottomSheet extends MenuBottomSheetDialogFragmen public void setChecked(boolean checked) { this.checked = checked; - if (onCheckLanguageCallback != null) { - onCheckLanguageCallback.processResult(checked); - } - } - - public void setOnCheckLanguageCallback(CallbackWithObject onCheckLanguageCallback) { - this.onCheckLanguageCallback = onCheckLanguageCallback; } public String getTitle() { return title; } - @Override public int compareTo(WikiLanguageItem other) { return this.title.compareToIgnoreCase(other.title); diff --git a/OsmAnd/src/net/osmand/plus/wikipedia/WikipediaPoiMenu.java b/OsmAnd/src/net/osmand/plus/wikipedia/WikipediaPoiMenu.java index 58df48ee63..4baf24a982 100644 --- a/OsmAnd/src/net/osmand/plus/wikipedia/WikipediaPoiMenu.java +++ b/OsmAnd/src/net/osmand/plus/wikipedia/WikipediaPoiMenu.java @@ -1,12 +1,10 @@ package net.osmand.plus.wikipedia; import android.os.Bundle; -import android.view.View; import android.widget.ArrayAdapter; import androidx.annotation.NonNull; -import net.osmand.AndroidUtils; import net.osmand.CallbackWithObject; import net.osmand.plus.ApplicationMode; import net.osmand.plus.ContextMenuAdapter; @@ -21,14 +19,17 @@ import net.osmand.plus.download.DownloadResources; import net.osmand.plus.download.DownloadValidationManager; import net.osmand.plus.download.IndexItem; import net.osmand.plus.poi.PoiFiltersHelper; -import net.osmand.plus.poi.PoiTemplateList; import net.osmand.plus.poi.PoiUIFilter; import net.osmand.util.Algorithms; import java.io.IOException; +import java.lang.reflect.Field; import java.util.ArrayList; import java.util.List; +import static net.osmand.osm.MapPoiTypes.WIKI_LANG; +import static net.osmand.plus.poi.PoiFiltersHelper.PoiTemplateList; + public class WikipediaPoiMenu { public static final String GLOBAL_WIKI_POI_ENABLED_KEY = "global_wikipedia_poi_enabled_key"; @@ -51,19 +52,14 @@ public class WikipediaPoiMenu { private ContextMenuAdapter createLayersItems() { final int toggleActionStringId = R.string.shared_string_wikipedia; final int languageActionStringId = R.string.shared_string_language; + final int spaceHeight = app.getResources().getDimensionPixelSize(R.dimen.bottom_sheet_big_item_height); + final boolean enabled = app.getPoiFilters().isShowingAnyPoi(PoiTemplateList.WIKI); ContextMenuAdapter adapter = new ContextMenuAdapter(); adapter.setDefaultLayoutId(R.layout.dash_item_with_description_72dp); adapter.setProfileDependent(true); adapter.setNightMode(nightMode); ContextMenuAdapter.OnRowItemClick l = new ContextMenuAdapter.OnRowItemClick() { - - @Override - public boolean onRowItemClick(ArrayAdapter adapter, - View view, int itemId, int pos) { - return super.onRowItemClick(adapter, view, itemId, pos); - } - @Override public boolean onContextMenuClick(final ArrayAdapter adapter, final int itemId, final int position, final boolean isChecked, int[] viewCoordinates) { @@ -71,7 +67,7 @@ public class WikipediaPoiMenu { app.runInUIThread(new Runnable() { @Override public void run() { - toggleWikipediaPoi(mapActivity, !settings.SHOW_WIKIPEDIA_POI.getModeValue(appMode), true); + toggleWikipediaPoi(mapActivity, !enabled, true); } }); } else if (itemId == languageActionStringId) { @@ -83,7 +79,6 @@ public class WikipediaPoiMenu { int toggleIconId = R.drawable.ic_plugin_wikipedia; int toggleIconColorId; - boolean enabled = settings.SHOW_WIKIPEDIA_POI.getModeValue(appMode); if (enabled) { toggleIconColorId = nightMode ? R.color.active_color_primary_dark : R.color.active_color_primary_light; } else { @@ -132,8 +127,13 @@ public class WikipediaPoiMenu { adapter.addItem(new ContextMenuItem.ItemBuilder() .setLayout(R.layout.list_item_icon_and_download) .setTitleId(R.string.downloading_list_indexes, mapActivity) + .hideDivider(true) .setLoading(true) .setListener(l).createItem()); + adapter.addItem(new ContextMenuItem.ItemBuilder() + .setLayout(R.layout.card_bottom_divider) + .setMinHeight(spaceHeight) + .createItem()); } else { try { IndexItem currentDownloadingItem = downloadThread.getCurrentDownloadingItem(); @@ -146,12 +146,15 @@ public class WikipediaPoiMenu { .setDescription(app.getString(R.string.wiki_menu_download_descr)) .setCategory(true) .setLayout(R.layout.list_group_title_with_descr).createItem()); - for (final IndexItem indexItem : wikiIndexes) { + for (int i = 0; i < wikiIndexes.size(); i++) { + final IndexItem indexItem = wikiIndexes.get(i); + boolean isLastItem = i == wikiIndexes.size() - 1; ContextMenuItem.ItemBuilder itemBuilder = new ContextMenuItem.ItemBuilder() .setLayout(R.layout.list_item_icon_and_download) .setTitle(indexItem.getVisibleName(app, app.getRegions(), false)) .setDescription(DownloadActivityType.WIKIPEDIA_FILE.getString(app) + " • " + indexItem.getSizeDescription(app)) .setIcon(DownloadActivityType.WIKIPEDIA_FILE.getIconResource()) + .hideDivider(isLastItem) .setListener(new ContextMenuAdapter.ItemClickListener() { @Override public boolean onContextMenuClick(ArrayAdapter adapter, int itemId, int position, boolean isChecked, int[] viewCoordinates) { @@ -207,6 +210,10 @@ public class WikipediaPoiMenu { } adapter.addItem(itemBuilder.createItem()); } + adapter.addItem(new ContextMenuItem.ItemBuilder() + .setLayout(R.layout.card_bottom_divider) + .setMinHeight(spaceHeight) + .createItem()); } } catch (IOException e) { e.printStackTrace(); @@ -227,8 +234,10 @@ public class WikipediaPoiMenu { if (result) { Bundle wikiPoiSetting = getWikiPoiSettingsForProfile(app, appMode); if (wikiPoiSetting != null) { + boolean globalWikiEnabled = + wikiPoiSetting.getBoolean(GLOBAL_WIKI_POI_ENABLED_KEY); if (refresh) { - refreshWikiPoi(mapActivity, wikiPoiSetting); + refreshWikiPoi(mapActivity, globalWikiEnabled); } else { toggleWikipediaPoi(mapActivity, true, usedOnMap); } @@ -241,6 +250,25 @@ public class WikipediaPoiMenu { }); } + public static String getTranslation(OsmandApplication app, String locale) { + String translation = app.getLangTranslation(locale); + if (translation.equalsIgnoreCase(locale)) { + translation = getTranslationFromPhrases(app, locale); + } + return translation; + } + + private static String getTranslationFromPhrases(OsmandApplication app, String locale) { + String keyName = WIKI_LANG + "_" + locale; + try { + Field f = R.string.class.getField("poi_" + keyName); + Integer in = (Integer) f.get(null); + return app.getString(in); + } catch (Throwable e) { + return locale; + } + } + public static Bundle getWikiPoiSettings(OsmandApplication app) { Bundle wikiSettings = getWikiPoiSettingsForProfile(app, app.getSettings().getApplicationMode()); if (wikiSettings == null) { @@ -272,7 +300,8 @@ public class WikipediaPoiMenu { Bundle wikiPoiSettings = getWikiPoiSettings(app); if (wikiPoiSettings != null) { settings.SHOW_WIKIPEDIA_POI.set(true); - showWikiOnMap(app, wikiPoiSettings); + boolean globalWikiEnabled = wikiPoiSettings.getBoolean(GLOBAL_WIKI_POI_ENABLED_KEY); + showWikiOnMap(app, globalWikiEnabled); } else { ApplicationMode appMode = settings.getApplicationMode(); showLanguagesDialog(mapActivity, appMode, usedOnMap, false); @@ -285,21 +314,20 @@ public class WikipediaPoiMenu { mapActivity.refreshMap(); } - public static void refreshWikiPoi(MapActivity mapActivity, @NonNull Bundle wikiPoiSettings) { + public static void refreshWikiPoi(MapActivity mapActivity, boolean globalWikiEnabled) { OsmandApplication app = mapActivity.getMyApplication(); hideWikiFromMap(app); - showWikiOnMap(app, wikiPoiSettings); + showWikiOnMap(app, globalWikiEnabled); mapActivity.getDashboard().refreshContent(true); mapActivity.refreshMap(); } - private static void showWikiOnMap(OsmandApplication app, Bundle wikiPoiSettings) { + private static void showWikiOnMap(OsmandApplication app, boolean globalWikiEnabled) { PoiFiltersHelper ph = app.getPoiFilters(); - boolean globalWikiEnabled = wikiPoiSettings.getBoolean(GLOBAL_WIKI_POI_ENABLED_KEY); if (globalWikiEnabled) { ph.addSelectedPoiFilter(PoiTemplateList.WIKI, ph.getGlobalWikiPoiFilter()); } else { - List filters = ph.getWikiPOIFilters(); + List filters = ph.getLocalWikipediaPoiFilters(true); for (PoiUIFilter filter : filters) { ph.addSelectedPoiFilter(PoiTemplateList.WIKI, filter); } @@ -318,28 +346,22 @@ public class WikipediaPoiMenu { Bundle wikiLanguagesSetting = getWikiPoiSettings(app); if (wikiLanguagesSetting != null) { boolean globalWikiEnabled = wikiLanguagesSetting.getBoolean(GLOBAL_WIKI_POI_ENABLED_KEY); - List enabledLanguages = wikiLanguagesSetting.getStringArrayList(ENABLED_WIKI_POI_LANGUAGES_KEY); + List enabledLocales = wikiLanguagesSetting.getStringArrayList(ENABLED_WIKI_POI_LANGUAGES_KEY); if (globalWikiEnabled) { return app.getString(R.string.shared_string_all_languages); - } else if (enabledLanguages != null) { + } else if (enabledLocales != null) { List translations = new ArrayList<>(); - for (String language : enabledLanguages) { - translations.add(app.getLangTranslation(language)); + for (String locale : enabledLocales) { + translations.add(getTranslation(app, locale)); } - return AndroidUtils.makeStringFromList(translations, ", "); + return android.text.TextUtils.join(", ", translations); } } return null; } public static boolean isWikiPoiEnabled(OsmandApplication app) { - OsmandSettings settings = app.getSettings(); - boolean shouldShowWiki = settings.SHOW_WIKIPEDIA_POI.get(); - if (shouldShowWiki && getWikiPoiSettings(app) == null) { - settings.SHOW_WIKIPEDIA_POI.set(false); - shouldShowWiki = false; - } - return shouldShowWiki; + return app.getSettings().SHOW_WIKIPEDIA_POI.get() && getWikiPoiSettings(app) != null; } public static ContextMenuAdapter createListAdapter(final MapActivity mapActivity) { From 0d3f0711fdec43bcb7370419610f19928f9da5e6 Mon Sep 17 00:00:00 2001 From: Nazar-Kutz Date: Wed, 8 Apr 2020 13:50:21 +0300 Subject: [PATCH 099/202] Wikipedia Poi (Fixes 2) --- .../osmand/plus/dialogs/ConfigureMapMenu.java | 12 +++++++- .../plus/wikipedia/WikipediaPoiMenu.java | 28 +++++++++++++------ 2 files changed, 31 insertions(+), 9 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java b/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java index d036379d6d..6552a37ac1 100644 --- a/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java +++ b/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java @@ -27,6 +27,7 @@ import androidx.appcompat.widget.SwitchCompat; import androidx.core.content.ContextCompat; import net.osmand.AndroidUtils; +import net.osmand.CallbackWithObject; import net.osmand.GPXUtilities; import net.osmand.PlatformUtil; import net.osmand.core.android.MapRendererContext; @@ -245,7 +246,16 @@ public class ConfigureMapMenu { showGpxSelectionDialog(adapter, adapter.getItem(pos)); } } else if (itemId == R.string.shared_string_wikipedia) { - WikipediaPoiMenu.toggleWikipediaPoi(ma, isChecked, true); + WikipediaPoiMenu.toggleWikipediaPoi(ma, isChecked, true, + new CallbackWithObject() { + @Override + public boolean processResult(Boolean result) { + item.setSelected(result); + item.setColorRes(result ? R.color.osmand_orange : ContextMenuItem.INVALID_ID); + adapter.notifyDataSetChanged(); + return true; + } + }); } else if (itemId == R.string.map_markers) { settings.SHOW_MAP_MARKERS.set(isChecked); } else if (itemId == R.string.layer_map) { diff --git a/OsmAnd/src/net/osmand/plus/wikipedia/WikipediaPoiMenu.java b/OsmAnd/src/net/osmand/plus/wikipedia/WikipediaPoiMenu.java index 4baf24a982..ec7ca88d26 100644 --- a/OsmAnd/src/net/osmand/plus/wikipedia/WikipediaPoiMenu.java +++ b/OsmAnd/src/net/osmand/plus/wikipedia/WikipediaPoiMenu.java @@ -59,6 +59,14 @@ public class WikipediaPoiMenu { adapter.setProfileDependent(true); adapter.setNightMode(nightMode); + final CallbackWithObject callback = new CallbackWithObject() { + @Override + public boolean processResult(Boolean result) { + mapActivity.getDashboard().refreshContent(true); + return true; + } + }; + ContextMenuAdapter.OnRowItemClick l = new ContextMenuAdapter.OnRowItemClick() { @Override public boolean onContextMenuClick(final ArrayAdapter adapter, @@ -67,11 +75,11 @@ public class WikipediaPoiMenu { app.runInUIThread(new Runnable() { @Override public void run() { - toggleWikipediaPoi(mapActivity, !enabled, true); + toggleWikipediaPoi(mapActivity, !enabled, true, callback); } }); } else if (itemId == languageActionStringId) { - showLanguagesDialog(mapActivity, appMode, true, true); + showLanguagesDialog(mapActivity, appMode, true, true, callback); } return false; } @@ -225,7 +233,8 @@ public class WikipediaPoiMenu { private static void showLanguagesDialog(@NonNull final MapActivity mapActivity, @NonNull final ApplicationMode appMode, final boolean usedOnMap, - final boolean refresh) { + final boolean refresh, + final CallbackWithObject callback) { final OsmandApplication app = mapActivity.getMyApplication(); SelectWikiLanguagesBottomSheet.showInstance(mapActivity, appMode, usedOnMap, new CallbackWithObject() { @@ -239,10 +248,10 @@ public class WikipediaPoiMenu { if (refresh) { refreshWikiPoi(mapActivity, globalWikiEnabled); } else { - toggleWikipediaPoi(mapActivity, true, usedOnMap); + toggleWikipediaPoi(mapActivity, true, usedOnMap, callback); } } else { - toggleWikipediaPoi(mapActivity, false, usedOnMap); + toggleWikipediaPoi(mapActivity, false, usedOnMap, callback); } } return true; @@ -293,7 +302,8 @@ public class WikipediaPoiMenu { return bundle; } - public static void toggleWikipediaPoi(final MapActivity mapActivity, boolean enable, boolean usedOnMap) { + public static void toggleWikipediaPoi(final MapActivity mapActivity, boolean enable, + boolean usedOnMap, CallbackWithObject callback) { OsmandApplication app = mapActivity.getMyApplication(); OsmandSettings settings = app.getSettings(); if (enable) { @@ -304,13 +314,15 @@ public class WikipediaPoiMenu { showWikiOnMap(app, globalWikiEnabled); } else { ApplicationMode appMode = settings.getApplicationMode(); - showLanguagesDialog(mapActivity, appMode, usedOnMap, false); + showLanguagesDialog(mapActivity, appMode, usedOnMap, false, callback); } } else { settings.SHOW_WIKIPEDIA_POI.set(false); hideWikiFromMap(app); } - mapActivity.getDashboard().refreshContent(true); + if (callback != null) { + callback.processResult(settings.SHOW_WIKIPEDIA_POI.get()); + } mapActivity.refreshMap(); } From 3d8f5777e6ccdb915c40f092408efa09bff5d106 Mon Sep 17 00:00:00 2001 From: veliymolfar Date: Wed, 8 Apr 2020 15:54:25 +0300 Subject: [PATCH 100/202] MenuItemConfigPreference implementation --- .../net/osmand/plus/ContextMenuAdapter.java | 164 +++++------------- .../src/net/osmand/plus/OsmandSettings.java | 106 ++++++++--- .../plus/activities/MapActivityActions.java | 2 +- .../osmand/plus/dashboard/DashboardOnMap.java | 2 +- .../settings/ConfigureMenuItemsFragment.java | 86 +++++---- .../settings/ConfigureMenuRootFragment.java | 9 +- .../settings/RearrangeMenuItemsAdapter.java | 5 + .../ChangeGeneralProfilesPrefBottomSheet.java | 60 ++----- 8 files changed, 194 insertions(+), 240 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/ContextMenuAdapter.java b/OsmAnd/src/net/osmand/plus/ContextMenuAdapter.java index 0fa75b9dd3..6f72392bd5 100644 --- a/OsmAnd/src/net/osmand/plus/ContextMenuAdapter.java +++ b/OsmAnd/src/net/osmand/plus/ContextMenuAdapter.java @@ -552,25 +552,14 @@ public class ContextMenuAdapter { } } - public void initDefaultOrders(@NonNull List items) { + private void initDefaultOrders(@NonNull List items) { for (int i = 0; i < items.size(); i++) { items.get(i).setOrder(i); } } - public List getItemsForRearrangeAdapter(@NonNull ScreenType screenType, @Nullable List hiddenItemsIds, @Nullable HashMap itemsOrderIds, boolean hidden) { - String idScheme = ""; - switch (screenType) { - case DRAWER: - idScheme = DRAWER_ITEM_ID_SCHEME; - break; - case CONFIGURE_MAP: - idScheme = CONFIGURE_MAP_ITEM_ID_SCHEME; - break; - case CONTEXT_MENU_ACTIONS: - idScheme = MAP_CONTEXT_MENU_ACTIONS; - break; - } + public List getItemsForRearrangeAdapter(@Nullable List hiddenItemsIds, @Nullable HashMap itemsOrderIds, boolean hidden) { + String idScheme = getIdScheme(); if (itemsOrderIds == null || itemsOrderIds.isEmpty()) { initDefaultOrders(items); } else { @@ -593,19 +582,8 @@ public class ContextMenuAdapter { return hidden ? hiddenItems : visibleItems; } - public List getDefaultItems(ScreenType screenType) { - String idScheme = ""; - switch (screenType) { - case DRAWER: - idScheme = DRAWER_ITEM_ID_SCHEME; - break; - case CONFIGURE_MAP: - idScheme = CONFIGURE_MAP_ITEM_ID_SCHEME; - break; - case CONTEXT_MENU_ACTIONS: - idScheme = MAP_CONTEXT_MENU_ACTIONS; - break; - } + public List getDefaultItems() { + String idScheme = getIdScheme(); List items = new ArrayList<>(); for (ContextMenuItem item : this.items) { String id = item.getId(); @@ -616,6 +594,26 @@ public class ContextMenuAdapter { return items; } + private String getIdScheme() { + String idScheme = ""; + for (ContextMenuItem item : items) { + String id = item.getId(); + if (id != null) { + if (id.startsWith(DRAWER_ITEM_ID_SCHEME)) { + idScheme = DRAWER_ITEM_ID_SCHEME; + break; + } else if (id.startsWith(CONFIGURE_MAP_ITEM_ID_SCHEME)) { + idScheme = CONFIGURE_MAP_ITEM_ID_SCHEME; + break; + } else if (id.startsWith(MAP_CONTEXT_MENU_ACTIONS)) { + idScheme = MAP_CONTEXT_MENU_ACTIONS; + break; + } + } + } + return idScheme; + } + public void reorderMenuItems(@NonNull List defaultItems, @NonNull HashMap itemsOrder) { for (ContextMenuItem item : defaultItems) { Integer order = itemsOrder.get(item.getId()); @@ -641,100 +639,28 @@ public class ContextMenuAdapter { return result; } - public void resetMenuItems(@NonNull OsmandApplication app, @NonNull ScreenType screenType) { - saveHiddenItemsIds(app, screenType, null); - saveItemsIdsOrder(app, screenType, null); - } - - @NonNull - public List getHiddenItemsIds(@NonNull OsmandApplication app, @NonNull ScreenType type) { - List hiddenItemsIds = null; - switch (type) { - case DRAWER: - hiddenItemsIds = app.getSettings().HIDDEN_DRAWER_ITEMS.getStringsList(); - break; - case CONFIGURE_MAP: - hiddenItemsIds = app.getSettings().HIDDEN_CONFIGURE_MAP_ITEMS.getStringsList(); - break; - case CONTEXT_MENU_ACTIONS: - hiddenItemsIds = app.getSettings().HIDDEN_CONTEXT_MENU_ACTIONS_ITEMS.getStringsList(); - break; + public void initItemsCustomOrder(@NonNull OsmandApplication app) { + OsmandSettings.MenuItemConfigPreference preference = null; + for (ContextMenuItem item : items) { + String id = item.getId(); + if (id != null) { + if (id.startsWith(DRAWER_ITEM_ID_SCHEME)) { + preference = app.getSettings().DRAWER_ITEMS; + break; + } else if (id.startsWith(CONFIGURE_MAP_ITEM_ID_SCHEME)) { + preference = app.getSettings().CONFIGURE_MAP_ITEMS; + break; + } else if (id.startsWith(MAP_CONTEXT_MENU_ACTIONS)) { + preference = app.getSettings().CONTEXT_MENU_ACTIONS_ITEMS; + break; + } + } } - return hiddenItemsIds != null ? new ArrayList<>(hiddenItemsIds) : new ArrayList(); - } - - @NonNull - public List getItemsIdsOrder(@NonNull OsmandApplication app, @NonNull ScreenType type) { - List hiddenItemsIds = null; - switch (type) { - case DRAWER: - hiddenItemsIds = app.getSettings().DRAWER_ITEMS_ORDER.getStringsList(); - break; - case CONFIGURE_MAP: - hiddenItemsIds = app.getSettings().CONFIGURE_MAP_ITEMS_ORDER.getStringsList(); - break; - case CONTEXT_MENU_ACTIONS: - hiddenItemsIds = app.getSettings().CONTEXT_MENU_ACTIONS_ITEMS_ORDER.getStringsList(); - break; + if (preference == null) { + return; } - return hiddenItemsIds != null ? new ArrayList<>(hiddenItemsIds) : new ArrayList(); - } - - public void saveHiddenItemsIds(@NonNull OsmandApplication app, @NonNull ScreenType type, @Nullable List hiddenItemsIds) { - switch (type) { - case DRAWER: - app.getSettings().HIDDEN_DRAWER_ITEMS.setStringsList(hiddenItemsIds); - break; - case CONFIGURE_MAP: - app.getSettings().HIDDEN_CONFIGURE_MAP_ITEMS.setStringsList(hiddenItemsIds); - break; - case CONTEXT_MENU_ACTIONS: - app.getSettings().HIDDEN_CONTEXT_MENU_ACTIONS_ITEMS.setStringsList(hiddenItemsIds); - break; - } - } - - public void saveItemsIdsOrder(@NonNull OsmandApplication app, @NonNull ScreenType type, @Nullable List itemsIdsOrder) { - switch (type) { - case DRAWER: - app.getSettings().DRAWER_ITEMS_ORDER.setStringsList(itemsIdsOrder); - break; - case CONFIGURE_MAP: - app.getSettings().CONFIGURE_MAP_ITEMS_ORDER.setStringsList(itemsIdsOrder); - break; - case CONTEXT_MENU_ACTIONS: - app.getSettings().CONTEXT_MENU_ACTIONS_ITEMS_ORDER.setStringsList(itemsIdsOrder); - break; - } - } - - public String getPrefIdOrder(@NonNull OsmandApplication app, @NonNull ScreenType type) { - switch (type) { - case DRAWER: - return app.getSettings().DRAWER_ITEMS_ORDER.getId(); - case CONFIGURE_MAP: - return app.getSettings().CONFIGURE_MAP_ITEMS_ORDER.getId(); - case CONTEXT_MENU_ACTIONS: - return app.getSettings().CONTEXT_MENU_ACTIONS_ITEMS_ORDER.get(); - } - return ""; - } - - public String getPrefIdHidden(@NonNull OsmandApplication app, @NonNull ScreenType type) { - switch (type) { - case DRAWER: - return app.getSettings().HIDDEN_DRAWER_ITEMS.getId(); - case CONFIGURE_MAP: - return app.getSettings().HIDDEN_CONFIGURE_MAP_ITEMS.getId(); - case CONTEXT_MENU_ACTIONS: - return app.getSettings().HIDDEN_CONTEXT_MENU_ACTIONS_ITEMS.get(); - } - return ""; - } - - public void initItemsCustomOrder(@NonNull OsmandApplication app, @NonNull ScreenType type) { - List savedOrder = getItemsIdsOrder(app, type); - List hiddenItems = getHiddenItemsIds(app, type); + List savedOrder = preference.getOrderIds(); + List hiddenItems = preference.getHiddenIds(); if (!savedOrder.isEmpty()) { reorderMenuItems(items, getMenuItemsOrder(savedOrder)); diff --git a/OsmAnd/src/net/osmand/plus/OsmandSettings.java b/OsmAnd/src/net/osmand/plus/OsmandSettings.java index ed3a6128d8..84e31e3a56 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandSettings.java +++ b/OsmAnd/src/net/osmand/plus/OsmandSettings.java @@ -25,6 +25,7 @@ import com.google.gson.GsonBuilder; import com.google.gson.reflect.TypeToken; import net.osmand.IndexConstants; +import net.osmand.PlatformUtil; import net.osmand.StateChangedListener; import net.osmand.ValueHolder; import net.osmand.aidl.OsmandAidlApi; @@ -56,6 +57,8 @@ import net.osmand.plus.voice.CommandPlayer; import net.osmand.render.RenderingRulesStorage; import net.osmand.util.Algorithms; +import org.apache.commons.logging.Log; +import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; @@ -79,6 +82,8 @@ import java.util.StringTokenizer; public class OsmandSettings { + private static final Log LOG = PlatformUtil.getLog(OsmandSettings.class.getName()); + public static final int VERSION = 1; public interface OsmandPreference { @@ -412,11 +417,6 @@ public class OsmandSettings { ((BooleanPreference) preference).setModeValue(mode, (Boolean) value); return true; } - } else if (preference instanceof ListStringPreference) { - if (value instanceof List) { - ((ListStringPreference) preference).setModeValues(mode, (List) value); - return true; - } } else if (preference instanceof StringPreference) { if (value instanceof String) { ((StringPreference) preference).setModeValue(mode, (String) value); @@ -1103,6 +1103,75 @@ public class OsmandSettings { } } + public class MenuItemConfigPreference extends StringPreference { + private static final String HIDDEN = "hidden"; + private static final String ORDER = "order"; + + private MenuItemConfigPreference(String id, String defaultValue) { + super(id, defaultValue); + } + + private void addIdsToJsonArray(@NonNull JSONArray jsonArray, List ids) { + if (ids != null && !ids.isEmpty()) { + for (String id : ids) { + jsonArray.put(id); + } + } + } + + private List getIdValues(String itemName) { + List ids = new ArrayList<>(); + String itemsString = get(); + if (itemsString == null) { + return ids; + } + try { + JSONObject json = new JSONObject(itemsString); + JSONObject items = json.optJSONObject(getId()); + JSONArray idsArray = items.optJSONArray(itemName); + if (idsArray != null) { + for (int i = 0; i < idsArray.length(); i++) { + String id = idsArray.optString(i); + ids.add(id); + } + } + } catch (JSONException e) { + LOG.error("Error converting to json string: " + e); + } + return ids; + } + + public String convertToJsonString(List hidden, List order) { + try { + JSONObject json = new JSONObject(); + JSONObject items = new JSONObject(); + JSONArray hiddenItems = new JSONArray(); + JSONArray orderItems = new JSONArray(); + addIdsToJsonArray(hiddenItems, hidden); + addIdsToJsonArray(orderItems, order); + items.put(HIDDEN, hiddenItems); + items.put(ORDER, orderItems); + json.put(getId(), items); + return json.toString(); + } catch (JSONException e) { + LOG.error("Error converting to json string: " + e); + } + return ""; + } + + public boolean setIdValues(List hidden, List order) { + return set(convertToJsonString(hidden, order)); + } + + public List getHiddenIds() { + return getIdValues(HIDDEN); + } + + public List getOrderIds() { + return getIdValues(ORDER); + } + } + public class EnumIntPreference> extends CommonPreference { private final E[] values; @@ -3410,30 +3479,21 @@ public class OsmandSettings { SELECTED_POI_FILTER_FOR_MAP.set(android.text.TextUtils.join(",", poiFilters)); } - public final ListStringPreference HIDDEN_CONTEXT_MENU_ACTIONS_ITEMS = (ListStringPreference) - new ListStringPreference("hidden_context_menu_actions_items", null, ",,").makeProfile().cache(); - - public final ListStringPreference CONTEXT_MENU_ACTIONS_ITEMS_ORDER = (ListStringPreference) - new ListStringPreference("context_menu_actions_items_order", null, ",,").makeProfile().cache(); - - public final ListStringPreference HIDDEN_CONFIGURE_MAP_ITEMS = (ListStringPreference) - new ListStringPreference("hidden_configure_map_items", null, ",,").makeProfile().cache(); - - public final ListStringPreference CONFIGURE_MAP_ITEMS_ORDER = (ListStringPreference) - new ListStringPreference("configure_map_items_order", null, ",,").makeProfile().cache(); - - public final ListStringPreference DRAWER_ITEMS_ORDER = (ListStringPreference) - new ListStringPreference("drawer_items_order", null, ",,").makeProfile().cache(); - - public final ListStringPreference HIDDEN_DRAWER_ITEMS = (ListStringPreference) - new ListStringPreference("hidden_drawer_items", null, ",,").makeProfile().cache(); - public final ListStringPreference POI_FILTERS_ORDER = (ListStringPreference) new ListStringPreference("poi_filters_order", null, ",,").makeProfile().cache(); public final ListStringPreference INACTIVE_POI_FILTERS = (ListStringPreference) new ListStringPreference("inactive_poi_filters", null, ",,").makeProfile().cache(); + public final MenuItemConfigPreference DRAWER_ITEMS = + (MenuItemConfigPreference) new MenuItemConfigPreference("drawer_items", null).makeProfile().cache(); + + public final MenuItemConfigPreference CONFIGURE_MAP_ITEMS = + (MenuItemConfigPreference) new MenuItemConfigPreference("configure_map_items", null).makeProfile().cache(); + + public final MenuItemConfigPreference CONTEXT_MENU_ACTIONS_ITEMS = + (MenuItemConfigPreference) new MenuItemConfigPreference("context_menu_actions_items", null).makeProfile().cache(); + public static final String VOICE_PROVIDER_NOT_USE = "VOICE_PROVIDER_NOT_USE"; public static final String[] TTS_AVAILABLE_VOICES = new String[]{ diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java index 3f081a547c..26f929038a 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java @@ -1194,7 +1194,7 @@ public class MapActivityActions implements DialogProvider { } menuItemsListView.setDivider(null); final ContextMenuAdapter contextMenuAdapter = createMainOptionsMenu(); - contextMenuAdapter.initItemsCustomOrder(getMyApplication(), ScreenType.DRAWER); + contextMenuAdapter.initItemsCustomOrder(getMyApplication()); contextMenuAdapter.setDefaultLayoutId(R.layout.simple_list_menu_item); final ArrayAdapter simpleListAdapter = contextMenuAdapter.createListAdapter(mapActivity, !nightMode); diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java b/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java index 6bc0462bc9..a2fe40760a 100644 --- a/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java +++ b/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java @@ -698,7 +698,7 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks, IRouteInfo cm = mapActivity.getMapLayers().getMapWidgetRegistry().getViewConfigureMenuAdapter(mapActivity); } else if (visibleType == DashboardType.CONFIGURE_MAP) { cm = new ConfigureMapMenu().createListAdapter(mapActivity); - cm.initItemsCustomOrder(getMyApplication(), ScreenType.CONFIGURE_MAP); + cm.initItemsCustomOrder(getMyApplication()); } else if (visibleType == DashboardType.LIST_MENU) { cm = mapActivity.getMapActions().createMainOptionsMenu(); } else if (visibleType == DashboardType.ROUTE_PREFERENCES) { diff --git a/OsmAnd/src/net/osmand/plus/settings/ConfigureMenuItemsFragment.java b/OsmAnd/src/net/osmand/plus/settings/ConfigureMenuItemsFragment.java index f4aca1993f..7b2ee2a734 100644 --- a/OsmAnd/src/net/osmand/plus/settings/ConfigureMenuItemsFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/ConfigureMenuItemsFragment.java @@ -122,8 +122,8 @@ public class ConfigureMenuItemsFragment extends BaseOsmAndFragment hiddenMenuItems = savedInstanceState.getStringArrayList(HIDDEN_ITEMS_KEY); menuItemsOrder = (HashMap) savedInstanceState.getSerializable(ITEMS_ORDER_KEY); } else { - hiddenMenuItems = contextMenuAdapter.getHiddenItemsIds(app, screenType); - menuItemsOrder = contextMenuAdapter.getMenuItemsOrder(contextMenuAdapter.getItemsIdsOrder(app, screenType)); + hiddenMenuItems = getSettingForScreen(app, screenType).getHiddenIds(); + menuItemsOrder = contextMenuAdapter.getMenuItemsOrder(getSettingForScreen(app, screenType).getOrderIds()); } } @@ -218,34 +218,32 @@ public class ConfigureMenuItemsFragment extends BaseOsmAndFragment applyButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { - HashMap prefsMap = new HashMap<>(); - prefsMap.put(contextMenuAdapter.getPrefIdHidden(app, screenType), (Serializable) hiddenMenuItems); - List defItems = contextMenuAdapter.getDefaultItems(screenType); - contextMenuAdapter.reorderMenuItems(defItems, menuItemsOrder); - List ids = new ArrayList<>(); - for (ContextMenuItem item : defItems) { - ids.add(item.getId()); - } - prefsMap.put(contextMenuAdapter.getPrefIdOrder(app, screenType), (Serializable) ids); - FragmentManager fm = getFragmentManager(); - if (fm != null) { - ChangeGeneralProfilesPrefBottomSheet.showInstance( - fm, - prefsMap, - getTargetFragment(), - false, - appMode, - new ChangeGeneralProfilesPrefBottomSheet.OnChangeSettingListener() { - @Override - public void onApplied() { - dismissFragment(); - } + List defItems = contextMenuAdapter.getDefaultItems(); + contextMenuAdapter.reorderMenuItems(defItems, menuItemsOrder); + List ids = new ArrayList<>(); + for (ContextMenuItem item : defItems) { + ids.add(item.getId()); + } + FragmentManager fm = getFragmentManager(); + String stringToSave = getSettingForScreen(app, screenType).convertToJsonString(hiddenMenuItems, ids); + if (fm != null) { + ChangeGeneralProfilesPrefBottomSheet.showInstance(fm, + getSettingForScreen(app, screenType).getId(), + stringToSave, + getTargetFragment(), + false, + appMode, + new ChangeGeneralProfilesPrefBottomSheet.OnChangeSettingListener() { + @Override + public void onApplied() { + dismissFragment(); + } - @Override - public void onDiscard() { + @Override + public void onDiscard() { - } - }); + } + }); } } }); @@ -259,8 +257,8 @@ public class ConfigureMenuItemsFragment extends BaseOsmAndFragment List items = new ArrayList<>(); items.add(new AdapterItem(DESCRIPTION, screenType)); - List visible = contextMenuAdapter.getItemsForRearrangeAdapter(screenType, hiddenMenuItems, wasReset ? null : menuItemsOrder, false); - List hiddenItems = contextMenuAdapter.getItemsForRearrangeAdapter(screenType, hiddenMenuItems, wasReset ? null : menuItemsOrder, true); + List visible = contextMenuAdapter.getItemsForRearrangeAdapter(hiddenMenuItems, wasReset ? null : menuItemsOrder, false); + List hiddenItems = contextMenuAdapter.getItemsForRearrangeAdapter(hiddenMenuItems, wasReset ? null : menuItemsOrder, true); if (screenType == ScreenType.CONTEXT_MENU_ACTIONS) { List main = new ArrayList<>(); int actionsIndex = 3; @@ -360,22 +358,22 @@ public class ConfigureMenuItemsFragment extends BaseOsmAndFragment public void copyAppModePrefs(ApplicationMode appMode) { if (appMode != null) { List prefs = new ArrayList<>(); - switch (screenType) { - case DRAWER: - prefs.add(app.getSettings().DRAWER_ITEMS_ORDER); - prefs.add(app.getSettings().HIDDEN_DRAWER_ITEMS); - break; - case CONFIGURE_MAP: - prefs.add(app.getSettings().CONFIGURE_MAP_ITEMS_ORDER); - prefs.add(app.getSettings().HIDDEN_CONFIGURE_MAP_ITEMS); - break; - case CONTEXT_MENU_ACTIONS: - prefs.add(app.getSettings().CONTEXT_MENU_ACTIONS_ITEMS_ORDER); - prefs.add(app.getSettings().HIDDEN_CONTEXT_MENU_ACTIONS_ITEMS); - break; - } + prefs.add(getSettingForScreen(app, screenType)); app.getSettings().copyProfilePreferences(appMode, this.appMode, prefs); dismissFragment(); } } + + public static OsmandSettings.MenuItemConfigPreference getSettingForScreen(OsmandApplication app, ScreenType screenType) { + switch (screenType) { + case DRAWER: + return app.getSettings().DRAWER_ITEMS; + case CONFIGURE_MAP: + return app.getSettings().CONFIGURE_MAP_ITEMS; + case CONTEXT_MENU_ACTIONS: + return app.getSettings().CONTEXT_MENU_ACTIONS_ITEMS; + default: + throw new IllegalArgumentException("Unsupported screen type"); + } + } } diff --git a/OsmAnd/src/net/osmand/plus/settings/ConfigureMenuRootFragment.java b/OsmAnd/src/net/osmand/plus/settings/ConfigureMenuRootFragment.java index c85c4ebd14..09a94eed48 100644 --- a/OsmAnd/src/net/osmand/plus/settings/ConfigureMenuRootFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/ConfigureMenuRootFragment.java @@ -37,6 +37,7 @@ import net.osmand.plus.activities.PluginsActivity; import net.osmand.plus.base.BaseOsmAndFragment; import net.osmand.plus.dialogs.ConfigureMapMenu; import net.osmand.plus.helpers.FontCache; +import net.osmand.plus.mapcontextmenu.MapContextMenu; import net.osmand.plus.widgets.style.CustomTypefaceSpan; @@ -222,12 +223,12 @@ public class ConfigureMenuRootFragment extends BaseOsmAndFragment { contextMenuAdapter = configureMapMenu.createListAdapter((MapActivity) activity); break; case CONTEXT_MENU_ACTIONS: - ConfigureMapMenu configureaMapMenu = new ConfigureMapMenu(); - contextMenuAdapter = configureaMapMenu.createListAdapter((MapActivity) activity); + MapContextMenu menu = ((MapActivity) activity).getContextMenu(); + contextMenuAdapter = menu.getAdapter(); break; } - int hiddenCount = contextMenuAdapter.getHiddenItemsIds(app, type).size(); - int allCount = contextMenuAdapter.getDefaultItems(type).size(); + int hiddenCount = ConfigureMenuItemsFragment.getSettingForScreen(app, type).getHiddenIds().size(); + int allCount = contextMenuAdapter.getDefaultItems().size(); String amount = getString(R.string.n_items_of_z, String.valueOf(allCount - hiddenCount), String.valueOf(allCount)); return getString(R.string.ltr_or_rtl_combine_via_colon, getString(R.string.shared_string_items), amount); } diff --git a/OsmAnd/src/net/osmand/plus/settings/RearrangeMenuItemsAdapter.java b/OsmAnd/src/net/osmand/plus/settings/RearrangeMenuItemsAdapter.java index 5f92b061f7..799705b6d8 100644 --- a/OsmAnd/src/net/osmand/plus/settings/RearrangeMenuItemsAdapter.java +++ b/OsmAnd/src/net/osmand/plus/settings/RearrangeMenuItemsAdapter.java @@ -46,6 +46,7 @@ public class RearrangeMenuItemsAdapter extends RecyclerView.Adapter items; private MenuItemsAdapterListener listener; private int activeColorRes; + private int textColorRes; public RearrangeMenuItemsAdapter(OsmandApplication app, @@ -57,6 +58,9 @@ public class RearrangeMenuItemsAdapter extends RecyclerView.Adapter prefsMap; - @Nullable private OnChangeSettingListener listener; @@ -58,12 +50,11 @@ public class ChangeGeneralProfilesPrefBottomSheet extends BasePreferenceBottomSh if (app == null || args == null) { return; } - prefId = args.getString(PREFERENCE_ID); + final String prefId = args.getString(PREFERENCE_ID); newValue = args.getSerializable(NEW_VALUE_KEY); - prefsMap = (HashMap) args.getSerializable(PREFS_MAP_KEY); -// if (newValue == null || prefId == null) { -// return; -// } + if (newValue == null || prefId == null) { + return; + } items.add(new TitleItem(getString(R.string.change_default_settings))); items.add(new LongDescriptionItem(getString(R.string.apply_preference_to_all_profiles))); @@ -75,11 +66,7 @@ public class ChangeGeneralProfilesPrefBottomSheet extends BasePreferenceBottomSh .setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { - if (prefsMap != null) { - savePrefs(app, prefsMap, true); - } else if (newValue != null || prefId != null) { - app.getSettings().setPreferenceForAllModes(prefId, newValue); - } + app.getSettings().setPreferenceForAllModes(prefId, newValue); updateTargetSettings(false, true); if (listener != null) { listener.onApplied(); @@ -99,11 +86,7 @@ public class ChangeGeneralProfilesPrefBottomSheet extends BasePreferenceBottomSh .setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { - if (prefsMap != null) { - savePrefs(app, prefsMap, false); - } else if (newValue != null || prefId != null) { - app.getSettings().setPreference(prefId, newValue, getAppMode()); - } + app.getSettings().setPreference(prefId, newValue, getAppMode()); updateTargetSettings(false, false); if (listener != null) { listener.onApplied(); @@ -143,18 +126,6 @@ public class ChangeGeneralProfilesPrefBottomSheet extends BasePreferenceBottomSh outState.putSerializable(NEW_VALUE_KEY, newValue); } - private void savePrefs(@NonNull OsmandApplication app, - @NonNull HashMap prefsMap, boolean toAllProfiles) { - List ids = new ArrayList<>(prefsMap.keySet()); - for (String id : ids) { - if (toAllProfiles) { - app.getSettings().setPreferenceForAllModes(id, prefsMap.get(id)); - } else { - app.getSettings().setPreference(id, prefsMap.get(id), getAppMode()); - } - } - } - private void updateTargetSettings(boolean discard, boolean appliedToAllProfiles) { BaseSettingsFragment target = (BaseSettingsFragment) getTargetFragment(); if (target != null) { @@ -184,22 +155,22 @@ public class ChangeGeneralProfilesPrefBottomSheet extends BasePreferenceBottomSh Fragment target, boolean usedOnMap, @Nullable ApplicationMode appMode) { - showFragmentInstance(fm, prefId, newValue, null, target, usedOnMap, appMode, null); + showFragmentInstance(fm, prefId, newValue, target, usedOnMap, appMode, null); } public static void showInstance(@NonNull FragmentManager fm, - @Nullable HashMap prefs, + @Nullable String prefId, + @Nullable Serializable newValue, Fragment target, boolean usedOnMap, @Nullable ApplicationMode appMode, @Nullable OnChangeSettingListener listener) { - showFragmentInstance(fm, null, null, prefs, target, usedOnMap, appMode, listener); + showFragmentInstance(fm, prefId, newValue, target, usedOnMap, appMode, listener); } private static void showFragmentInstance(@NonNull FragmentManager fm, @Nullable String prefId, @Nullable Serializable newValue, - @Nullable HashMap prefs, Fragment target, boolean usedOnMap, @Nullable ApplicationMode appMode, @@ -207,15 +178,8 @@ public class ChangeGeneralProfilesPrefBottomSheet extends BasePreferenceBottomSh try { if (fm.findFragmentByTag(ChangeGeneralProfilesPrefBottomSheet.TAG) == null) { Bundle args = new Bundle(); - if (prefId != null) { - args.putString(PREFERENCE_ID, prefId); - } - if (newValue != null) { - args.putSerializable(NEW_VALUE_KEY, newValue); - } - if (prefs != null) { - args.putSerializable(PREFS_MAP_KEY, prefs); - } + args.putString(PREFERENCE_ID, prefId); + args.putSerializable(NEW_VALUE_KEY, newValue); ChangeGeneralProfilesPrefBottomSheet fragment = new ChangeGeneralProfilesPrefBottomSheet(); fragment.setArguments(args); From 53fe6175c75cb897a9917724a800375e23dfef1e Mon Sep 17 00:00:00 2001 From: veliymolfar Date: Wed, 8 Apr 2020 16:35:43 +0300 Subject: [PATCH 101/202] fix NPE --- OsmAnd/src/net/osmand/plus/SettingsHelper.java | 1 + 1 file changed, 1 insertion(+) diff --git a/OsmAnd/src/net/osmand/plus/SettingsHelper.java b/OsmAnd/src/net/osmand/plus/SettingsHelper.java index 3a5da6894c..83985d20f2 100644 --- a/OsmAnd/src/net/osmand/plus/SettingsHelper.java +++ b/OsmAnd/src/net/osmand/plus/SettingsHelper.java @@ -147,6 +147,7 @@ public class SettingsHelper { SettingsItem(OsmandApplication app) { this.app = app; + warnings = new ArrayList<>(); init(); } From b8c776b8852923fe515dd7780b0faa90705b26aa Mon Sep 17 00:00:00 2001 From: veliymolfar Date: Wed, 8 Apr 2020 16:57:47 +0300 Subject: [PATCH 102/202] ui fixes --- OsmAnd/res/layout/fragment_import.xml | 4 ++-- OsmAnd/res/layout/fragment_import_complete.xml | 4 ++-- OsmAnd/res/layout/fragment_import_duplicates.xml | 4 ++-- OsmAnd/res/layout/list_item_import.xml | 7 ++++++- OsmAnd/res/layout/profile_data_list_item_child.xml | 7 ++++++- OsmAnd/res/layout/profile_data_list_item_group.xml | 7 ++++++- .../osmand/plus/settings/DuplicatesSettingsAdapter.java | 2 +- 7 files changed, 25 insertions(+), 10 deletions(-) diff --git a/OsmAnd/res/layout/fragment_import.xml b/OsmAnd/res/layout/fragment_import.xml index ffc6165836..31237e535e 100644 --- a/OsmAnd/res/layout/fragment_import.xml +++ b/OsmAnd/res/layout/fragment_import.xml @@ -4,7 +4,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="?attr/activity_background_basic"> + android:background="?attr/activity_background_color"> + android:background="?attr/activity_background_color"> + android:background="?attr/activity_background_color"> Date: Wed, 8 Apr 2020 10:18:20 +0000 Subject: [PATCH 103/202] Translated using Weblate (Catalan) Currently translated at 98.9% (3219 of 3254 strings) --- OsmAnd/res/values-ca/strings.xml | 66 ++++++++++++++++---------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/OsmAnd/res/values-ca/strings.xml b/OsmAnd/res/values-ca/strings.xml index c67ded97ad..64910bf717 100644 --- a/OsmAnd/res/values-ca/strings.xml +++ b/OsmAnd/res/values-ca/strings.xml @@ -829,7 +829,7 @@ Serveis d\'enregistrament Enregistra un vídeo Enregistra un so - Seleccioneu el format de sortida de vídeo. + Format de sortida de vídeo: Configureu les preferències de so i vídeo. Configuració d\'àudio/vídeo L\'enregistrament ha fallat @@ -838,8 +838,8 @@ Reprodueix Notes d\'àudio Connector del Dropbox - El connector de Dropbox us permet sincronitzar traces i notes d\'àudio i vídeo amb el vostre compte de Dropbox. - Seleccioneu l\'acció per defecte del giny. + Sincronitzeu traces i notes d\'àudio i vídeo amb el vostre compte de Dropbox. + Acció per defecte del giny: Acció per defecte del giny Obre un reproductor extern Enregistra una nota d\'àudio @@ -862,7 +862,7 @@ Enregistrament Enregistrament %1$s %3$s %2$s Capa d\'enregistraments - No es pot reproduir l\'enregistrament + No s\'ha pogut reproduir l\'enregistrament. Atura Considereu comprar el connector de corbes de nivell per recolzar el seu desenvolupament futur. Connector de corbes de nivell @@ -938,7 +938,7 @@ Lateral (8 sectors) Sentit horari (12 sectors) No es pot accedir a la carpeta d\'emmagatzematge de la targeta de memòria! - Seleccioneu primer un municipi o carrer + Estableix primer un municipi o carrer Cerca un carrer en els municipis propers Ordenació porta a porta Suprimeix el punt @@ -972,10 +972,10 @@ Nom de carrer Número Enregistrament del trajecte - Seleccioneu l\'aspecte de l\'aplicació. + Personalitzeu l\'aspecte de l\'aplicació. Aspecte gràfic Opcions d\'accessibilitat - Seleccioneu l\'adreça + Indiqueu l\'adreça Seleccioneu el Preferit Modificacions de l\'OSM Altres accions @@ -1007,7 +1007,7 @@ \n * Premeu contínuament al mapa per suprimir el punt anterior. \n * Premeu contínuament un punt per veure\'n i afegir-hi una descripció. \n * Premeu el giny de mesura per veure més accions. - Selecciona sota demanda + Sota demanda\? Proveïdor de la ubicació S\'estan convertint els noms nadius/anglesos … Indiqueu l\'interval d\'enregistrament de traces a desar durant la navegació @@ -1018,7 +1018,7 @@ No s\'ha trobat el node, o la instal·lació consta de diferents nodes, i això encara no s\'admet. S\'ha produït un error d\'E/S durant l\'acció {0}. Anuncia… - Configureu la notificació dels noms de carrer, incidències de trànsit (cues, bandes sonores), avisos de radar, límits de velocitat. + Configureu la notificació dels noms de carrer, incidències de trànsit (cues, bandes sonores), avisos de radar i límits de velocitat. Noms de carrers (TTS) Límit de velocitat Radars @@ -1034,7 +1034,7 @@ Via: Des de: Destinació %1$s - No s\'han pogut desar els canvis d\'OSM + No s\'han pogut desar els canvis d\'OSM. Desa com un canvi OSM OpenMaps.eu Reprodueix el so en fer una foto @@ -1043,14 +1043,14 @@ No s\'ha pogut afegir el comentari. Contrasenya de l\'OSM (opcional) Balisa marina - Seleccioneu els perfils per donar visibilitat en l\'aplicació. + Seleccioneu els perfils a mostrar. Perfils de l\'aplicació Renderitzat del mapa Senderisme Moto Vaixell Avió - Ara suprimireu %1$d canvis de l\'OSM. N\'esteu segur? + Esteu segurs que voleu esborrar %1$d canvis de l\'OSM\? Suprimeix-ho tot Calculeu primer la ruta Simulació amb la ruta calculada @@ -1094,7 +1094,7 @@ Desactiva el càlcul de ruta en dues fases per navegació amb cotxe. Desactiva el càlcul complex de la ruta El proveïdor de tessel·les %1$s estava desat - Tria existent… + Selecciona existent… Info depuració FPS Ordre optimitzat de les fites de la ruta fins a la destinació. Creació d\'itineraris prement el mapa o utilitzant o modificant fitxers GPX existents, per planificar un trajecte i mesurar la distància entre punts. El resultat es pot desar com un fitxer GPX que podreu usar més endavant com una referència. @@ -2480,7 +2480,7 @@ Abasta l\'àrea: %1$s x %2$s Especifiqueu una memòria intermèdia temporal per desar les ubicacions a enviar mentre no hi ha connexió Consulteu el mapa i afegiu punts Mesurament de distàncies - Necessiteu estar connectat a internet per veure les fotografies de Mapillary. + Les fotografies de Mapillary només són disponibles en línia. Torneu a provar Afegiu un punt si més no. Nom del fitxer GPX: @@ -2663,7 +2663,7 @@ Abasta l\'àrea: %1$s x %2$s Hivern i esquí Vista turística Nàutica - Còpia Punt/PDI nom + Copia nom d\'ubicació/PDI Ubicació sense nom Mostra notes amagades Mostra/amaga notes OSM en el mapa. @@ -2784,8 +2784,8 @@ Abasta l\'àrea: %1$s x %2$s Baixa-ho tot Amaga la descripció completa Mostra la descripció completa - Estil nàutic. Principals característiques: boies, fars, rutes fluvials, rutes i referències marítimes, ports, serveis de navegació assistida, isòbates. - Estil per l\'esquí. Principals característiques: representació de pistes, remuntadors i altres característiques d\'esquí de forma adient. Menys objectes secundaris del mapa que distreguin. + "Per a navegació nàutica. Compta amb boies, fars, rutes fluvials, rutes i referències marítimes, ports, serveis de navegació assistida i isòbates." + Per a esquiar. Compta amb pistes, remuntadors, rutes d\'esquí de fons, etc. Atenúa objectes de mapes secundaris. "Estil senzill i contrastat per navegació amb el cotxe. En mode nocturn té cura de la vista. Principals característiques: corbes de nivell, vies contrastades d\'estil ataronjat, menys objectes secundaris al mapa que puguin distreure." Buscant el corresponent article a la wiki Adreça d\'interès @@ -3135,7 +3135,7 @@ Abasta l\'àrea: %1$s x %2$s Geocodificació Canvieu el zoom del mapa girant la roda amunt i avall. La tecla Esc us retornarà a l\'aplicació WunderLINQ. Utilitzeu WunderLINQ per al control - Heu d\'afegir com a mínim un element a la llista a la configuració de l\'acció ràpida + Afegir com a mínim un element a la llista a la configuració de l\'acció ràpida Pistes per esquí alpí o eslàlom i accés als remuntadors. Trineu Pistes per utilitzar trineu. @@ -3199,7 +3199,7 @@ Abasta l\'àrea: %1$s x %2$s Dispositius d\'entrada externs Seleccioneu un aparell com a teclat genèric o WunderLINQ per a controls externs. Cap - Teclat genèric + Teclat WunderLINQ Parrot Esquí de ruta @@ -3268,16 +3268,16 @@ Abasta l\'àrea: %1$s x %2$s Voleu canviar la carpeta de dades de OsmAnd\? Desplaça a la nova destinació Evita determinades rutes i tipus de carretera - Emmagatzematge intern, amagat a l\'usuari i a les altres aplicacions i que només OsmAnd hi pot accedir + Emmagatzematge intern per a OsmAnd, (amagat a l\'usuari i a les altres aplicacions). Canvia la carpeta d\'emmagatzematge Pista de terra Trineu Costat a costat - • S\'ha actualitzat la configuració de l\'aplicació i dels perfils: La configuració s\'agrupa per tipus. Cada perfil es pot ajustar independentment. + • S\'ha actualitzat la configuració de l\'aplicació i dels perfils: La configuració s\'agrupa per tipus. Cada perfil es pot ajustar independentment. \n \n • Diàleg nou de baixades de mapa que suggereix un mapa per baixar-lo mentre es navega \n -\n • Correccions al tema nocturn +\n • Correccions al tema fosc \n \n • Corregits problemes de ruta a tot el món \n @@ -3325,20 +3325,20 @@ Abasta l\'àrea: %1$s x %2$s %1$s MB utilitzats %1$s kB utilitzats Corbes de nivell i ombrejat de relleu - Millor les carreteres sense asfaltar - Millor les carreteres sense asfaltar. + Prefereix carreteres sense asfaltar + Prefereix carreteres sense asfaltar. Actualitza tots els mapes Esteu segur que voleu actualitzar tots els mapes (%1$d)\? - Podeu aplicar aquest canvi a tots els perfils o només al que ara tingueu seleccionat. + Podeu aplicar aquest canvi a tots els perfils o només al que tingueu seleccionat. Compartit - Millor les carreteres sense asfaltar - Millor les carreteres sense asfaltar. + Prefereix carreteres sense asfaltar + Prefereix carreteres sense asfaltar a les asfaltades al generar rutes. Edicions a OSM - Un botó per a mostrar o amagar les corbes de nivell en el mapa. + 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 - Un botó per a mostrar o amagar l\'ombrejat de relleu al mapa. + 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 @@ -3423,13 +3423,13 @@ Abasta l\'àrea: %1$s x %2$s Simula la vostra posició fent servir una traça GPX enregistrada. Gruix Icona de posició en moviment - Seleccioneu la icona del mapa - Si toqueu Aplica, els perfils suprimits es perdran definitivament. + Icona de posició en repòs + Al prémer \'Aplica\', s\'esborraran definitivament els perfils suprimits. Perfil principal Seleccioneu el color - No podeu suprimir els perfils predeterminats de l\'OsmAnd, però podeu desactivar-los en la pantalla anterior, o moure\'ls a la part inferior. + Els perfils predeterminats de l\'OsmAnd no no poden ser esborrats, però podeu desactivar-los (a la pantalla anterior), o ordenar-los cap a la part inferior. Edita els perfils - El tipus de navegació determina les regles de càlcul de les rutes. + El \'tipus de navegació\' determina com es calculen les rutes. Aparença del perfil Icona, color i nom Edita la llista de perfils From ad51f58356f1b4b4296207ffdd858f484d0da66d Mon Sep 17 00:00:00 2001 From: Hinagiku Zeppeki Date: Wed, 8 Apr 2020 09:49:15 +0000 Subject: [PATCH 104/202] Translated using Weblate (Japanese) Currently translated at 98.8% (3218 of 3254 strings) --- OsmAnd/res/values-ja/strings.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/OsmAnd/res/values-ja/strings.xml b/OsmAnd/res/values-ja/strings.xml index 0e5004d0ef..698768bf94 100644 --- a/OsmAnd/res/values-ja/strings.xml +++ b/OsmAnd/res/values-ja/strings.xml @@ -2839,7 +2839,7 @@ POIの更新は利用できません 記事をオンラインで開く ウェブブラウザで記事を閲覧します。 当該地域 - マップマーカー「%s」を削除しますか? + マップマーカー\'%s\'を削除しますか? マップマーカーの編集 サードパーティーアプリ 道路検索エリア @@ -2971,7 +2971,7 @@ POIの更新は利用できません ナビゲーション時に使用したくない公共交通機関を指定します: %sモード 避けたい移動手段の種類… - 『%s』タグの長さは255文字未満にしてください。 + \"%s\"タグの長さは255文字未満にしてください。 \"%s\"値の長さ OsmAndのルーティング詳細については、公式ブログをご参照ください。 公共交通機関のナビゲーションは現在ベータテスト中で、エラーや不正確さを含む恐れがあります。 @@ -3066,7 +3066,7 @@ POIの更新は利用できません やや軟らか 軟らかい 表面硬度 - %s は保存されました + %sを保存しました キャンパー キャンピングカー マップ上に低排出ゾーン(CO2排出量の多い車両に課税するエリア)を表示します。ルーティングには影響しません。 @@ -3126,7 +3126,7 @@ POIの更新は利用できません 変更の保存 一旦プロファイルへ変更を保存する必要があります プロファイルの削除 - プロファイル 『%s』 を削除してよろしいですか? + プロファイル \"%s\"を削除してよろしいですか? 開始時に表示するプロファイルの選択 カスタムプロファイルは標準のアプリケーションプロファイルを元に作成します。ウィジェットなどの表示設定や速度と距離の単位などの標準設定をプロファイルごとに定義可能です。これらは標準のアプリプロファイルを基本としており、今後それらと共に拡張される可能性があります: ナビゲーションタイプの選択 @@ -3182,7 +3182,7 @@ POIの更新は利用できません グレード4 グレード5 経路を開く - 経路%sは保存されました + 経路%sを保存しました 一時的な制限の検討 『クイックアクション』のリストに最低ひとつは項目を設定する必要があります アルペン/ダウンヒルスキー @@ -3405,7 +3405,7 @@ POIの更新は利用できません 見出しを含める 記録中の各トラックポイントに見出しも保存します。 パーソナル - をダウンロード中 + %sをダウンロード中 濃い 砂漠などの過疎地に向いたマップスタイルです。各情報の詳細も表示されます。 %1$s • %2$s From 8c2fc5a75a5f10a65390a0d29d3f734ee64d0e8f Mon Sep 17 00:00:00 2001 From: Ldm Public Date: Wed, 8 Apr 2020 13:00:16 +0000 Subject: [PATCH 105/202] Translated using Weblate (French) Currently translated at 100.0% (3254 of 3254 strings) --- OsmAnd/res/values-fr/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OsmAnd/res/values-fr/strings.xml b/OsmAnd/res/values-fr/strings.xml index 4d13b2be39..4b5e7cbfb3 100644 --- a/OsmAnd/res/values-fr/strings.xml +++ b/OsmAnd/res/values-fr/strings.xml @@ -3172,7 +3172,7 @@ représentant la zone : %1$s x %2$s Basez votre profil personnel sur l\'un des profils par défaut pour définir les unités de vitesse, de distance ou la visibilité des widgets. Voici les profils par défaut de l\'application ainsi que des exemples de profils personnalisés : Prendre en compte les limitations temporaires Par défaut - Relier les trous + Fusionner pour éviter les interruptions Campeur Camping-car Afficher les zones à faible émission sur la carte (n\'influe pas sur le calcul d\'itinéraire). @@ -3348,7 +3348,7 @@ représentant la zone : %1$s x %2$s Impossible d\'exporter le profil. Importer le profil Ajouter un profil en ouvrant son fichier avec OsmAnd. - %1$s Erreur d\'importation : %2$s + Erreur d\'import %1$s : %2$s %1$s importé avec succès. Blanc Inverser %1$s et %2$s From f3f8b8249a033c7e308dbd9e0cfc4fc3188c8250 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?O=C4=9Fuz=20Ersen?= Date: Wed, 8 Apr 2020 10:52:02 +0000 Subject: [PATCH 106/202] Translated using Weblate (Turkish) Currently translated at 100.0% (3254 of 3254 strings) --- OsmAnd/res/values-tr/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/res/values-tr/strings.xml b/OsmAnd/res/values-tr/strings.xml index d6c3d6c192..c0b9044ed8 100644 --- a/OsmAnd/res/values-tr/strings.xml +++ b/OsmAnd/res/values-tr/strings.xml @@ -1106,7 +1106,7 @@ Yerlerim Sık Kullanılanlar Ses - Vidyo + Video Fotoğraf gün geride Haritaya dön From 8f9d51c3850562d33f680ddf0bb131cef65d5ff9 Mon Sep 17 00:00:00 2001 From: ce4 Date: Wed, 8 Apr 2020 08:04:45 +0000 Subject: [PATCH 107/202] Translated using Weblate (German) Currently translated at 100.0% (3798 of 3798 strings) --- OsmAnd/res/values-de/phrases.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/OsmAnd/res/values-de/phrases.xml b/OsmAnd/res/values-de/phrases.xml index 605afd91f5..ec59448dda 100644 --- a/OsmAnd/res/values-de/phrases.xml +++ b/OsmAnd/res/values-de/phrases.xml @@ -1101,11 +1101,11 @@ Kriegsdenkmal Statue Stein - Generator + Mineral-Aggregat Dolomit Gas Gold - Grafit + Graphit Mineralöl Erdöl Salz @@ -1346,7 +1346,7 @@ Holzfällen Sand Fallobst - Todwald + Totholz In Etage RTSA-Skala Einfach @@ -1611,7 +1611,7 @@ Wegmarkierung Auskunft Tastbares Modell - Tastbare Karte + Blindengrafik Einzelhandel In einem abgetrennten Raum Nur für Raucher @@ -3819,6 +3819,6 @@ Behinderung Trinkwassernachfüllung: ja Trinkwassernachfüllung: nein - Trinkwasser-Nachfüllnetzwerk + Trinkwasser-Nachfüllnetz Internetzugangsgebühr für Kunden \ No newline at end of file From 5e585311303abecaa8c3aa642499e67f78043a7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?O=C4=9Fuz=20Ersen?= Date: Wed, 8 Apr 2020 10:51:28 +0000 Subject: [PATCH 108/202] Translated using Weblate (Turkish) Currently translated at 60.7% (2309 of 3798 strings) --- OsmAnd/res/values-tr/phrases.xml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/OsmAnd/res/values-tr/phrases.xml b/OsmAnd/res/values-tr/phrases.xml index 5ea401d080..2153e5c0e4 100644 --- a/OsmAnd/res/values-tr/phrases.xml +++ b/OsmAnd/res/values-tr/phrases.xml @@ -2311,4 +2311,13 @@ Uygarlık: minos Uygarlık: tiahuanaco Dil okulu + Hayvanlara izin verilmez + Hayvanlara izin verilir + At + Köpek + Hayvan eğitimi + Video + SMS + Durum + Tür \ No newline at end of file From 03c3c9219cf4a15aa8c0a15537601ba5ad1011a7 Mon Sep 17 00:00:00 2001 From: ce4 Date: Wed, 8 Apr 2020 16:41:21 +0000 Subject: [PATCH 109/202] Translated using Weblate (German) Currently translated at 100.0% (3798 of 3798 strings) --- OsmAnd/res/values-de/phrases.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/OsmAnd/res/values-de/phrases.xml b/OsmAnd/res/values-de/phrases.xml index ec59448dda..cae3175e10 100644 --- a/OsmAnd/res/values-de/phrases.xml +++ b/OsmAnd/res/values-de/phrases.xml @@ -1167,7 +1167,7 @@ Kostüme Traditionell Anzüge - Übergröße + Übergrößen Schule Bademode Socken @@ -2038,7 +2038,7 @@ Art: Bauholz Art: Raffinerie Art: Warenhaus - Art: KFZ Schrotthändler + Art: KFZ-Schrotthändler Art: Landwirtschaft Art: Brauerei Art: Ziegelei @@ -2087,7 +2087,7 @@ Anbauprodukt: Erdbeere Anbauprodukt: Gemüse, Blumen Anbauprodukt: Maniok - Anbauprodukt: Preiselbeere + Anbauprodukt: Moosbeere Anbauprodukt: Spargel Anbauprodukt: Blumen Überwachung: innen @@ -2237,7 +2237,7 @@ Art: Steinkreuz Hüttenkreis Felsbild - Grabtyp: prähistorische Turmbauten + Grabtyp: Nuraghe Grabtyp: Steinkreis Grabtyp: Ganggrab Gipfelkreuz: ja @@ -2918,7 +2918,7 @@ Bubble Tea Fleisch Flügel - Waffel + Waffeln Schokolade Wein Medizinisches Fachgebiet From bc1d385fef235669cd528b6717f97ade6a0b166f Mon Sep 17 00:00:00 2001 From: Dima-1 Date: Thu, 9 Apr 2020 10:04:57 +0300 Subject: [PATCH 110/202] Fix #8693 Profile appearance: Strange scroll appear after select different icon/color. Hide keyboard on scroll --- .../settings/ProfileAppearanceFragment.java | 44 +++++++++++++++++-- 1 file changed, 40 insertions(+), 4 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/settings/ProfileAppearanceFragment.java b/OsmAnd/src/net/osmand/plus/settings/ProfileAppearanceFragment.java index b872ca8148..8af4450a62 100644 --- a/OsmAnd/src/net/osmand/plus/settings/ProfileAppearanceFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/ProfileAppearanceFragment.java @@ -33,6 +33,7 @@ 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; @@ -261,6 +262,15 @@ public class ProfileAppearanceFragment extends BaseSettingsFragment { } } }); + getListView().addOnScrollListener(new RecyclerView.OnScrollListener() { + @Override + public void onScrollStateChanged(@NonNull RecyclerView recyclerView, int newState) { + super.onScrollStateChanged(recyclerView, newState); + if (newState != RecyclerView.SCROLL_STATE_IDLE) { + hideKeyboard(); + } + } + }); } return view; } @@ -402,7 +412,7 @@ public class ProfileAppearanceFragment extends BaseSettingsFragment { View iconItem = createIconItemView(iconRes, iconItems); iconItems.addView(iconItem, new FlowLayout.LayoutParams(0, 0)); } - setIconNewColor(changedProfile.iconRes); + setIconColor(changedProfile.iconRes); } else if (LOCATION_ICON_ITEMS.equals(preference.getKey())) { locationIconItems = (FlowLayout) holder.findViewById(R.id.color_items); locationIconItems.removeAllViews(); @@ -452,9 +462,11 @@ public class ProfileAppearanceFragment extends BaseSettingsFragment { public void onClick(View v) { if (colorRes != changedProfile.color) { updateColorSelector(colorRes); + setVerticalScrollBarEnabled(false); updatePreference(findPreference(MASTER_PROFILE)); updatePreference(findPreference(LOCATION_ICON_ITEMS)); updatePreference(findPreference(NAV_ICON_ITEMS)); + setVerticalScrollBarEnabled(true); } } }); @@ -482,7 +494,7 @@ public class ProfileAppearanceFragment extends BaseSettingsFragment { colorItem.findViewById(R.id.checkMark).setVisibility(View.VISIBLE); changedProfile.color = color; if (iconItems != null) { - setIconNewColor(changedProfile.iconRes); + updateIconColor(changedProfile.iconRes); } updateProfileNameAppearance(); updateProfileButton(); @@ -521,7 +533,7 @@ public class ProfileAppearanceFragment extends BaseSettingsFragment { } private void updateIconSelector(int iconRes) { - setIconNewColor(iconRes); + updateIconColor(iconRes); View iconItem = iconItems.findViewWithTag(changedProfile.iconRes); iconItem.findViewById(R.id.outline).setVisibility(View.GONE); ImageView checkMark = iconItem.findViewById(R.id.checkMark); @@ -552,7 +564,9 @@ public class ProfileAppearanceFragment extends BaseSettingsFragment { @Override public void onClick(View v) { if (locationIcon != changedProfile.locationIcon) { + setVerticalScrollBarEnabled(false); updateLocationIconSelector(locationIcon); + setVerticalScrollBarEnabled(true); } } }); @@ -596,7 +610,9 @@ public class ProfileAppearanceFragment extends BaseSettingsFragment { @Override public void onClick(View v) { if (navigationIcon != changedProfile.navigationIcon) { + setVerticalScrollBarEnabled(false); updateNavigationIconSelector(navigationIcon); + setVerticalScrollBarEnabled(true); } } }); @@ -621,7 +637,13 @@ public class ProfileAppearanceFragment extends BaseSettingsFragment { changedProfile.navigationIcon = navigationIcon; } - private void setIconNewColor(int iconRes) { + private void updateIconColor(int iconRes) { + setVerticalScrollBarEnabled(false); + setIconColor(iconRes); + setVerticalScrollBarEnabled(true); + } + + private void setIconColor(int iconRes) { int changedProfileColor = ContextCompat.getColor(app, changedProfile.color.getColor( app.getDaynightHelper().isNightModeForMapControls())); View iconItem = iconItems.findViewWithTag(iconRes); @@ -641,6 +663,20 @@ public class ProfileAppearanceFragment extends BaseSettingsFragment { } } + private void setVerticalScrollBarEnabled(boolean enabled) { + final RecyclerView preferenceListView = getListView(); + if (enabled) { + preferenceListView.post(new Runnable() { + @Override + public void run() { + preferenceListView.setVerticalScrollBarEnabled(true); + } + }); + } else { + preferenceListView.setVerticalScrollBarEnabled(false); + } + } + private void hideKeyboard() { Activity activity = getActivity(); if (activity != null) { From b7e7e1f58c047c0926ac2954f3e604c36f24b7c3 Mon Sep 17 00:00:00 2001 From: Hakuchi Date: Thu, 9 Apr 2020 01:16:29 +0000 Subject: [PATCH 111/202] Translated using Weblate (Japanese) Currently translated at 98.7% (3218 of 3260 strings) --- OsmAnd/res/values-ja/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/res/values-ja/strings.xml b/OsmAnd/res/values-ja/strings.xml index 698768bf94..c1e029a030 100644 --- a/OsmAnd/res/values-ja/strings.xml +++ b/OsmAnd/res/values-ja/strings.xml @@ -1305,7 +1305,7 @@ POIの更新は利用できません 遅め 最後の数メートル 手動のみ(矢印をタップ) - " string name=\"lat_lon_pattern\">\"緯度:%1$.5f 経度:%2$.5f\"</string " + Online OSMマップを画像で分類します。 経由地点をGPXファイルとして保存、またはお気に入りにインポートしますか? 共有 OsmAndを介してお気に入りを共有 From 5aff80cd98d548f1872d5de90e56110062237918 Mon Sep 17 00:00:00 2001 From: Ldm Public Date: Wed, 8 Apr 2020 20:09:17 +0000 Subject: [PATCH 112/202] Translated using Weblate (French) Currently translated at 100.0% (3260 of 3260 strings) --- OsmAnd/res/values-fr/strings.xml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/OsmAnd/res/values-fr/strings.xml b/OsmAnd/res/values-fr/strings.xml index 4b5e7cbfb3..788730f7c1 100644 --- a/OsmAnd/res/values-fr/strings.xml +++ b/OsmAnd/res/values-fr/strings.xml @@ -3586,4 +3586,11 @@ représentant la zone : %1$s x %2$s Impossible de lire %1$s. Impossible d\'écrire %1$s. Impossible d\'importer %1$s. + Sélectionnez les langues dans lesquelles les articles Wikipédia apparaîtront sur la carte. Certains articles Wikipédia peuvent ne pas être disponibles dans certaines langues. +\nVous pourrez basculer entre toutes les langues disponibles pendant la lecture de l’article. + Sélectionnez le fichier de trace + Langues + Langue + Toutes les langues + D’autres cartes sont nécessaires pour afficher les POI Wikipédia sur la carte. \ No newline at end of file From e17e0b9fa1fe44075dc997c5ac551bef69499cbc Mon Sep 17 00:00:00 2001 From: Predatorix Phoenix Date: Wed, 8 Apr 2020 17:35:53 +0000 Subject: [PATCH 113/202] Translated using Weblate (German) Currently translated at 100.0% (3260 of 3260 strings) --- OsmAnd/res/values-de/strings.xml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/OsmAnd/res/values-de/strings.xml b/OsmAnd/res/values-de/strings.xml index 89b397f101..31898bf0e8 100644 --- a/OsmAnd/res/values-de/strings.xml +++ b/OsmAnd/res/values-de/strings.xml @@ -3621,4 +3621,11 @@ Lon %2$s Konnte %1$s nicht lesen. Konnte %1$s nicht schreiben. Konnte %1$s nicht importieren. + Wählen Sie eine Pfad-Datei + Sprachen + Sprache + Alle Sprachen + Einige Wikipedia-Artikel könnten nicht in Ihrer Sprache verfügbar. Wählen Sie die Sprachen aus, in der Wikipedia-Artikel auf der Karte erscheinen sollen. +\nSie können beim Lesen des Artikels zwischen allen verfügbaren Sprachen wechseln. + Zusätzliche Karten werden benötigt um Wikipedia-POIs auf der Karte anzuzeigen. \ No newline at end of file From 430839a3dff2e6283d6391b96a62aeb54fcc09c6 Mon Sep 17 00:00:00 2001 From: solokot Date: Wed, 8 Apr 2020 17:05:12 +0000 Subject: [PATCH 114/202] Translated using Weblate (Russian) Currently translated at 100.0% (3260 of 3260 strings) --- OsmAnd/res/values-ru/strings.xml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/OsmAnd/res/values-ru/strings.xml b/OsmAnd/res/values-ru/strings.xml index 472c5413b5..ab4257697c 100644 --- a/OsmAnd/res/values-ru/strings.xml +++ b/OsmAnd/res/values-ru/strings.xml @@ -1582,7 +1582,7 @@ Плагин активирует функции для записи и сохранения ваших треков вручную нажатием на виджет записи GPX на карте, или также автоматически записывает все ваши маршруты навигации в файл GPX. \n \nЗаписанными треками можно поделиться с вашими друзьями или использовать их для вклада в OSM. Спортсмены могут использовать записанные треки для контроля за тренировками. Некоторый базовый анализ треков может быть выполнен непосредственно в OsmAnd, например, время прохождения круга, средняя скорость и т.д., треки, конечно, позднее также могут быть проанализированы в специальных инструментах анализа сторонних производителей. - string name=\"lat_lon_pattern\">Широта: %1$.5f Долгота: %2$.5f</string + Онлайн OSM классификация карт с изображениями. Всегда спрашивать Укажите интервал регистрации во время записи трека (включается через виджет записи GPX на карте). Общий интервал записи трека @@ -3607,4 +3607,11 @@ Невозможно прочитать %1$s. Невозможно записать %1$s. Невозможно импортировать %1$s. + Выберите файл трека + Некоторые статьи Википедии могут быть недоступны на вашем родном языке, выберите языки, на которых такие статьи будут отображаться на карте. +\nВы сможете переключаться между всеми доступными языками во время чтения статьи. + Языки + Язык + Все языки + Для просмотра POI Википедии на карте необходимы дополнительные карты. \ No newline at end of file From b9c69deb857b3270be0608a82f74f484dabf844b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?O=C4=9Fuz=20Ersen?= Date: Wed, 8 Apr 2020 16:55:26 +0000 Subject: [PATCH 115/202] Translated using Weblate (Turkish) Currently translated at 100.0% (3260 of 3260 strings) --- OsmAnd/res/values-tr/strings.xml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/OsmAnd/res/values-tr/strings.xml b/OsmAnd/res/values-tr/strings.xml index c0b9044ed8..6b443f41c0 100644 --- a/OsmAnd/res/values-tr/strings.xml +++ b/OsmAnd/res/values-tr/strings.xml @@ -3570,4 +3570,11 @@ %1$s okunamadı. %1$s yazılamadı. %1$s içe aktarılamadı. + İzlenen yol dosyasını seç + Diller + Dil + Tüm diller + Bazı Wikipedia makaleleri adınızda bulunmayabilir, Wikipedia makalelerinin haritada görüneceği dilleri seçin. +\nMakaleyi okurken mevcut tüm diller arasında geçiş yapabileceksiniz. + Wikipedia POI\'lerini haritada görüntülemek için ek haritalara ihtiyaç vardır. \ No newline at end of file From f1306a16bd5c251c90ba929a859b5d1a145bfc2d Mon Sep 17 00:00:00 2001 From: Hakuchi Date: Thu, 9 Apr 2020 01:21:18 +0000 Subject: [PATCH 116/202] Translated using Weblate (Ukrainian) Currently translated at 99.5% (3245 of 3260 strings) --- OsmAnd/res/values-uk/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/res/values-uk/strings.xml b/OsmAnd/res/values-uk/strings.xml index 1000fff242..e12259b579 100644 --- a/OsmAnd/res/values-uk/strings.xml +++ b/OsmAnd/res/values-uk/strings.xml @@ -1280,7 +1280,7 @@ Тільки вручну (натискати на стрілку) Повторювати навігаційні вказівки через регулярні проміжки часу. Повторювати навігаційні вказівки - string name=\"lat_lon_pattern\">Шир: %1$.5f Дов: %2$.5f</string + Online OSM класифікація карт із зображенням. Зберегти дані як GPX-файл чи імпортувати маршрутні точки в \'Закладки\'? Поділитися Закладки, якими поділились через OsmAnd From bdff9a606a1fdb8317d853df9431e73184fee3b0 Mon Sep 17 00:00:00 2001 From: jan madsen Date: Thu, 9 Apr 2020 06:31:44 +0000 Subject: [PATCH 117/202] Translated using Weblate (Danish) Currently translated at 89.8% (2930 of 3260 strings) --- OsmAnd/res/values-da/strings.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/OsmAnd/res/values-da/strings.xml b/OsmAnd/res/values-da/strings.xml index 4f2b3f28cb..d7741eaa84 100644 --- a/OsmAnd/res/values-da/strings.xml +++ b/OsmAnd/res/values-da/strings.xml @@ -3594,4 +3594,9 @@ Repræsenterer område: %1$s x %2$s Kunne ikke skrive til %1$s. Kunne ikke importere %1$s. Erstat et andet punkt med dette + Vælg sporfil + Sprog + Sprog + Alle sprog + Yderligere kort er nødvendige for at se Wikipedia Interessepunkter på kortet. \ No newline at end of file From b8d8c17693114a39606cd1ba1445ff2874596a36 Mon Sep 17 00:00:00 2001 From: Hakuchi Date: Thu, 9 Apr 2020 01:20:12 +0000 Subject: [PATCH 118/202] Translated using Weblate (Greek) Currently translated at 97.9% (3194 of 3260 strings) --- OsmAnd/res/values-el/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/res/values-el/strings.xml b/OsmAnd/res/values-el/strings.xml index 730d45266e..87004e9be8 100644 --- a/OsmAnd/res/values-el/strings.xml +++ b/OsmAnd/res/values-el/strings.xml @@ -2509,7 +2509,7 @@ Ευρώπη - Κάτω Χώρες Άλλα Εκδόθηκε - string name=\"lat_lon_pattern\">Γ. Πλ:%1$.5f Γ. Μηκ: %2$.5f</string + Online OSMκατηγοριοποίηση χάρτη με εικόνες. Αγαπημένα που μοιράστηκαν μέσω του OsmAnd Προσθήκη αγαπημένου διαγραφή From 6464d157036a58575e93b0a1a996098d7b47a7ef Mon Sep 17 00:00:00 2001 From: Yaron Shahrabani Date: Thu, 9 Apr 2020 04:37:23 +0000 Subject: [PATCH 119/202] Translated using Weblate (Hebrew) Currently translated at 99.4% (3243 of 3260 strings) --- OsmAnd/res/values-he/strings.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/OsmAnd/res/values-he/strings.xml b/OsmAnd/res/values-he/strings.xml index 3235a1d66f..4af0d6304a 100644 --- a/OsmAnd/res/values-he/strings.xml +++ b/OsmAnd/res/values-he/strings.xml @@ -3602,4 +3602,9 @@ זה מסנן שחותך מהירויות נמוכות כדי לא להקליט נקודות מתחת למהירות מסוימת. הפעלת המסנן תגרום לכך שהמסלולים ייראו חלקים יותר כשמסתכלים על המפה. טיולי סקי %1$s — %2$s — %3$s + בחירת קובץ מסלול + שפות + שפה + כל השפות + נדרשות מפות נוספות כדי להציג נקודות עניין של ויקיפדיה על המפה. \ No newline at end of file From 27db0928e8eee92069f0259f0b3ce9193ad2f3cc Mon Sep 17 00:00:00 2001 From: anonymous Date: Thu, 9 Apr 2020 01:18:09 +0000 Subject: [PATCH 120/202] =?UTF-8?q?Translated=20using=20Weblate=20(Norwegi?= =?UTF-8?q?an=20Bokm=C3=A5l)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently translated at 3.4% (113 of 3260 strings) --- OsmAnd/res/values-nb/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/res/values-nb/strings.xml b/OsmAnd/res/values-nb/strings.xml index 521e62848f..f9e29f9414 100644 --- a/OsmAnd/res/values-nb/strings.xml +++ b/OsmAnd/res/values-nb/strings.xml @@ -2474,7 +2474,7 @@ Aktiver tillegget \"Turopptak\" for å bruke posisjonloggingstjenester (GPX-logging, nettbasert sporing) Beregn mulig ikke-optimal rute over lange avstander Last ned (\'nettfrakoblede\') data for å kunne bruke kart nettfrakoblet. - string name=\"lat_lon_pattern\">Br: %1$.5f Le: %2$.5f</string + Online OSM – kartklassifisering med bilder. Hurtighandlingsnavn endret til %1$s for å unngå duplisering. Navneduplisering for hurtighandling OSM-mottakere From 3ad6d4fefdc77230eb7a04af74a281c37fe62a7e Mon Sep 17 00:00:00 2001 From: solokot Date: Wed, 8 Apr 2020 17:11:59 +0000 Subject: [PATCH 121/202] Translated using Weblate (Russian) Currently translated at 98.1% (3728 of 3798 strings) --- OsmAnd/res/values-ru/phrases.xml | 65 +++++++++++++++++++++++++++----- 1 file changed, 55 insertions(+), 10 deletions(-) diff --git a/OsmAnd/res/values-ru/phrases.xml b/OsmAnd/res/values-ru/phrases.xml index 3d0e90f46b..2aede8672a 100644 --- a/OsmAnd/res/values-ru/phrases.xml +++ b/OsmAnd/res/values-ru/phrases.xml @@ -653,8 +653,8 @@ Ориентир Маяк (навигационный ориентир) Причал - Уведомление - Радиостанция + Уведомление (навигационный ориентир) + Радиостанция (навигационный ориентир) Сигнальная станция Сигнал опасности Лодочная станция @@ -2815,8 +2815,8 @@ Е10 Е20 E85 - Бакен с маяком - Плавучий маяк + Бакен с маяком (навигационный ориентир) + Плавучий маяк (навигационный ориентир) Специи Товары для рукоделия Зарядка: есть @@ -3267,8 +3267,8 @@ Объединяющая Церковь в Австралии Реформистский иудаизм Водяной знак: насыпь - Радиолокационный транспондер (навигационный знак) - Топовая фигура (навигационный знак) + Радиолокационный транспондер (навигационный ориентир) + Топовая фигура (навигационный ориентир) Габаритная высота Габаритная ширина YouTube @@ -3511,7 +3511,7 @@ Взрывной залп: первая детонация залпового теста Метро Магазин каннабиса - Type 1 + Тип 1 CHAdeMO Tesla Supercharger Tesla Roadster @@ -3677,7 +3677,7 @@ Доступ для туристического автобуса: да Доступ для автобуса: нет Доступ для каравана: нет - Доступ для дома на колесах: нет + Доступ для автодома: нет Доступ для трейлера: нет Ледопад Скалолазание @@ -3687,8 +3687,53 @@ УКВ-канал Шаурма Сухой баррель - Высота просвета (открытая) - Высота просвета (закрытая) + Габаритная высота (открытая) + Габаритная высота (закрытая) Видео SMS + Пастель + Выделенный + Да + Выделенный + Да + Доставка + Выделенный + Выделенный + Да + Выделенный + Да + Выделенный + Выделенный + Выделенный + Да + Выделенный + Выделенный + Да + Выделенный + Выделенный + Доступ для инвалидов: нет + Доступ для сельскохозяйственных машин: нет + Доступ для сельскохозяйственных машин: да + Пейнтбол + Ледник, спускающийся в море + Выводной ледник + Местонахождение: в киоске + Вино: розничная торговля + Центр подводного плавания + Охотничья база + Номер ссылки на трассу + Боулинг-центр + Нет + Да + Нет + Да + Только если разрешена ходьба + Сеть заправки питьевой водой + Заправка питьевой водой: нет + Заправка питьевой водой: да + Тип 3 + Тип 2 комбинированный + Тип 2 + Тип 1 комбинированный + Доступ для автодомов \ No newline at end of file From 268b2987a3c19d9bf3ac9ecdabc7f5f98656977f Mon Sep 17 00:00:00 2001 From: Hakuchi Date: Wed, 8 Apr 2020 19:37:20 +0000 Subject: [PATCH 122/202] Translated using Weblate (German) Currently translated at 100.0% (3798 of 3798 strings) --- OsmAnd/res/values-de/phrases.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/res/values-de/phrases.xml b/OsmAnd/res/values-de/phrases.xml index cae3175e10..483b1fef0f 100644 --- a/OsmAnd/res/values-de/phrases.xml +++ b/OsmAnd/res/values-de/phrases.xml @@ -2038,7 +2038,7 @@ Art: Bauholz Art: Raffinerie Art: Warenhaus - Art: KFZ-Schrotthändler + Art: KFZ-Verschrottung Art: Landwirtschaft Art: Brauerei Art: Ziegelei From 4221a802441977aa49000089e68050e189be3aad Mon Sep 17 00:00:00 2001 From: Eduardo Addad de Oliveira Date: Wed, 8 Apr 2020 17:11:57 +0000 Subject: [PATCH 123/202] Translated using Weblate (Portuguese (Brazil)) Currently translated at 99.9% (3259 of 3260 strings) --- OsmAnd/res/values-pt-rBR/strings.xml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/OsmAnd/res/values-pt-rBR/strings.xml b/OsmAnd/res/values-pt-rBR/strings.xml index b018ccd3c0..e70a828b85 100644 --- a/OsmAnd/res/values-pt-rBR/strings.xml +++ b/OsmAnd/res/values-pt-rBR/strings.xml @@ -3602,4 +3602,11 @@ Pôr do Sol: %2$s Não foi possível ler %1$s. Não foi possível escrever %1$s. Não foi possível importar %1$s. + Selecionar arquivo de faixa + Idiomas + Idioma + Todos os idiomas + Alguns artigos da Wikipédia podem não estar disponíveis em seu nome. Selecione os idiomas nos quais os artigos da Wikipédia aparecerão no mapa. +\nVocê poderá alternar entre todos os idiomas disponíveis enquanto lê o artigo. + Mapas adicionais são necessários para visualizar os POIs da Wikipédia no mapa. \ No newline at end of file From 136f40797277d1b8a89dde14f45554aa2f1d5145 Mon Sep 17 00:00:00 2001 From: Jeff Huang Date: Thu, 9 Apr 2020 03:06:01 +0000 Subject: [PATCH 124/202] Translated using Weblate (Chinese (Traditional)) Currently translated at 100.0% (3260 of 3260 strings) --- OsmAnd/res/values-zh-rTW/strings.xml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/OsmAnd/res/values-zh-rTW/strings.xml b/OsmAnd/res/values-zh-rTW/strings.xml index d4543232a9..d2c05b53bd 100644 --- a/OsmAnd/res/values-zh-rTW/strings.xml +++ b/OsmAnd/res/values-zh-rTW/strings.xml @@ -3606,4 +3606,11 @@ 無法讀取 %1$s。 無法寫入 %1$s。 無法匯入 %1$s。 + 選取軌跡檔案 + 語言 + 語言 + 所有語言 + 某些維基百科的文章可能無法以您的名義提供,選取維基百科的文章要以什麼語言出現在地圖上。 +\n您將可以在閱讀文章時在所有可用的語言間切換。 + 需要其他地圖才能在地圖上檢視維基百科的 POI。 \ No newline at end of file From 0c7749d73d11698bd1aa6bb82c09e3a54604b032 Mon Sep 17 00:00:00 2001 From: Hakuchi Date: Thu, 9 Apr 2020 01:18:52 +0000 Subject: [PATCH 125/202] Translated using Weblate (Dutch) Currently translated at 96.5% (3149 of 3260 strings) --- OsmAnd/res/values-nl/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/res/values-nl/strings.xml b/OsmAnd/res/values-nl/strings.xml index c77a028671..8534b9b25a 100644 --- a/OsmAnd/res/values-nl/strings.xml +++ b/OsmAnd/res/values-nl/strings.xml @@ -248,7 +248,7 @@ Installeer meer… Minimum zoomniveau om vectorkaarten in plaats van (raster)kaartsegmenten te gebruiken. Min. vector zoomniveau - string name=\"lat_lon_pattern\">Lat: %1$.5f Lon: %2$.5f</string + Online OSM kaart classificatie met afbeeldingen. Fout bij offline zoeken. Zoek adres in de offline kaarten Systeem From 1dd6fc22f3d549ad5d72e7305f607c7edfde672f Mon Sep 17 00:00:00 2001 From: Dima-1 Date: Thu, 9 Apr 2020 14:11:31 +0300 Subject: [PATCH 126/202] Fix #8512 Bottom sheet dialogs should support multiline headings --- OsmAnd/res/layout/bottom_sheet_item_title.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/OsmAnd/res/layout/bottom_sheet_item_title.xml b/OsmAnd/res/layout/bottom_sheet_item_title.xml index d8ebd46514..1736b7148a 100644 --- a/OsmAnd/res/layout/bottom_sheet_item_title.xml +++ b/OsmAnd/res/layout/bottom_sheet_item_title.xml @@ -5,13 +5,15 @@ xmlns:tools="http://schemas.android.com/tools" android:id="@+id/title" android:layout_width="match_parent" - android:layout_height="@dimen/bottom_sheet_title_height" + android:layout_height="wrap_content" android:ellipsize="end" android:gravity="center_vertical" - android:maxLines="1" + android:maxLines="5" android:minHeight="@dimen/bottom_sheet_title_height" android:paddingLeft="@dimen/content_padding" android:paddingRight="@dimen/content_padding" + android:paddingTop="@dimen/content_padding_small" + android:paddingBottom="@dimen/content_padding_small" android:textAppearance="@style/TextAppearance.ListItemTitle" osmand:typeface="@string/font_roboto_medium" tools:text="Some Title" From 836e5ade200c06b7d45f99da6e1c702a122e9c8e Mon Sep 17 00:00:00 2001 From: veliymolfar Date: Thu, 9 Apr 2020 15:59:11 +0300 Subject: [PATCH 127/202] context actions customization --- .../res/layout/context_menu_action_item.xml | 9 +- .../res/layout/map_context_menu_fragment.xml | 131 +------------- .../plus/activities/MapActivityActions.java | 170 +++++++++--------- .../plus/mapcontextmenu/MapContextMenu.java | 48 +++-- .../MapContextMenuFragment.java | 168 +++++++++++------ .../settings/ConfigureMenuItemsFragment.java | 33 +++- .../settings/ConfigureMenuRootFragment.java | 10 +- .../settings/RearrangeMenuItemsAdapter.java | 21 ++- 8 files changed, 287 insertions(+), 303 deletions(-) diff --git a/OsmAnd/res/layout/context_menu_action_item.xml b/OsmAnd/res/layout/context_menu_action_item.xml index a2f3ea3b6d..25c18a1845 100644 --- a/OsmAnd/res/layout/context_menu_action_item.xml +++ b/OsmAnd/res/layout/context_menu_action_item.xml @@ -1,10 +1,9 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java index 26f929038a..597ce3984a 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java @@ -336,77 +336,11 @@ public class MapActivityActions implements DialogProvider { } - public void contextMenuPoint(final double latitude, final double longitude, final ContextMenuAdapter iadapter, Object selectedObj) { - final ContextMenuAdapter adapter = getContextMenuAdapter(iadapter, selectedObj); - final ArrayAdapter listAdapter = - adapter.createListAdapter(mapActivity, getMyApplication().getSettings().isLightContent()); - - AdditionalActionsBottomSheetDialogFragment actionsBottomSheetDialogFragment = new AdditionalActionsBottomSheetDialogFragment(); - actionsBottomSheetDialogFragment.setAdapter(adapter, new AdditionalActionsBottomSheetDialogFragment.ContextMenuItemClickListener() { - @Override - public void onItemClick(int position) { - ContextMenuItem item = adapter.getItem(position); - int standardId = item.getTitleId(); - ItemClickListener click = item.getItemClickListener(); - if (click != null) { - click.onContextMenuClick(listAdapter, standardId, position, false, null); - } else if (standardId == R.string.context_menu_item_search) { - mapActivity.showQuickSearch(latitude, longitude); - } else if (standardId == R.string.context_menu_item_directions_from) { - if (OsmAndLocationProvider.isLocationPermissionAvailable(mapActivity)) { - enterDirectionsFromPoint(latitude, longitude); - } else if (!ActivityCompat.shouldShowRequestPermissionRationale(mapActivity, Manifest.permission.ACCESS_FINE_LOCATION)) { - mapActivity.getMyApplication().showToastMessage(R.string.ask_for_location_permission); - } else { - ActivityCompat.requestPermissions(mapActivity, new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, REQUEST_LOCATION_FOR_DIRECTIONS_NAVIGATION_PERMISSION); - } - } else if (standardId == R.string.measurement_tool) { - mapActivity.getContextMenu().close(); - MeasurementToolFragment.showInstance(mapActivity.getSupportFragmentManager(), new LatLon(latitude, longitude)); - } else if (standardId == R.string.avoid_road) { - getMyApplication().getAvoidSpecificRoads().addImpassableRoad(mapActivity, new LatLon(latitude, longitude), true, false, null); - } - } - }); - actionsBottomSheetDialogFragment.show(mapActivity.getSupportFragmentManager(), AdditionalActionsBottomSheetDialogFragment.TAG); - } - - public void showActionsBottomSheet(final double latitude, final double longitude, final ContextMenuAdapter adapter) { - final ArrayAdapter listAdapter = - adapter.createListAdapter(mapActivity, getMyApplication().getSettings().isLightContent()); - - AdditionalActionsBottomSheetDialogFragment actionsBottomSheetDialogFragment = new AdditionalActionsBottomSheetDialogFragment(); - actionsBottomSheetDialogFragment.setAdapter(adapter, new AdditionalActionsBottomSheetDialogFragment.ContextMenuItemClickListener() { - @Override - public void onItemClick(int position) { - ContextMenuItem item = adapter.getItem(position); - int standardId = item.getTitleId(); - ItemClickListener click = item.getItemClickListener(); - if (click != null) { - click.onContextMenuClick(listAdapter, standardId, position, false, null); - } else if (standardId == R.string.context_menu_item_search) { - mapActivity.showQuickSearch(latitude, longitude); - } else if (standardId == R.string.context_menu_item_directions_from) { - if (OsmAndLocationProvider.isLocationPermissionAvailable(mapActivity)) { - enterDirectionsFromPoint(latitude, longitude); - } else if (!ActivityCompat.shouldShowRequestPermissionRationale(mapActivity, Manifest.permission.ACCESS_FINE_LOCATION)) { - mapActivity.getMyApplication().showToastMessage(R.string.ask_for_location_permission); - } else { - ActivityCompat.requestPermissions(mapActivity, new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, REQUEST_LOCATION_FOR_DIRECTIONS_NAVIGATION_PERMISSION); - } - } else if (standardId == R.string.measurement_tool) { - mapActivity.getContextMenu().close(); - MeasurementToolFragment.showInstance(mapActivity.getSupportFragmentManager(), new LatLon(latitude, longitude)); - } else if (standardId == R.string.avoid_road) { - getMyApplication().getAvoidSpecificRoads().addImpassableRoad(mapActivity, new LatLon(latitude, longitude), true, false, null); - } - } - }); - actionsBottomSheetDialogFragment.show(mapActivity.getSupportFragmentManager(), AdditionalActionsBottomSheetDialogFragment.TAG); - } - - public ContextMenuAdapter getContextMenuAdapter(final ContextMenuAdapter iadapter, Object selectedObj) { - ContextMenuAdapter adapter = iadapter == null ? new ContextMenuAdapter() : iadapter; + public void addActionsToAdapter(final double latitude, + final double longitude, + final ContextMenuAdapter adapter, + Object selectedObj, + boolean all) { ItemBuilder itemBuilder = new ItemBuilder(); adapter.addItem(itemBuilder @@ -433,6 +367,7 @@ public class MapActivityActions implements DialogProvider { .setIcon(R.drawable.map_overflow_menu_white) .setOrder(3) .createItem()); + adapter.addItem(itemBuilder .setTitleId(R.string.context_menu_item_directions_from, mapActivity) .setId(MAP_CONTEXT_MENU_DIRECTIONS_FROM_ID) @@ -446,9 +381,7 @@ public class MapActivityActions implements DialogProvider { .setOrder(SEARCH_NEAR_ITEM_ORDER) .createItem()); -// if (register){ -// OsmandPlugin.registerMapContextMenu(mapActivity, latitude, longitude, adapter, selectedObj); -// } + OsmandPlugin.registerMapContextMenu(mapActivity, latitude, longitude, adapter, selectedObj); ItemClickListener listener = new ItemClickListener() { @Override @@ -462,22 +395,28 @@ public class MapActivityActions implements DialogProvider { } }; - if (selectedObj instanceof WptPt + ContextMenuItem editGpxItem = new ItemBuilder() + .setTitleId(R.string.context_menu_item_edit_waypoint, mapActivity) + .setId(MAP_CONTEXT_MENU_EDIT_GPX_WP) + .setIcon(R.drawable.ic_action_edit_dark) + .setOrder(EDIT_GPX_WAYPOINT_ITEM_ORDER) + .setListener(listener).createItem(); + ContextMenuItem addGpxItem = new ItemBuilder() + .setTitleId(R.string.context_menu_item_add_waypoint, mapActivity) + .setId(MAP_CONTEXT_MENU_ADD_GPX_WAYPOINT) + .setIcon(R.drawable.ic_action_gnew_label_dark) + .setOrder(ADD_GPX_WAYPOINT_ITEM_ORDER) + .setListener(listener).createItem(); + + if (all) { + adapter.addItem(editGpxItem); + adapter.addItem(addGpxItem); + } else if (selectedObj instanceof WptPt && getMyApplication().getSelectedGpxHelper().getSelectedGPXFile((WptPt) selectedObj) != null) { - adapter.addItem(new ItemBuilder() - .setTitleId(R.string.context_menu_item_edit_waypoint, mapActivity) - .setId(MAP_CONTEXT_MENU_EDIT_GPX_WP) - .setIcon(R.drawable.ic_action_edit_dark) - .setOrder(EDIT_GPX_WAYPOINT_ITEM_ORDER) - .setListener(listener).createItem()); + adapter.addItem(editGpxItem); } else if (!getMyApplication().getSelectedGpxHelper().getSelectedGPXFiles().isEmpty() || (OsmandPlugin.getEnabledPlugin(OsmandMonitoringPlugin.class) != null)) { - adapter.addItem(new ItemBuilder() - .setTitleId(R.string.context_menu_item_add_waypoint, mapActivity) - .setId(MAP_CONTEXT_MENU_ADD_GPX_WAYPOINT) - .setIcon(R.drawable.ic_action_gnew_label_dark) - .setOrder(ADD_GPX_WAYPOINT_ITEM_ORDER) - .setListener(listener).createItem()); + adapter.addItem(addGpxItem); } adapter.addItem(itemBuilder @@ -495,7 +434,62 @@ public class MapActivityActions implements DialogProvider { .createItem()); adapter.sortItemsByOrder(); - return adapter; + + + } + + public void contextMenuPoint(final double latitude, final double longitude, final ContextMenuAdapter iadapter, Object selectedObj) { + final ContextMenuAdapter adapter = iadapter == null ? new ContextMenuAdapter() : iadapter; + addActionsToAdapter(latitude, longitude, adapter, selectedObj, false); + + + AdditionalActionsBottomSheetDialogFragment actionsBottomSheetDialogFragment = new AdditionalActionsBottomSheetDialogFragment(); + actionsBottomSheetDialogFragment.setAdapter(adapter, getListener(latitude, longitude, adapter)); + actionsBottomSheetDialogFragment.show(mapActivity.getSupportFragmentManager(), AdditionalActionsBottomSheetDialogFragment.TAG); + } + + public void showAdditionalActionsFragment(final ContextMenuAdapter adapter, AdditionalActionsBottomSheetDialogFragment.ContextMenuItemClickListener listener) { + AdditionalActionsBottomSheetDialogFragment actionsBottomSheetDialogFragment = new AdditionalActionsBottomSheetDialogFragment(); + actionsBottomSheetDialogFragment.setAdapter(adapter, listener); + actionsBottomSheetDialogFragment.show(mapActivity.getSupportFragmentManager(), AdditionalActionsBottomSheetDialogFragment.TAG); + } + + public AdditionalActionsBottomSheetDialogFragment.ContextMenuItemClickListener getListener(final double latitude, final double longitude, final ContextMenuAdapter adapter) { + final ArrayAdapter listAdapter = + adapter.createListAdapter(mapActivity, getMyApplication().getSettings().isLightContent()); + + return new AdditionalActionsBottomSheetDialogFragment.ContextMenuItemClickListener() { + @Override + public void onItemClick(int position) { + ContextMenuItem item = adapter.getItem(position); + int standardId = item.getTitleId(); + ItemClickListener click = item.getItemClickListener(); + if (click != null) { + click.onContextMenuClick(listAdapter, standardId, position, false, null); + } else if (standardId == R.string.context_menu_item_search) { + mapActivity.showQuickSearch(latitude, longitude); + } else if (standardId == R.string.context_menu_item_directions_from) { + if (OsmAndLocationProvider.isLocationPermissionAvailable(mapActivity)) { + enterDirectionsFromPoint(latitude, longitude); + } else if (!ActivityCompat.shouldShowRequestPermissionRationale(mapActivity, Manifest.permission.ACCESS_FINE_LOCATION)) { + mapActivity.getMyApplication().showToastMessage(R.string.ask_for_location_permission); + } else { + ActivityCompat.requestPermissions(mapActivity, new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, REQUEST_LOCATION_FOR_DIRECTIONS_NAVIGATION_PERMISSION); + } + } else if (standardId == R.string.measurement_tool) { + mapActivity.getContextMenu().close(); + MeasurementToolFragment.showInstance(mapActivity.getSupportFragmentManager(), new LatLon(latitude, longitude)); + } else if (standardId == R.string.avoid_road) { + getMyApplication().getAvoidSpecificRoads().addImpassableRoad(mapActivity, new LatLon(latitude, longitude), true, false, null); + } else if (standardId == R.string.shared_string_add) { + mapActivity.getContextMenu().buttonFavoritePressed(); + } else if (standardId == R.string.shared_string_marker) { + mapActivity.getContextMenu().buttonWaypointPressed(); + } else if (standardId == R.string.shared_string_share) { + mapActivity.getContextMenu().buttonSharePressed(); + } + } + }; } public void enterDirectionsFromPoint(final double latitude, final double longitude) { diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenu.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenu.java index b67a70b1c0..43d67dc087 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenu.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenu.java @@ -47,6 +47,7 @@ import net.osmand.plus.mapcontextmenu.editors.RtePtEditor; import net.osmand.plus.mapcontextmenu.editors.WptPtEditor; import net.osmand.plus.mapcontextmenu.other.MapMultiSelectionMenu; import net.osmand.plus.mapcontextmenu.other.ShareMenu; +import net.osmand.plus.mapcontextmenu.AdditionalActionsBottomSheetDialogFragment.ContextMenuItemClickListener; import net.osmand.plus.monitoring.OsmandMonitoringPlugin; import net.osmand.plus.routing.RoutingHelper; import net.osmand.plus.transport.TransportStopRoute; @@ -1061,27 +1062,48 @@ public class MapContextMenu extends MenuTitleController implements StateChangedL } } - public void buttonMorePressed() { - MapActivity mapActivity = getMapActivity(); - if (mapActivity != null) { - LatLon latLon = getLatLon(); - mapActivity.getMapActions().contextMenuPoint(latLon.getLatitude(), latLon.getLongitude(), getAdapter(), getObject()); - } - } - - public ContextMenuAdapter getAdapter() { - final ContextMenuAdapter menuAdapter = new ContextMenuAdapter(); - MapActivity mapActivity = getMapActivity(); - if (mapActivity != null) { +// public void buttonMorePressed() { +// MapActivity mapActivity = getMapActivity(); +// if (mapActivity != null) { +// final ContextMenuAdapter menuAdapter = new ContextMenuAdapter(); // LatLon latLon = getLatLon(); // for (OsmandMapLayer layer : mapActivity.getMapView().getLayers()) { // layer.populateObjectContextMenu(latLon, getObject(), menuAdapter, mapActivity); // } - mapActivity.getMapActions().getContextMenuAdapter(menuAdapter, getObject()); +// +// mapActivity.getMapActions().contextMenuPoint(latLon.getLatitude(), latLon.getLongitude(), menuAdapter, getObject()); +// } +// } + + public ContextMenuAdapter getActionsContextMenuAdapter(boolean all) { + MapActivity mapActivity = getMapActivity(); + final ContextMenuAdapter menuAdapter = new ContextMenuAdapter(); + if (mapActivity != null) { + LatLon latLon = getLatLon(); + for (OsmandMapLayer layer : mapActivity.getMapView().getLayers()) { + layer.populateObjectContextMenu(latLon, getObject(), menuAdapter, mapActivity); + } + mapActivity.getMapActions().addActionsToAdapter(all ? 0 : latLon.getLatitude(), all ? 0 : latLon.getLatitude(), menuAdapter, getObject(), all); } return menuAdapter; } + public ContextMenuItemClickListener getContextMenuItemClickListener(ContextMenuAdapter menuAdapter) { + MapActivity mapActivity = getMapActivity(); + if (mapActivity != null) { + LatLon latLon = getLatLon(); + return mapActivity.getMapActions().getListener(latLon.getLatitude(), latLon.getLatitude(), menuAdapter); + } + return null; + } + + public void showAdditionalActionsFragment(final ContextMenuAdapter adapter, ContextMenuItemClickListener listener) { + MapActivity mapActivity = getMapActivity(); + if (mapActivity != null) { + mapActivity.getMapActions().showAdditionalActionsFragment(adapter, listener); + } + } + private void callMenuAction(boolean waitForAddressLookup, MenuAction menuAction) { if (searchingAddress() && waitForAddressLookup) { ProgressDialog dlg = buildSearchActionDialog(); diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenuFragment.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenuFragment.java index 260338ebc1..fc0f0a353d 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenuFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenuFragment.java @@ -51,6 +51,8 @@ import net.osmand.data.QuadPoint; import net.osmand.data.QuadRect; import net.osmand.data.RotatedTileBox; import net.osmand.data.TransportRoute; +import net.osmand.plus.ContextMenuAdapter; +import net.osmand.plus.ContextMenuItem; import net.osmand.plus.LockableScrollView; import net.osmand.plus.OsmAndFormatter; import net.osmand.plus.OsmandApplication; @@ -68,6 +70,7 @@ import net.osmand.plus.mapcontextmenu.MenuController.MenuState; import net.osmand.plus.mapcontextmenu.MenuController.TitleButtonController; import net.osmand.plus.mapcontextmenu.MenuController.TitleProgressController; import net.osmand.plus.mapcontextmenu.controllers.TransportStopController; +import net.osmand.plus.mapcontextmenu.AdditionalActionsBottomSheetDialogFragment.ContextMenuItemClickListener; import net.osmand.plus.routepreparationmenu.ChooseRouteFragment; import net.osmand.plus.routepreparationmenu.MapRouteInfoMenu; import net.osmand.plus.transport.TransportStopRoute; @@ -83,6 +86,7 @@ import net.osmand.util.Algorithms; import java.util.ArrayList; import java.util.List; +import static net.osmand.aidlapi.OsmAndCustomizationConstants.MAP_CONTEXT_MENU_MORE_ID; import static net.osmand.plus.mapcontextmenu.MenuBuilder.SHADOW_HEIGHT_TOP_DP; @@ -547,7 +551,7 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo View buttonsTopBorder = view.findViewById(R.id.buttons_top_border); buttonsBottomBorder.setBackgroundColor(ContextCompat.getColor(mapActivity, nightMode ? R.color.ctx_menu_buttons_divider_dark : R.color.ctx_menu_buttons_divider_light)); buttonsTopBorder.setBackgroundColor(ContextCompat.getColor(mapActivity, nightMode ? R.color.ctx_menu_buttons_divider_dark : R.color.ctx_menu_buttons_divider_light)); - View buttons = view.findViewById(R.id.context_menu_buttons); + LinearLayout buttons = view.findViewById(R.id.context_menu_buttons); buttons.setBackgroundColor(ContextCompat.getColor(mapActivity, nightMode ? R.color.list_background_color_dark : R.color.activity_background_color_light)); if (!menu.buttonsVisible()) { buttonsTopBorder.setVisibility(View.GONE); @@ -560,59 +564,84 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo } // Action buttons - final ImageView imageFavorite = (ImageView) view.findViewById(R.id.context_menu_fav_image_view); - imageFavorite.setImageDrawable(getIcon(menu.getFavActionIconId(), - R.color.ctx_menu_buttons_icon_color)); - ((TextView) view.findViewById(R.id.context_menu_fav_text_view)).setText(menu.getFavActionStringId()); - View favView = view.findViewById(R.id.context_menu_fav_view); - if (menu.isFavButtonEnabled()) { - favView.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - menu.buttonFavoritePressed(); - } - }); - } else { - deactivate(favView); + + ContextMenuAdapter adapter = menu.getActionsContextMenuAdapter(false); + ContextMenuItemClickListener listener = menu.getContextMenuItemClickListener(adapter); + adapter.initItemsCustomOrder(requireMyApplication()); + List items = adapter.getItems(); + List main = new ArrayList<>(); + List additional = new ArrayList<>(); + for (int i = 0; i < 4; i++) { + main.add(items.get(i)); + } + for (int i = 4; i < items.size(); i++) { + additional.add(items.get(i)); } - final ImageView imageWaypoint = (ImageView) view.findViewById(R.id.context_menu_route_image_view); - imageWaypoint.setImageDrawable(getIcon(menu.getWaypointActionIconId(), - R.color.ctx_menu_buttons_icon_color)); - ((TextView) view.findViewById(R.id.context_menu_route_text_view)).setText(menu.getWaypointActionStringId()); - View waypointView = view.findViewById(R.id.context_menu_route_view); - if (menu.isButtonWaypointEnabled()) { - waypointView.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - menu.buttonWaypointPressed(); - } - }); - } else { - deactivate(waypointView); + LinearLayout.LayoutParams params = new LinearLayout.LayoutParams( + ViewGroup.LayoutParams.MATCH_PARENT, + ViewGroup.LayoutParams.MATCH_PARENT, + 1f + ); + buttons.removeAllViews(); + for (int i = 0; i < main.size(); i++) { + buttons.addView(getActionView(main.get(i), listener, i, adapter, additional), params); } + buttons.setGravity(Gravity.CENTER); - final ImageView imageShare = (ImageView) view.findViewById(R.id.context_menu_share_image_view); - imageShare.setImageDrawable(getIcon(R.drawable.map_action_gshare_dark, - R.color.ctx_menu_buttons_icon_color)); - View shareView = view.findViewById(R.id.context_menu_share_view); - shareView.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - menu.buttonSharePressed(); - } - }); +// final ImageView imageFavorite = (ImageView) view.findViewById(R.id.context_menu_fav_image_view); +// imageFavorite.setImageDrawable(getIcon(menu.getFavActionIconId(), +// R.color.ctx_menu_buttons_icon_color)); +// ((TextView) view.findViewById(R.id.context_menu_fav_text_view)).setText(menu.getFavActionStringId()); +// View favView = view.findViewById(R.id.context_menu_fav_view); +// if (menu.isFavButtonEnabled()) { +// favView.setOnClickListener(new View.OnClickListener() { +// @Override +// public void onClick(View v) { +// menu.buttonFavoritePressed(); +// } +// }); +// } else { +// deactivate(favView); +// } - final ImageView imageMore = (ImageView) view.findViewById(R.id.context_menu_more_image_view); - imageMore.setImageDrawable(getIcon(R.drawable.map_overflow_menu_white, - R.color.ctx_menu_buttons_icon_color)); - View moreView = view.findViewById(R.id.context_menu_more_view); - moreView.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - menu.buttonMorePressed(); - } - }); +// final ImageView imageWaypoint = (ImageView) view.findViewById(R.id.context_menu_route_image_view); +// imageWaypoint.setImageDrawable(getIcon(menu.getWaypointActionIconId(), +// R.color.ctx_menu_buttons_icon_color)); +// ((TextView) view.findViewById(R.id.context_menu_route_text_view)).setText(menu.getWaypointActionStringId()); +// View waypointView = view.findViewById(R.id.context_menu_route_view); +// if (menu.isButtonWaypointEnabled()) { +// waypointView.setOnClickListener(new View.OnClickListener() { +// @Override +// public void onClick(View v) { +// menu.buttonWaypointPressed(); +// } +// }); +// } else { +// deactivate(waypointView); +// } + +// final ImageView imageShare = (ImageView) view.findViewById(R.id.context_menu_share_image_view); +// imageShare.setImageDrawable(getIcon(R.drawable.map_action_gshare_dark, +// R.color.ctx_menu_buttons_icon_color)); +// View shareView = view.findViewById(R.id.context_menu_share_view); +// shareView.setOnClickListener(new View.OnClickListener() { +// @Override +// public void onClick(View v) { +// menu.buttonSharePressed(); +// } +// }); + +// final ImageView imageMore = (ImageView) view.findViewById(R.id.context_menu_more_image_view); +// imageMore.setImageDrawable(getIcon(R.drawable.map_overflow_menu_white, +// R.color.ctx_menu_buttons_icon_color)); +// View moreView = view.findViewById(R.id.context_menu_more_view); +// moreView.setOnClickListener(new View.OnClickListener() { +// @Override +// public void onClick(View v) { +// menu.buttonMorePressed(); +// } +// }); //Bottom buttons int bottomButtonsColor = nightMode ? R.color.ctx_menu_controller_button_text_color_dark_n : R.color.ctx_menu_controller_button_text_color_light_n; @@ -671,6 +700,39 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo return view; } + private View getActionView(ContextMenuItem contextMenuItem, + final ContextMenuItemClickListener listener, + final int position, + final ContextMenuAdapter adapter, + List additional) { + UiUtilities uiUtilities = requireMyApplication().getUIUtilities(); + LayoutInflater inflater = UiUtilities.getInflater(getMyApplication(), nightMode); + View view = inflater.inflate(R.layout.context_menu_action_item, null); + LinearLayout item = view.findViewById(R.id.item); + ImageView icon = view.findViewById(R.id.icon); + TextView title = view.findViewById(R.id.text); + icon.setImageDrawable(uiUtilities.getIcon(contextMenuItem.getIcon(), nightMode)); + title.setText(contextMenuItem.getTitle()); + + if (contextMenuItem.getId().equals(MAP_CONTEXT_MENU_MORE_ID)) { + adapter.updateItems(additional); + item.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + menu.showAdditionalActionsFragment(adapter, listener); + } + }); + } else { + item.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + listener.onItemClick(position); + } + }); + } + return view; + } + @Nullable private TransportStopRouteAdapter createTransportStopRouteAdapter(List routes, boolean needMoreItem) { OsmandApplication app = getMyApplication(); @@ -1377,10 +1439,10 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo public void rebuildMenu(boolean centered) { OsmandApplication app = getMyApplication(); if (app != null && view != null) { - final ImageView buttonFavorite = (ImageView) view.findViewById(R.id.context_menu_fav_image_view); - buttonFavorite.setImageDrawable(getIcon(menu.getFavActionIconId(), R.color.ctx_menu_buttons_icon_color)); - String favActionString = getString(menu.getFavActionStringId()); - ((TextView) view.findViewById(R.id.context_menu_fav_text_view)).setText(favActionString); +// final ImageView buttonFavorite = (ImageView) view.findViewById(R.id.context_menu_fav_image_view); +// buttonFavorite.setImageDrawable(getIcon(menu.getFavActionIconId(), R.color.ctx_menu_buttons_icon_color)); +// String favActionString = getString(menu.getFavActionStringId()); +// ((TextView) view.findViewById(R.id.context_menu_fav_text_view)).setText(favActionString); buildHeader(); diff --git a/OsmAnd/src/net/osmand/plus/settings/ConfigureMenuItemsFragment.java b/OsmAnd/src/net/osmand/plus/settings/ConfigureMenuItemsFragment.java index 7b2ee2a734..e15f712605 100644 --- a/OsmAnd/src/net/osmand/plus/settings/ConfigureMenuItemsFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/ConfigureMenuItemsFragment.java @@ -41,7 +41,6 @@ import net.osmand.plus.views.controls.ReorderItemTouchHelperCallback; import net.osmand.plus.settings.RearrangeMenuItemsAdapter.AdapterItem; import net.osmand.plus.settings.RearrangeMenuItemsAdapter.MenuItemsAdapterListener; -import java.io.Serializable; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -90,6 +89,16 @@ public class ConfigureMenuItemsFragment extends BaseOsmAndFragment return fragment; } + + @Override + public int getStatusBarColorId() { + View view = getView(); + if (view != null && Build.VERSION.SDK_INT >= 23 && !nightMode) { + view.setSystemUiVisibility(view.getSystemUiVisibility() | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR); + } + return nightMode ? R.color.activity_background_dark : R.color.activity_background_light; + } + @Override public void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); @@ -110,7 +119,7 @@ public class ConfigureMenuItemsFragment extends BaseOsmAndFragment break; case CONTEXT_MENU_ACTIONS: MapContextMenu menu = ((MapActivity) activity).getContextMenu(); - contextMenuAdapter = menu.getAdapter(); + contextMenuAdapter = menu.getActionsContextMenuAdapter(true); break; } } @@ -260,15 +269,21 @@ public class ConfigureMenuItemsFragment extends BaseOsmAndFragment List visible = contextMenuAdapter.getItemsForRearrangeAdapter(hiddenMenuItems, wasReset ? null : menuItemsOrder, false); List hiddenItems = contextMenuAdapter.getItemsForRearrangeAdapter(hiddenMenuItems, wasReset ? null : menuItemsOrder, true); if (screenType == ScreenType.CONTEXT_MENU_ACTIONS) { - List main = new ArrayList<>(); - int actionsIndex = 3; - for (int i = 0; i < visible.size(); i++) { - if (((ContextMenuItem) visible.get(i).getValue()).getId().equals(MAP_CONTEXT_MENU_MORE_ID)) { - actionsIndex = i; - break; + for (int i =0; i3){ + AdapterItem third = visible.get(3); + visible.set(3,visible.get(i)); + menuItemsOrder.put(((ContextMenuItem) third.getValue()).getId(),i); + menuItemsOrder.put(((ContextMenuItem) visible.get(i).getValue()).getId(),3); + } } } - for (int i = 0; i < actionsIndex + 1; i++) { + + List main = new ArrayList<>(); + int actionsIndex = Math.min(4, visible.size()); + for (int i = 0; i < actionsIndex; i++) { main.add(visible.get(i)); } items.add(new AdapterItem(HEADER, new RearrangeMenuItemsAdapter.HeaderItem(R.string.main_actions, R.string.main_actions_descr))); diff --git a/OsmAnd/src/net/osmand/plus/settings/ConfigureMenuRootFragment.java b/OsmAnd/src/net/osmand/plus/settings/ConfigureMenuRootFragment.java index 09a94eed48..ffa6d0164a 100644 --- a/OsmAnd/src/net/osmand/plus/settings/ConfigureMenuRootFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/ConfigureMenuRootFragment.java @@ -47,8 +47,6 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import static net.osmand.plus.settings.ConfigureMenuRootFragment.ScreenType.CONFIGURE_MAP; - public class ConfigureMenuRootFragment extends BaseOsmAndFragment { public static final String TAG = ConfigureMenuRootFragment.class.getName(); @@ -118,7 +116,11 @@ public class ConfigureMenuRootFragment extends BaseOsmAndFragment { @Override public int getStatusBarColorId() { - return nightMode ? R.color.activity_background_dark : R.color.activity_background_light; + View view = getView(); + if (view != null && Build.VERSION.SDK_INT >= 23 && !nightMode) { + view.setSystemUiVisibility(view.getSystemUiVisibility() | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR); + } + return nightMode ? R.color.activity_background_dark : R.color.activity_background_light; } @@ -224,7 +226,7 @@ public class ConfigureMenuRootFragment extends BaseOsmAndFragment { break; case CONTEXT_MENU_ACTIONS: MapContextMenu menu = ((MapActivity) activity).getContextMenu(); - contextMenuAdapter = menu.getAdapter(); + contextMenuAdapter = menu.getActionsContextMenuAdapter(true); break; } int hiddenCount = ConfigureMenuItemsFragment.getSettingForScreen(app, type).getHiddenIds().size(); diff --git a/OsmAnd/src/net/osmand/plus/settings/RearrangeMenuItemsAdapter.java b/OsmAnd/src/net/osmand/plus/settings/RearrangeMenuItemsAdapter.java index 799705b6d8..05a1da6f7c 100644 --- a/OsmAnd/src/net/osmand/plus/settings/RearrangeMenuItemsAdapter.java +++ b/OsmAnd/src/net/osmand/plus/settings/RearrangeMenuItemsAdapter.java @@ -30,6 +30,7 @@ import net.osmand.plus.settings.ConfigureMenuRootFragment.ScreenType; import java.util.Collections; import java.util.List; +import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_BUILDS_ID; import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_DIVIDER_ID; import static net.osmand.aidlapi.OsmAndCustomizationConstants.MAP_CONTEXT_MENU_MORE_ID; import static net.osmand.aidlapi.OsmAndCustomizationConstants.MAP_RENDERING_CATEGORY_ID; @@ -151,7 +152,7 @@ public class RearrangeMenuItemsAdapter extends RecyclerView.Adapter 5) { + return false; + } + } else if (menuItemTo.getId().equals(MAP_CONTEXT_MENU_MORE_ID)) { + if (from > 5) { + return false; + } + } + menuItemFrom.setOrder(orderTo); menuItemTo.setOrder(orderFrom); @@ -423,4 +434,12 @@ public class RearrangeMenuItemsAdapter extends RecyclerView.Adapter Date: Thu, 9 Apr 2020 16:55:25 +0300 Subject: [PATCH 128/202] fix reset --- .../settings/ConfigureMenuItemsFragment.java | 27 +++++++++++-------- .../settings/RearrangeMenuItemsAdapter.java | 1 + 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/settings/ConfigureMenuItemsFragment.java b/OsmAnd/src/net/osmand/plus/settings/ConfigureMenuItemsFragment.java index e15f712605..72000087e9 100644 --- a/OsmAnd/src/net/osmand/plus/settings/ConfigureMenuItemsFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/ConfigureMenuItemsFragment.java @@ -106,6 +106,21 @@ public class ConfigureMenuItemsFragment extends BaseOsmAndFragment appMode = app.getSettings().getApplicationMode(); nightMode = !app.getSettings().isLightContent(); mInflater = UiUtilities.getInflater(app, nightMode); + instantiateContextMenuAdapter(); + if (savedInstanceState != null + && savedInstanceState.containsKey(ITEM_TYPE_KEY) + && savedInstanceState.containsKey(HIDDEN_ITEMS_KEY) + && savedInstanceState.containsKey(ITEMS_ORDER_KEY)) { + screenType = (ScreenType) savedInstanceState.getSerializable(ITEM_TYPE_KEY); + hiddenMenuItems = savedInstanceState.getStringArrayList(HIDDEN_ITEMS_KEY); + menuItemsOrder = (HashMap) savedInstanceState.getSerializable(ITEMS_ORDER_KEY); + } else { + hiddenMenuItems = getSettingForScreen(app, screenType).getHiddenIds(); + menuItemsOrder = contextMenuAdapter.getMenuItemsOrder(getSettingForScreen(app, screenType).getOrderIds()); + } + } + + private void instantiateContextMenuAdapter() { Activity activity = getActivity(); if (activity instanceof MapActivity) { switch (screenType) { @@ -123,17 +138,6 @@ public class ConfigureMenuItemsFragment extends BaseOsmAndFragment break; } } - if (savedInstanceState != null - && savedInstanceState.containsKey(ITEM_TYPE_KEY) - && savedInstanceState.containsKey(HIDDEN_ITEMS_KEY) - && savedInstanceState.containsKey(ITEMS_ORDER_KEY)) { - screenType = (ScreenType) savedInstanceState.getSerializable(ITEM_TYPE_KEY); - hiddenMenuItems = savedInstanceState.getStringArrayList(HIDDEN_ITEMS_KEY); - menuItemsOrder = (HashMap) savedInstanceState.getSerializable(ITEMS_ORDER_KEY); - } else { - hiddenMenuItems = getSettingForScreen(app, screenType).getHiddenIds(); - menuItemsOrder = contextMenuAdapter.getMenuItemsOrder(getSettingForScreen(app, screenType).getOrderIds()); - } } @Nullable @@ -312,6 +316,7 @@ public class ConfigureMenuItemsFragment extends BaseOsmAndFragment menuItemsOrder.clear(); wasReset = true; isChanged = true; + instantiateContextMenuAdapter(); rearrangeAdapter.updateItems(getAdapterItems()); } }))); diff --git a/OsmAnd/src/net/osmand/plus/settings/RearrangeMenuItemsAdapter.java b/OsmAnd/src/net/osmand/plus/settings/RearrangeMenuItemsAdapter.java index 05a1da6f7c..43786a34db 100644 --- a/OsmAnd/src/net/osmand/plus/settings/RearrangeMenuItemsAdapter.java +++ b/OsmAnd/src/net/osmand/plus/settings/RearrangeMenuItemsAdapter.java @@ -150,6 +150,7 @@ public class RearrangeMenuItemsAdapter extends RecyclerView.Adapter Date: Thu, 9 Apr 2020 17:33:52 +0300 Subject: [PATCH 129/202] Show SnackBar when preference change (fixes p.2) --- OsmAnd/src/net/osmand/plus/UiUtilities.java | 26 ++++++++++++ .../plus/settings/BaseSettingsFragment.java | 25 ++++++----- .../GeneralProfileSettingsFragment.java | 6 +-- .../settings/MapDuringNavigationFragment.java | 30 ++++---------- .../plus/settings/NavigationFragment.java | 9 ++-- .../plus/settings/OnApplyPreference.java | 7 ---- .../settings/OnConfirmPreferenceChange.java | 7 ++++ .../settings/RouteParametersFragment.java | 19 +++------ .../plus/settings/ScreenAlertsFragment.java | 3 +- .../plus/settings/TurnScreenOnFragment.java | 3 +- .../plus/settings/VoiceAnnouncesFragment.java | 41 ++++++++++++------- .../BasePreferenceBottomSheet.java | 15 +++++++ .../BooleanPreferenceBottomSheet.java | 33 ++++++++++----- ...ecalculateRouteInDeviationBottomSheet.java | 18 +++----- 14 files changed, 141 insertions(+), 101 deletions(-) delete mode 100644 OsmAnd/src/net/osmand/plus/settings/OnApplyPreference.java create mode 100644 OsmAnd/src/net/osmand/plus/settings/OnConfirmPreferenceChange.java diff --git a/OsmAnd/src/net/osmand/plus/UiUtilities.java b/OsmAnd/src/net/osmand/plus/UiUtilities.java index 90afa4f2eb..ea79ae6eae 100644 --- a/OsmAnd/src/net/osmand/plus/UiUtilities.java +++ b/OsmAnd/src/net/osmand/plus/UiUtilities.java @@ -15,12 +15,15 @@ import android.os.Build; import android.text.SpannableString; import android.text.Spanned; import android.text.style.StyleSpan; +import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import android.view.ViewParent; import android.view.WindowManager; import android.widget.CompoundButton; import android.widget.ImageView; +import android.widget.LinearLayout; import android.widget.SeekBar; import android.widget.TextView; @@ -37,6 +40,7 @@ import androidx.core.view.ViewCompat; import androidx.core.widget.TintableCompoundButton; import com.google.android.material.snackbar.Snackbar; +import com.google.android.material.snackbar.SnackbarContentLayout; import net.osmand.AndroidUtils; import net.osmand.Location; @@ -390,6 +394,28 @@ public class UiUtilities { view.setBackgroundColor(ContextCompat.getColor(ctx, backgroundColor)); } + public static void setupSnackbarVerticalLayout(Snackbar snackbar) { + View view = snackbar.getView(); + Context ctx = view.getContext(); + TextView messageView = (TextView) view.findViewById(com.google.android.material.R.id.snackbar_text); + TextView actionView = (TextView) view.findViewById(com.google.android.material.R.id.snackbar_action); + ViewParent parent = actionView.getParent(); + if (parent instanceof SnackbarContentLayout) { + ((SnackbarContentLayout) parent).removeView(actionView); + ((SnackbarContentLayout) parent).removeView(messageView); + LinearLayout container = new LinearLayout(ctx); + container.setOrientation(LinearLayout.VERTICAL); + container.addView(messageView); + container.addView(actionView); + ((SnackbarContentLayout) parent).addView(container); + LinearLayout.LayoutParams params = new LinearLayout.LayoutParams( + ViewGroup.LayoutParams.MATCH_PARENT, + ViewGroup.LayoutParams.WRAP_CONTENT); + actionView.setGravity(Gravity.CENTER_VERTICAL | Gravity.END); + container.setLayoutParams(params); + } + } + public static void rotateImageByLayoutDirection(ImageView image, int layoutDirection) { if (image == null) { return; diff --git a/OsmAnd/src/net/osmand/plus/settings/BaseSettingsFragment.java b/OsmAnd/src/net/osmand/plus/settings/BaseSettingsFragment.java index de0bc9d390..2a51a5a835 100644 --- a/OsmAnd/src/net/osmand/plus/settings/BaseSettingsFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/BaseSettingsFragment.java @@ -83,7 +83,7 @@ import java.io.Serializable; import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_SETTINGS_ID; public abstract class BaseSettingsFragment extends PreferenceFragmentCompat implements OnPreferenceChangeListener, - OnPreferenceClickListener, AppModeChangedListener, OnApplyPreference { + OnPreferenceClickListener, AppModeChangedListener, OnConfirmPreferenceChange { private static final Log LOG = PlatformUtil.getLog(BaseSettingsFragment.class); @@ -314,26 +314,28 @@ public abstract class BaseSettingsFragment extends PreferenceFragmentCompat impl @Override public boolean onPreferenceChange(Preference preference, Object newValue) { - return onApplyPreference(preference.getKey(), newValue, getApplyQueryType()); + return onConfirmPreferenceChange(preference.getKey(), newValue, getApplyQueryType()); } @Override - public boolean onApplyPreference(String prefId, Object newValue, ApplyQueryType applyQueryType) { + public boolean onConfirmPreferenceChange(String prefId, Object newValue, ApplyQueryType applyQueryType) { if (applyQueryType != null && newValue instanceof Serializable) { OsmandSettings.OsmandPreference pref = settings.getPreference(prefId); if (pref instanceof CommonPreference) { if (applyQueryType == ApplyQueryType.SNACK_BAR) { - applySettingWithSnackBar(prefId, (Serializable) newValue); + applyPreferenceWithSnackBar(prefId, (Serializable) newValue); + return true; } else if (applyQueryType == ApplyQueryType.BOTTOM_SHEET) { FragmentManager fragmentManager = getFragmentManager(); if (fragmentManager != null) { ChangeGeneralProfilesPrefBottomSheet.showInstance(fragmentManager, prefId, (Serializable) newValue, this, false, getSelectedAppMode()); } + return false; } else if (applyQueryType == ApplyQueryType.NONE) { - onSettingApplied(prefId, newValue, false); + onApplyPreferenceChange(prefId, false, newValue); + return true; } - return true; } } return true; @@ -363,7 +365,7 @@ public abstract class BaseSettingsFragment extends PreferenceFragmentCompat impl if (preference instanceof ListPreferenceEx) { SingleSelectPreferenceBottomSheet.showInstance(fragmentManager, preference.getKey(), this, false, appMode, isProfileDependent(), false); } else if (preference instanceof SwitchPreferenceEx) { - BooleanPreferenceBottomSheet.showInstance(fragmentManager, preference.getKey(), this, false, appMode, isProfileDependent()); + BooleanPreferenceBottomSheet.showInstance(fragmentManager, preference.getKey(), this, false, appMode, getApplyQueryType(), isProfileDependent()); } else if (preference instanceof EditTextPreference) { EditTextPreferenceBottomSheet.showInstance(fragmentManager, preference.getKey(), this, false, appMode); } else if (preference instanceof MultiSelectBooleanPreference) { @@ -606,7 +608,7 @@ public abstract class BaseSettingsFragment extends PreferenceFragmentCompat impl public void onSettingApplied(String prefId, boolean appliedToAllProfiles) { } - public void onSettingApplied(String prefId, Object newValue, boolean appliedToAllProfiles) { + public void onApplyPreferenceChange(String prefId, boolean appliedToAllProfiles, Object newValue) { if (appliedToAllProfiles) { app.getSettings().setPreferenceForAllModes(prefId, newValue); } else { @@ -904,8 +906,8 @@ public abstract class BaseSettingsFragment extends PreferenceFragmentCompat impl } } - protected void applySettingWithSnackBar(final String prefId, final Serializable newValue) { - onSettingApplied(prefId, newValue, false); + protected void applyPreferenceWithSnackBar(final String prefId, final Serializable newValue) { + onApplyPreferenceChange(prefId, false, newValue); updateSetting(prefId); View containerView = getView(); if (containerView != null) { @@ -916,9 +918,10 @@ public abstract class BaseSettingsFragment extends PreferenceFragmentCompat impl .setAction(R.string.apply_to_all_profiles, new View.OnClickListener() { @Override public void onClick(View view) { - onSettingApplied(prefId, newValue, true); + onApplyPreferenceChange(prefId, true, newValue); } }); + UiUtilities.setupSnackbarVerticalLayout(snackbar); snackbar.show(); } } diff --git a/OsmAnd/src/net/osmand/plus/settings/GeneralProfileSettingsFragment.java b/OsmAnd/src/net/osmand/plus/settings/GeneralProfileSettingsFragment.java index 17c72554a2..777171a05e 100644 --- a/OsmAnd/src/net/osmand/plus/settings/GeneralProfileSettingsFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/GeneralProfileSettingsFragment.java @@ -17,7 +17,6 @@ import androidx.annotation.NonNull; import androidx.appcompat.app.AlertDialog; import androidx.appcompat.widget.AppCompatCheckedTextView; import androidx.appcompat.widget.SwitchCompat; -import androidx.fragment.app.FragmentManager; import androidx.preference.Preference; import androidx.preference.PreferenceViewHolder; import androidx.preference.SwitchPreferenceCompat; @@ -25,16 +24,13 @@ import androidx.preference.SwitchPreferenceCompat; import net.osmand.data.PointDescription; import net.osmand.plus.ApplicationMode; import net.osmand.plus.OsmandSettings; -import net.osmand.plus.OsmandSettings.CommonPreference; import net.osmand.plus.R; import net.osmand.plus.UiUtilities; import net.osmand.plus.Version; import net.osmand.plus.base.MapViewTrackingUtilities; -import net.osmand.plus.settings.bottomsheets.ChangeGeneralProfilesPrefBottomSheet; import net.osmand.plus.settings.preferences.ListPreferenceEx; import net.osmand.plus.settings.preferences.SwitchPreferenceEx; -import java.io.Serializable; import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -355,7 +351,7 @@ public class GeneralProfileSettingsFragment extends BaseSettingsFragment impleme public boolean onPreferenceChange(Preference preference, Object newValue) { String prefId = preference.getKey(); if (settings.ROTATE_MAP.getId().equals(prefId)) { - onApplyPreference(prefId, newValue, ApplyQueryType.SNACK_BAR); + onConfirmPreferenceChange(prefId, newValue, ApplyQueryType.SNACK_BAR); return false; } return super.onPreferenceChange(preference, newValue); diff --git a/OsmAnd/src/net/osmand/plus/settings/MapDuringNavigationFragment.java b/OsmAnd/src/net/osmand/plus/settings/MapDuringNavigationFragment.java index 71cd3a577f..1176f7281f 100644 --- a/OsmAnd/src/net/osmand/plus/settings/MapDuringNavigationFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/MapDuringNavigationFragment.java @@ -2,7 +2,6 @@ package net.osmand.plus.settings; import androidx.preference.Preference; -import net.osmand.plus.ApplicationMode; import net.osmand.plus.OsmandSettings; import net.osmand.plus.OsmandSettings.AutoZoomMap; import net.osmand.plus.R; @@ -102,38 +101,27 @@ public class MapDuringNavigationFragment extends BaseSettingsFragment { @Override public boolean onPreferenceChange(Preference preference, Object newValue) { if (preference.getKey().equals(settings.AUTO_ZOOM_MAP.getId())) { - onApplyPreference(settings.AUTO_ZOOM_MAP.getId(), newValue, ApplyQueryType.SNACK_BAR); + onConfirmPreferenceChange(settings.AUTO_ZOOM_MAP.getId(), newValue, ApplyQueryType.SNACK_BAR); return true; } return super.onPreferenceChange(preference, newValue); } @Override - public void onSettingApplied(String prefId, Object newValue, boolean appliedToAllProfiles) { + public void onApplyPreferenceChange(String prefId, boolean appliedToAllProfiles, Object newValue) { if (settings.AUTO_ZOOM_MAP.getId().equals(prefId)) { if (newValue instanceof Integer) { - ApplicationMode selectedMode = getSelectedAppMode(); int position = (int) newValue; - if (appliedToAllProfiles) { - if (position == 0) { - settings.setPreferenceForAllModes(settings.AUTO_ZOOM_MAP.getId(), false); - } else { - settings.setPreferenceForAllModes(settings.AUTO_ZOOM_MAP.getId(), true); - settings.setPreferenceForAllModes(settings.AUTO_ZOOM_MAP_SCALE.getId(), - OsmandSettings.AutoZoomMap.values()[position - 1]); - } + if (position == 0) { + super.onApplyPreferenceChange(settings.AUTO_ZOOM_MAP.getId(), appliedToAllProfiles, false); } else { - if (position == 0) { - settings.AUTO_ZOOM_MAP.setModeValue(selectedMode, false); - } else { - settings.AUTO_ZOOM_MAP.setModeValue(selectedMode, true); - settings.AUTO_ZOOM_MAP_SCALE.setModeValue(selectedMode, - OsmandSettings.AutoZoomMap.values()[position - 1]); - } + super.onApplyPreferenceChange(settings.AUTO_ZOOM_MAP.getId(), appliedToAllProfiles, true); + super.onApplyPreferenceChange(settings.AUTO_ZOOM_MAP_SCALE.getId(), + appliedToAllProfiles, OsmandSettings.AutoZoomMap.values()[position - 1]); } - return; } + } else { + super.onApplyPreferenceChange(prefId, appliedToAllProfiles, newValue); } - super.onSettingApplied(prefId, newValue, appliedToAllProfiles); } } \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/settings/NavigationFragment.java b/OsmAnd/src/net/osmand/plus/settings/NavigationFragment.java index 8826e78ea2..42bb1061a5 100644 --- a/OsmAnd/src/net/osmand/plus/settings/NavigationFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/NavigationFragment.java @@ -21,7 +21,6 @@ import net.osmand.router.GeneralRouter; import net.osmand.router.RoutingConfiguration; import net.osmand.util.Algorithms; -import java.io.Serializable; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; @@ -93,13 +92,13 @@ public class NavigationFragment extends BaseSettingsFragment { } @Override - public void onSettingApplied(String prefId, Object newValue, boolean appliedToAllProfiles) { + public void onApplyPreferenceChange(String prefId, boolean appliedToAllProfiles, Object newValue) { if (settings.VOICE_MUTE.getId().equals(prefId) && newValue instanceof Boolean) { - super.onSettingApplied(prefId, !(Boolean) newValue, appliedToAllProfiles); + super.onApplyPreferenceChange(prefId, appliedToAllProfiles, !(Boolean) newValue); updateMenu(); - return; + } else { + super.onApplyPreferenceChange(prefId, appliedToAllProfiles, newValue); } - super.onSettingApplied(prefId, newValue, appliedToAllProfiles); } @Override diff --git a/OsmAnd/src/net/osmand/plus/settings/OnApplyPreference.java b/OsmAnd/src/net/osmand/plus/settings/OnApplyPreference.java deleted file mode 100644 index d8e36c0d2d..0000000000 --- a/OsmAnd/src/net/osmand/plus/settings/OnApplyPreference.java +++ /dev/null @@ -1,7 +0,0 @@ -package net.osmand.plus.settings; - -public interface OnApplyPreference { - - boolean onApplyPreference(String prefId, Object newValue, ApplyQueryType applyQueryType); - -} diff --git a/OsmAnd/src/net/osmand/plus/settings/OnConfirmPreferenceChange.java b/OsmAnd/src/net/osmand/plus/settings/OnConfirmPreferenceChange.java new file mode 100644 index 0000000000..ff377f4a23 --- /dev/null +++ b/OsmAnd/src/net/osmand/plus/settings/OnConfirmPreferenceChange.java @@ -0,0 +1,7 @@ +package net.osmand.plus.settings; + +public interface OnConfirmPreferenceChange { + + boolean onConfirmPreferenceChange(String prefId, Object newValue, ApplyQueryType applyQueryType); + +} diff --git a/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java b/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java index d346c6a4c2..567813db51 100644 --- a/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java @@ -411,7 +411,7 @@ public class RouteParametersFragment extends BaseSettingsFragment implements OnP } @Override - public void onSettingApplied(String prefId, Object newValue, boolean appliedToAllProfiles) { + public void onApplyPreferenceChange(String prefId, boolean appliedToAllProfiles, Object newValue) { if ((RELIEF_SMOOTHNESS_FACTOR.equals(prefId) || DRIVING_STYLE.equals(prefId)) && newValue instanceof String) { ApplicationMode appMode = getSelectedAppMode(); String selectedParameterId = (String) newValue; @@ -421,14 +421,12 @@ public class RouteParametersFragment extends BaseSettingsFragment implements OnP SettingsNavigationActivity.setRoutingParameterSelected(settings, appMode, parameterId, p.getDefaultBoolean(), parameterId.equals(selectedParameterId)); } recalculateRoute(); - return; } else if (ROUTING_SHORT_WAY.equals(prefId) && newValue instanceof Boolean) { if (appliedToAllProfiles) { settings.setPreferenceForAllModes(settings.FAST_ROUTE_MODE.getId(), !(Boolean) newValue); } else { settings.setPreference(settings.FAST_ROUTE_MODE.getId(), !(Boolean) newValue, getSelectedAppMode()); } - return; } else if (ROUTING_RECALC_DISTANCE.equals(prefId)) { boolean enabled = false; float valueToSave = DISABLE_MODE; @@ -439,25 +437,18 @@ public class RouteParametersFragment extends BaseSettingsFragment implements OnP valueToSave = (float) newValue; enabled = valueToSave != DISABLE_MODE; } - if (appliedToAllProfiles) { - settings.setPreferenceForAllModes(prefId, valueToSave); - settings.setPreferenceForAllModes(settings.DISABLE_OFFROUTE_RECALC.getId(), !enabled); - } else { - settings.setPreference(prefId, valueToSave, getSelectedAppMode()); - settings.setPreference(settings.DISABLE_OFFROUTE_RECALC.getId(), !enabled, getSelectedAppMode()); - } + super.onApplyPreferenceChange(ROUTING_RECALC_DISTANCE, appliedToAllProfiles, valueToSave); + super.onApplyPreferenceChange(settings.DISABLE_OFFROUTE_RECALC.getId(), appliedToAllProfiles, !enabled); updateRouteRecalcDistancePref(); - return; + } else { + super.onApplyPreferenceChange(prefId, appliedToAllProfiles, newValue); } - super.onSettingApplied(prefId, newValue, appliedToAllProfiles); } @Override public void onPreferenceChanged(String prefId) { if (AVOID_ROUTING_PARAMETER_PREFIX.equals(prefId) || PREFER_ROUTING_PARAMETER_PREFIX.equals(prefId)) { recalculateRoute(); - } else if (ROUTING_RECALC_DISTANCE.equals(prefId)) { - updateRouteRecalcDistancePref(); } } diff --git a/OsmAnd/src/net/osmand/plus/settings/ScreenAlertsFragment.java b/OsmAnd/src/net/osmand/plus/settings/ScreenAlertsFragment.java index c2d4a35d02..5a9047f3b7 100644 --- a/OsmAnd/src/net/osmand/plus/settings/ScreenAlertsFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/ScreenAlertsFragment.java @@ -55,7 +55,8 @@ public class ScreenAlertsFragment extends BaseSettingsFragment { public void onClick(View view) { ApplicationMode selectedMode = getSelectedAppMode(); boolean checked = !settings.SHOW_ROUTING_ALARMS.getModeValue(selectedMode); - onApplyPreference(settings.SHOW_ROUTING_ALARMS.getId(), checked, ApplyQueryType.SNACK_BAR); + onConfirmPreferenceChange( + settings.SHOW_ROUTING_ALARMS.getId(), checked, ApplyQueryType.SNACK_BAR); updateToolbarSwitch(); enableDisablePreferences(checked); } diff --git a/OsmAnd/src/net/osmand/plus/settings/TurnScreenOnFragment.java b/OsmAnd/src/net/osmand/plus/settings/TurnScreenOnFragment.java index 884d7bbdd0..f497904d49 100644 --- a/OsmAnd/src/net/osmand/plus/settings/TurnScreenOnFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/TurnScreenOnFragment.java @@ -43,7 +43,8 @@ public class TurnScreenOnFragment extends BaseSettingsFragment { public void onClick(View view) { ApplicationMode selectedMode = getSelectedAppMode(); boolean checked = !settings.TURN_SCREEN_ON_ENABLED.getModeValue(selectedMode); - onApplyPreference(settings.TURN_SCREEN_ON_ENABLED.getId(), checked, ApplyQueryType.SNACK_BAR); + onConfirmPreferenceChange( + settings.TURN_SCREEN_ON_ENABLED.getId(), checked, ApplyQueryType.SNACK_BAR); updateToolbarSwitch(); enableDisablePreferences(checked); } diff --git a/OsmAnd/src/net/osmand/plus/settings/VoiceAnnouncesFragment.java b/OsmAnd/src/net/osmand/plus/settings/VoiceAnnouncesFragment.java index 4a8b1eb323..634b9115e5 100644 --- a/OsmAnd/src/net/osmand/plus/settings/VoiceAnnouncesFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/VoiceAnnouncesFragment.java @@ -50,7 +50,8 @@ public class VoiceAnnouncesFragment extends BaseSettingsFragment { public void onClick(View view) { ApplicationMode selectedMode = getSelectedAppMode(); boolean checked = !settings.VOICE_MUTE.getModeValue(selectedMode); - onApplyPreference(settings.VOICE_MUTE.getId(), checked, ApplyQueryType.SNACK_BAR); + onConfirmPreferenceChange( + settings.VOICE_MUTE.getId(), checked, ApplyQueryType.SNACK_BAR); updateToolbarSwitch(); enableDisablePreferences(!checked); updateMenu(); @@ -219,7 +220,8 @@ public class VoiceAnnouncesFragment extends BaseSettingsFragment { @Override public void onClick(DialogInterface dialog, int which) { - onApplyPreference(settings.SPEAK_SPEED_CAMERA.getId(), true, ApplyQueryType.SNACK_BAR); + onConfirmPreferenceChange( + settings.SPEAK_SPEED_CAMERA.getId(), true, ApplyQueryType.SNACK_BAR); SwitchPreferenceCompat speakSpeedCamera = (SwitchPreferenceCompat) findPreference(settings.SPEAK_SPEED_CAMERA.getId()); if (speakSpeedCamera != null) { speakSpeedCamera.setChecked(true); @@ -267,13 +269,7 @@ public class VoiceAnnouncesFragment extends BaseSettingsFragment { startActivity(intent); return false; } else if (newValue instanceof String) { - if (VOICE_PROVIDER_NOT_USE.equals(newValue)) { - onApplyPreference(settings.VOICE_MUTE.getId(), true, ApplyQueryType.SNACK_BAR); - updateToolbar(); -// setupPreferences(); //TODO doesn't need anymore - } - onApplyPreference(settings.VOICE_PROVIDER.getId(), newValue, ApplyQueryType.SNACK_BAR); - app.initVoiceCommandPlayer(getActivity(), selectedMode, false, null, true, false, false); + onConfirmPreferenceChange(settings.VOICE_PROVIDER.getId(), newValue, ApplyQueryType.SNACK_BAR); } return true; } @@ -282,10 +278,29 @@ public class VoiceAnnouncesFragment extends BaseSettingsFragment { confirmSpeedCamerasDlg(); return false; } else { - return onApplyPreference(settings.SPEAK_SPEED_CAMERA.getId(), false, ApplyQueryType.SNACK_BAR); + return onConfirmPreferenceChange( + settings.SPEAK_SPEED_CAMERA.getId(), false, ApplyQueryType.SNACK_BAR); } } if (prefId.equals(settings.AUDIO_MANAGER_STREAM.getId())) { + return onConfirmPreferenceChange( + settings.AUDIO_MANAGER_STREAM.getId(), newValue, ApplyQueryType.SNACK_BAR); + } + + return super.onPreferenceChange(preference, newValue); + } + + @Override + public void onApplyPreferenceChange(String prefId, boolean appliedToAllProfiles, Object newValue) { + if (prefId.equals(settings.VOICE_PROVIDER.getId()) && newValue instanceof String) { + if (VOICE_PROVIDER_NOT_USE.equals(newValue)) { + super.onApplyPreferenceChange(settings.VOICE_MUTE.getId(), appliedToAllProfiles, true); + updateToolbar(); + } + super.onApplyPreferenceChange(settings.VOICE_PROVIDER.getId(), appliedToAllProfiles, newValue); + app.initVoiceCommandPlayer(getActivity(), getSelectedAppMode(), + false, null, true, false, appliedToAllProfiles); + } else if (prefId.equals(settings.AUDIO_MANAGER_STREAM.getId())) { // Sync DEFAULT value with CAR value, as we have other way to set it for now if (getSelectedAppMode().equals(ApplicationMode.CAR) && newValue instanceof Integer) { @@ -294,10 +309,8 @@ public class VoiceAnnouncesFragment extends BaseSettingsFragment { settings.AUDIO_MANAGER_STREAM.setModeValue(ApplicationMode.DEFAULT, settings.AUDIO_MANAGER_STREAM.getModeValue(ApplicationMode.CAR)); } settings.AUDIO_USAGE.setModeValue(ApplicationMode.DEFAULT, settings.AUDIO_USAGE.getModeValue(ApplicationMode.CAR)); - - return true; + } else { + super.onApplyPreferenceChange(prefId, appliedToAllProfiles, newValue); } - - return super.onPreferenceChange(preference, newValue); } } \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/settings/bottomsheets/BasePreferenceBottomSheet.java b/OsmAnd/src/net/osmand/plus/settings/bottomsheets/BasePreferenceBottomSheet.java index 43e8af27f4..eafd13ab15 100644 --- a/OsmAnd/src/net/osmand/plus/settings/bottomsheets/BasePreferenceBottomSheet.java +++ b/OsmAnd/src/net/osmand/plus/settings/bottomsheets/BasePreferenceBottomSheet.java @@ -11,6 +11,7 @@ import androidx.preference.Preference; import net.osmand.plus.ApplicationMode; import net.osmand.plus.OsmandApplication; import net.osmand.plus.base.MenuBottomSheetDialogFragment; +import net.osmand.plus.settings.ApplyQueryType; import java.util.List; @@ -18,12 +19,14 @@ public abstract class BasePreferenceBottomSheet extends MenuBottomSheetDialogFra public static final String PREFERENCE_ID = "preference_id"; private static final String APP_MODE_KEY = "app_mode_key"; + private static final String APPLY_QUERY_TYPE = "apply_query_type"; private static final String PROFILE_DEPENDENT = "profile_dependent"; private String prefId; private Preference preference; private ApplicationMode appMode; private boolean profileDependent; + private ApplyQueryType applyQueryType; public void setAppMode(ApplicationMode appMode) { this.appMode = appMode; @@ -38,6 +41,7 @@ public abstract class BasePreferenceBottomSheet extends MenuBottomSheetDialogFra super.onCreate(savedInstanceState); if (savedInstanceState != null) { appMode = ApplicationMode.valueOfStringKey(savedInstanceState.getString(APP_MODE_KEY), null); + applyQueryType = ApplyQueryType.valueOf(savedInstanceState.getString(APPLY_QUERY_TYPE)); profileDependent = savedInstanceState.getBoolean(PROFILE_DEPENDENT, false); } } @@ -49,6 +53,9 @@ public abstract class BasePreferenceBottomSheet extends MenuBottomSheetDialogFra if (appMode != null) { outState.putString(APP_MODE_KEY, appMode.getStringKey()); } + if (applyQueryType != null) { + outState.putString(APPLY_QUERY_TYPE, applyQueryType.name()); + } } @Override @@ -107,4 +114,12 @@ public abstract class BasePreferenceBottomSheet extends MenuBottomSheetDialogFra public boolean isProfileDependent() { return profileDependent; } + + public void setApplyQueryType(ApplyQueryType applyQueryType) { + this.applyQueryType = applyQueryType; + } + + public ApplyQueryType getApplyQueryType() { + return applyQueryType != null ? applyQueryType : ApplyQueryType.NONE; + } } diff --git a/OsmAnd/src/net/osmand/plus/settings/bottomsheets/BooleanPreferenceBottomSheet.java b/OsmAnd/src/net/osmand/plus/settings/bottomsheets/BooleanPreferenceBottomSheet.java index 1aba6eb3df..ac74317461 100644 --- a/OsmAnd/src/net/osmand/plus/settings/bottomsheets/BooleanPreferenceBottomSheet.java +++ b/OsmAnd/src/net/osmand/plus/settings/bottomsheets/BooleanPreferenceBottomSheet.java @@ -24,6 +24,8 @@ import net.osmand.plus.base.bottomsheetmenu.BaseBottomSheetItem; import net.osmand.plus.base.bottomsheetmenu.BottomSheetItemWithCompoundButton; import net.osmand.plus.base.bottomsheetmenu.BottomSheetItemWithDescription; import net.osmand.plus.base.bottomsheetmenu.simpleitems.TitleItem; +import net.osmand.plus.settings.ApplyQueryType; +import net.osmand.plus.settings.OnConfirmPreferenceChange; import net.osmand.plus.settings.OnPreferenceChanged; import net.osmand.plus.settings.preferences.SwitchPreferenceEx; @@ -74,16 +76,25 @@ public class BooleanPreferenceBottomSheet extends BasePreferenceBottomSheet { @Override public void onClick(View v) { boolean newValue = !pref.getModeValue(getAppMode()); - if (switchPreference.callChangeListener(newValue)) { - switchPreference.setChecked(newValue); - preferenceBtn[0].setTitle(newValue ? on : off); - preferenceBtn[0].setChecked(newValue); - preferenceBtn[0].setTitleColorId(newValue ? activeColor : disabledColor); - updateCustomButtonView(v, newValue); + Fragment targetFragment = getTargetFragment(); + if (targetFragment instanceof OnConfirmPreferenceChange) { + ApplyQueryType applyQueryType = getApplyQueryType(); + if (applyQueryType == ApplyQueryType.SNACK_BAR) { + applyQueryType = ApplyQueryType.NONE; + } + OnConfirmPreferenceChange confirmationInterface = + (OnConfirmPreferenceChange) targetFragment; + if (confirmationInterface.onConfirmPreferenceChange( + switchPreference.getKey(), newValue, applyQueryType)) { + switchPreference.setChecked(newValue); + preferenceBtn[0].setTitle(newValue ? on : off); + preferenceBtn[0].setChecked(newValue); + preferenceBtn[0].setTitleColorId(newValue ? activeColor : disabledColor); + updateCustomButtonView(v, newValue); - Fragment target = getTargetFragment(); - if (target instanceof OnPreferenceChanged) { - ((OnPreferenceChanged) target).onPreferenceChanged(switchPreference.getKey()); + if (targetFragment instanceof OnPreferenceChanged) { + ((OnPreferenceChanged) targetFragment).onPreferenceChanged(switchPreference.getKey()); + } } } } @@ -145,7 +156,8 @@ public class BooleanPreferenceBottomSheet extends BasePreferenceBottomSheet { } public static void showInstance(@NonNull FragmentManager fm, String prefId, Fragment target, boolean usedOnMap, - @Nullable ApplicationMode appMode, boolean profileDependent) { + @Nullable ApplicationMode appMode, ApplyQueryType applyQueryType, + boolean profileDependent) { try { if (fm.findFragmentByTag(BooleanPreferenceBottomSheet.TAG) == null) { Bundle args = new Bundle(); @@ -155,6 +167,7 @@ public class BooleanPreferenceBottomSheet extends BasePreferenceBottomSheet { fragment.setArguments(args); fragment.setUsedOnMap(usedOnMap); fragment.setAppMode(appMode); + fragment.setApplyQueryType(applyQueryType); fragment.setTargetFragment(target, 0); fragment.setProfileDependent(profileDependent); fragment.show(fm, BooleanPreferenceBottomSheet.TAG); diff --git a/OsmAnd/src/net/osmand/plus/settings/bottomsheets/RecalculateRouteInDeviationBottomSheet.java b/OsmAnd/src/net/osmand/plus/settings/bottomsheets/RecalculateRouteInDeviationBottomSheet.java index d7be43df22..b2bf5fe7bc 100644 --- a/OsmAnd/src/net/osmand/plus/settings/bottomsheets/RecalculateRouteInDeviationBottomSheet.java +++ b/OsmAnd/src/net/osmand/plus/settings/bottomsheets/RecalculateRouteInDeviationBottomSheet.java @@ -27,8 +27,7 @@ import net.osmand.plus.base.bottomsheetmenu.simpleitems.SubtitmeListDividerItem; import net.osmand.plus.base.bottomsheetmenu.simpleitems.TitleItem; import net.osmand.plus.routing.RoutingHelper; import net.osmand.plus.settings.ApplyQueryType; -import net.osmand.plus.settings.OnApplyPreference; -import net.osmand.plus.settings.OnPreferenceChanged; +import net.osmand.plus.settings.OnConfirmPreferenceChange; import net.osmand.plus.settings.preferences.SwitchPreferenceEx; import static net.osmand.plus.settings.RouteParametersFragment.DEFAULT_MODE; @@ -121,11 +120,8 @@ public class RecalculateRouteInDeviationBottomSheet extends BooleanPreferenceBot updateCustomButtonView(v, enabled); Fragment target = getTargetFragment(); float newValue = enabled ? DEFAULT_MODE : DISABLE_MODE; - if (target instanceof OnApplyPreference) { - ((OnApplyPreference) target).onApplyPreference(switchPref.getKey(), newValue, ApplyQueryType.NONE); - } - if (target instanceof OnPreferenceChanged) { - ((OnPreferenceChanged) target).onPreferenceChanged(switchPref.getKey()); + if (target instanceof OnConfirmPreferenceChange) { + ((OnConfirmPreferenceChange) target).onConfirmPreferenceChange(switchPref.getKey(), newValue, ApplyQueryType.NONE); } } }) @@ -157,11 +153,9 @@ public class RecalculateRouteInDeviationBottomSheet extends BooleanPreferenceBot protected void onRightBottomButtonClick() { if (enabled && sliderPositionChanged) { Fragment target = getTargetFragment(); - if (target instanceof OnApplyPreference) { - ((OnApplyPreference) target).onApplyPreference(preference.getId(), currentValue, ApplyQueryType.SNACK_BAR); - } - if (target instanceof OnPreferenceChanged) { - ((OnPreferenceChanged) target).onPreferenceChanged(preference.getId()); + if (target instanceof OnConfirmPreferenceChange) { + ((OnConfirmPreferenceChange) target).onConfirmPreferenceChange( + preference.getId(), currentValue, ApplyQueryType.SNACK_BAR); } } dismiss(); From ba7d1fa7e746d538c7af3e93c66e66f3b1b859c7 Mon Sep 17 00:00:00 2001 From: Nazar-Kutz Date: Thu, 9 Apr 2020 19:13:21 +0300 Subject: [PATCH 130/202] Show SnackBar when preference change p.3 --- .../GeneralProfileSettingsFragment.java | 39 +++++++++++++------ .../ChangeGeneralProfilesPrefBottomSheet.java | 1 + 2 files changed, 28 insertions(+), 12 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/settings/GeneralProfileSettingsFragment.java b/OsmAnd/src/net/osmand/plus/settings/GeneralProfileSettingsFragment.java index 777171a05e..6f31f70e4b 100644 --- a/OsmAnd/src/net/osmand/plus/settings/GeneralProfileSettingsFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/GeneralProfileSettingsFragment.java @@ -319,18 +319,7 @@ public class GeneralProfileSettingsFragment extends BaseSettingsFragment impleme b.setAdapter(singleChoiceAdapter, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { - ApplicationMode selectedMode = getSelectedAppMode(); - if (drs.get(which) == null) { - settings.DRIVING_REGION_AUTOMATIC.setModeValue(selectedMode, true); - MapViewTrackingUtilities mapViewTrackingUtilities = getMyApplication().getMapViewTrackingUtilities(); - if (mapViewTrackingUtilities != null) { - mapViewTrackingUtilities.resetDrivingRegionUpdate(); - } - } else { - settings.DRIVING_REGION_AUTOMATIC.setModeValue(selectedMode, false); - settings.DRIVING_REGION.setModeValue(selectedMode, drs.get(which)); - } - updateAllSettings(); + onConfirmPreferenceChange(settings.DRIVING_REGION.getId(), drs.get(which), ApplyQueryType.BOTTOM_SHEET); } }); @@ -338,6 +327,32 @@ public class GeneralProfileSettingsFragment extends BaseSettingsFragment impleme b.show(); } + @Override + public void onApplyPreferenceChange(String prefId, boolean appliedToAllProfiles, Object newValue) { + if (settings.DRIVING_REGION.getId().equals(prefId)) { + ApplicationMode selectedMode = getSelectedAppMode(); + if (newValue == null) { + super.onApplyPreferenceChange(settings.DRIVING_REGION_AUTOMATIC.getId(), appliedToAllProfiles, true); + MapViewTrackingUtilities mapViewTrackingUtilities = getMyApplication().getMapViewTrackingUtilities(); + if (mapViewTrackingUtilities != null) { + mapViewTrackingUtilities.resetDrivingRegionUpdate(); + } + } else if (newValue instanceof OsmandSettings.DrivingRegion) { + super.onApplyPreferenceChange(settings.DRIVING_REGION_AUTOMATIC.getId(), appliedToAllProfiles, false); + if (appliedToAllProfiles) { + for (ApplicationMode appMode : ApplicationMode.allPossibleValues()) { + settings.DRIVING_REGION.setModeValue(appMode, (OsmandSettings.DrivingRegion) newValue); + } + } else { + settings.DRIVING_REGION.setModeValue(selectedMode, (OsmandSettings.DrivingRegion) newValue); + } + } + updateAllSettings(); + } else { + super.onApplyPreferenceChange(prefId, appliedToAllProfiles, newValue); + } + } + @Override public boolean onPreferenceClick(Preference preference) { if (preference.getKey().equals(settings.DRIVING_REGION.getId())) { diff --git a/OsmAnd/src/net/osmand/plus/settings/bottomsheets/ChangeGeneralProfilesPrefBottomSheet.java b/OsmAnd/src/net/osmand/plus/settings/bottomsheets/ChangeGeneralProfilesPrefBottomSheet.java index 5f28621ef1..e34d6f2784 100644 --- a/OsmAnd/src/net/osmand/plus/settings/bottomsheets/ChangeGeneralProfilesPrefBottomSheet.java +++ b/OsmAnd/src/net/osmand/plus/settings/bottomsheets/ChangeGeneralProfilesPrefBottomSheet.java @@ -111,6 +111,7 @@ public class ChangeGeneralProfilesPrefBottomSheet extends BasePreferenceBottomSh if (target != null) { if (!discard) { target.onSettingApplied(getPrefId(), appliedToAllProfiles); + target.onApplyPreferenceChange(getPrefId(), appliedToAllProfiles, newValue); } target.updateSetting(getPrefId()); if (!discard) { From bdaadda18dc44ae38c5c26c7a9d40e152d643794 Mon Sep 17 00:00:00 2001 From: Dima-1 Date: Thu, 9 Apr 2020 19:31:49 +0300 Subject: [PATCH 131/202] Fix base profile name scroll appearance --- OsmAnd/res/layout/preference_dropdown_list.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OsmAnd/res/layout/preference_dropdown_list.xml b/OsmAnd/res/layout/preference_dropdown_list.xml index 78e57317f9..391c25d08a 100644 --- a/OsmAnd/res/layout/preference_dropdown_list.xml +++ b/OsmAnd/res/layout/preference_dropdown_list.xml @@ -29,7 +29,8 @@ @@ -40,6 +41,7 @@ android:layout_height="wrap_content" android:focusable="false" android:maxLines="1" + android:scrollbars="none" tools:text="Car" /> From b7e42c1646fefe84f7d0d3ef6cba18e507523e7f Mon Sep 17 00:00:00 2001 From: Nazar-Kutz Date: Fri, 10 Apr 2020 10:05:36 +0300 Subject: [PATCH 132/202] Show SnackBar when preference change p.4 --- .../MonitoringSettingsFragment.java | 38 +++++-------------- .../plus/settings/BaseSettingsFragment.java | 15 ++++++-- .../GeneralProfileSettingsFragment.java | 12 +++--- .../settings/MapDuringNavigationFragment.java | 12 +++--- .../plus/settings/NavigationFragment.java | 6 +-- .../settings/RouteParametersFragment.java | 14 +++---- .../plus/settings/VoiceAnnouncesFragment.java | 10 ++--- .../ChangeGeneralProfilesPrefBottomSheet.java | 7 +--- 8 files changed, 47 insertions(+), 67 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/monitoring/MonitoringSettingsFragment.java b/OsmAnd/src/net/osmand/plus/monitoring/MonitoringSettingsFragment.java index baa1301e7f..512d42aab7 100644 --- a/OsmAnd/src/net/osmand/plus/monitoring/MonitoringSettingsFragment.java +++ b/OsmAnd/src/net/osmand/plus/monitoring/MonitoringSettingsFragment.java @@ -21,7 +21,6 @@ import net.osmand.plus.myplaces.FavoritesActivity; import net.osmand.plus.profiles.SelectCopyAppModeBottomSheet; import net.osmand.plus.profiles.SelectCopyAppModeBottomSheet.CopyAppModePrefsListener; import net.osmand.plus.settings.BaseSettingsFragment; -import net.osmand.plus.settings.bottomsheets.ChangeGeneralProfilesPrefBottomSheet; import net.osmand.plus.settings.bottomsheets.ResetProfilePrefsBottomSheet; import net.osmand.plus.settings.bottomsheets.ResetProfilePrefsBottomSheet.ResetAppModePrefsListener; import net.osmand.plus.settings.bottomsheets.SingleSelectPreferenceBottomSheet; @@ -29,7 +28,6 @@ import net.osmand.plus.settings.preferences.ListPreferenceEx; import net.osmand.plus.settings.preferences.SwitchPreferenceEx; import net.osmand.plus.widgets.style.CustomTypefaceSpan; -import java.io.Serializable; import java.util.HashMap; import java.util.LinkedHashMap; @@ -288,25 +286,19 @@ public class MonitoringSettingsFragment extends BaseSettingsFragment } @Override - public boolean onPreferenceChange(Preference preference, Object newValue) { - String prefId = preference.getKey(); - - OsmandSettings.OsmandPreference pref = settings.getPreference(prefId); + public void onApplyPreferenceChange(String prefId, boolean applyToAllProfiles, Object newValue) { if (SAVE_GLOBAL_TRACK_INTERVAL.equals(prefId)) { + OsmandSettings.OsmandPreference pref = settings.getPreference(prefId); if (newValue instanceof Boolean) { - prefId = settings.SAVE_GLOBAL_TRACK_REMEMBER.getId(); - newValue = Boolean.FALSE; - } - if (pref instanceof OsmandSettings.CommonPreference && !((OsmandSettings.CommonPreference) pref).hasDefaultValueForMode(getSelectedAppMode())) { - FragmentManager fragmentManager = getFragmentManager(); - if (fragmentManager != null && newValue instanceof Serializable) { - ChangeGeneralProfilesPrefBottomSheet.showInstance(fragmentManager, prefId, - (Serializable) newValue, this, false, getSelectedAppMode()); - } - return false; + applyPreference(settings.SAVE_GLOBAL_TRACK_REMEMBER.getId(), applyToAllProfiles, false); + } else if (pref instanceof OsmandSettings.CommonPreference + && !((OsmandSettings.CommonPreference) pref).hasDefaultValueForMode(getSelectedAppMode())) { + applyPreference(SAVE_GLOBAL_TRACK_INTERVAL, applyToAllProfiles, newValue); + applyPreference(settings.SAVE_GLOBAL_TRACK_REMEMBER.getId(), applyToAllProfiles, true); } + } else { + super.onApplyPreferenceChange(prefId, applyToAllProfiles, newValue); } - return super.onPreferenceChange(preference, newValue); } @Override @@ -343,16 +335,4 @@ public class MonitoringSettingsFragment extends BaseSettingsFragment updateAllSettings(); } } - - @Override - public void onSettingApplied(String prefId, boolean appliedToAllProfiles) { - if (settings.SAVE_GLOBAL_TRACK_INTERVAL.getId().equals(prefId)) { - if (appliedToAllProfiles) { - app.getSettings().setPreferenceForAllModes(settings.SAVE_GLOBAL_TRACK_REMEMBER.getId(), true); - } else { - app.getSettings().setPreference(settings.SAVE_GLOBAL_TRACK_REMEMBER.getId(), true, getSelectedAppMode()); - } - - } - } } \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/settings/BaseSettingsFragment.java b/OsmAnd/src/net/osmand/plus/settings/BaseSettingsFragment.java index 2a51a5a835..24b71b7e4b 100644 --- a/OsmAnd/src/net/osmand/plus/settings/BaseSettingsFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/BaseSettingsFragment.java @@ -47,6 +47,7 @@ import androidx.preference.TwoStatePreference; import androidx.recyclerview.widget.RecyclerView; import com.google.android.material.appbar.AppBarLayout; +import com.google.android.material.snackbar.BaseTransientBottomBar; import com.google.android.material.snackbar.Snackbar; import net.osmand.AndroidUtils; @@ -318,7 +319,7 @@ public abstract class BaseSettingsFragment extends PreferenceFragmentCompat impl } @Override - public boolean onConfirmPreferenceChange(String prefId, Object newValue, ApplyQueryType applyQueryType) { + public final boolean onConfirmPreferenceChange(String prefId, Object newValue, ApplyQueryType applyQueryType) { if (applyQueryType != null && newValue instanceof Serializable) { OsmandSettings.OsmandPreference pref = settings.getPreference(prefId); if (pref instanceof CommonPreference) { @@ -605,11 +606,12 @@ public abstract class BaseSettingsFragment extends PreferenceFragmentCompat impl updateAllSettings(); } - public void onSettingApplied(String prefId, boolean appliedToAllProfiles) { + public void onApplyPreferenceChange(String prefId, boolean applyToAllProfiles, Object newValue) { + applyPreference(prefId, applyToAllProfiles, newValue); } - public void onApplyPreferenceChange(String prefId, boolean appliedToAllProfiles, Object newValue) { - if (appliedToAllProfiles) { + protected final void applyPreference(String prefId, boolean applyToAllProfiles, Object newValue) { + if (applyToAllProfiles) { app.getSettings().setPreferenceForAllModes(prefId, newValue); } else { app.getSettings().setPreference(prefId, newValue, getSelectedAppMode()); @@ -922,6 +924,11 @@ public abstract class BaseSettingsFragment extends PreferenceFragmentCompat impl } }); UiUtilities.setupSnackbarVerticalLayout(snackbar); + try { + snackbar.setAnimationMode(BaseTransientBottomBar.ANIMATION_MODE_FADE); + } catch (Throwable e) { + + } snackbar.show(); } } diff --git a/OsmAnd/src/net/osmand/plus/settings/GeneralProfileSettingsFragment.java b/OsmAnd/src/net/osmand/plus/settings/GeneralProfileSettingsFragment.java index 6f31f70e4b..afb4b9856c 100644 --- a/OsmAnd/src/net/osmand/plus/settings/GeneralProfileSettingsFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/GeneralProfileSettingsFragment.java @@ -328,18 +328,18 @@ public class GeneralProfileSettingsFragment extends BaseSettingsFragment impleme } @Override - public void onApplyPreferenceChange(String prefId, boolean appliedToAllProfiles, Object newValue) { + public void onApplyPreferenceChange(String prefId, boolean applyToAllProfiles, Object newValue) { if (settings.DRIVING_REGION.getId().equals(prefId)) { ApplicationMode selectedMode = getSelectedAppMode(); if (newValue == null) { - super.onApplyPreferenceChange(settings.DRIVING_REGION_AUTOMATIC.getId(), appliedToAllProfiles, true); - MapViewTrackingUtilities mapViewTrackingUtilities = getMyApplication().getMapViewTrackingUtilities(); + applyPreference(settings.DRIVING_REGION_AUTOMATIC.getId(), applyToAllProfiles, true); + MapViewTrackingUtilities mapViewTrackingUtilities = requireMyApplication().getMapViewTrackingUtilities(); if (mapViewTrackingUtilities != null) { mapViewTrackingUtilities.resetDrivingRegionUpdate(); } } else if (newValue instanceof OsmandSettings.DrivingRegion) { - super.onApplyPreferenceChange(settings.DRIVING_REGION_AUTOMATIC.getId(), appliedToAllProfiles, false); - if (appliedToAllProfiles) { + applyPreference(settings.DRIVING_REGION_AUTOMATIC.getId(), applyToAllProfiles, false); + if (applyToAllProfiles) { for (ApplicationMode appMode : ApplicationMode.allPossibleValues()) { settings.DRIVING_REGION.setModeValue(appMode, (OsmandSettings.DrivingRegion) newValue); } @@ -349,7 +349,7 @@ public class GeneralProfileSettingsFragment extends BaseSettingsFragment impleme } updateAllSettings(); } else { - super.onApplyPreferenceChange(prefId, appliedToAllProfiles, newValue); + applyPreference(prefId, applyToAllProfiles, newValue); } } diff --git a/OsmAnd/src/net/osmand/plus/settings/MapDuringNavigationFragment.java b/OsmAnd/src/net/osmand/plus/settings/MapDuringNavigationFragment.java index 1176f7281f..94e1afd4c9 100644 --- a/OsmAnd/src/net/osmand/plus/settings/MapDuringNavigationFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/MapDuringNavigationFragment.java @@ -108,20 +108,20 @@ public class MapDuringNavigationFragment extends BaseSettingsFragment { } @Override - public void onApplyPreferenceChange(String prefId, boolean appliedToAllProfiles, Object newValue) { + public void onApplyPreferenceChange(String prefId, boolean applyToAllProfiles, Object newValue) { if (settings.AUTO_ZOOM_MAP.getId().equals(prefId)) { if (newValue instanceof Integer) { int position = (int) newValue; if (position == 0) { - super.onApplyPreferenceChange(settings.AUTO_ZOOM_MAP.getId(), appliedToAllProfiles, false); + applyPreference(settings.AUTO_ZOOM_MAP.getId(), applyToAllProfiles, false); } else { - super.onApplyPreferenceChange(settings.AUTO_ZOOM_MAP.getId(), appliedToAllProfiles, true); - super.onApplyPreferenceChange(settings.AUTO_ZOOM_MAP_SCALE.getId(), - appliedToAllProfiles, OsmandSettings.AutoZoomMap.values()[position - 1]); + applyPreference(settings.AUTO_ZOOM_MAP.getId(), applyToAllProfiles, true); + applyPreference(settings.AUTO_ZOOM_MAP_SCALE.getId(), + applyToAllProfiles, OsmandSettings.AutoZoomMap.values()[position - 1]); } } } else { - super.onApplyPreferenceChange(prefId, appliedToAllProfiles, newValue); + super.onApplyPreferenceChange(prefId, applyToAllProfiles, newValue); } } } \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/settings/NavigationFragment.java b/OsmAnd/src/net/osmand/plus/settings/NavigationFragment.java index 42bb1061a5..30d2d64805 100644 --- a/OsmAnd/src/net/osmand/plus/settings/NavigationFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/NavigationFragment.java @@ -92,12 +92,12 @@ public class NavigationFragment extends BaseSettingsFragment { } @Override - public void onApplyPreferenceChange(String prefId, boolean appliedToAllProfiles, Object newValue) { + public void onApplyPreferenceChange(String prefId, boolean applyToAllProfiles, Object newValue) { if (settings.VOICE_MUTE.getId().equals(prefId) && newValue instanceof Boolean) { - super.onApplyPreferenceChange(prefId, appliedToAllProfiles, !(Boolean) newValue); + applyPreference(prefId, applyToAllProfiles, !(Boolean) newValue); updateMenu(); } else { - super.onApplyPreferenceChange(prefId, appliedToAllProfiles, newValue); + applyPreference(prefId, applyToAllProfiles, newValue); } } diff --git a/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java b/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java index 567813db51..17c3e63f67 100644 --- a/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java @@ -411,7 +411,7 @@ public class RouteParametersFragment extends BaseSettingsFragment implements OnP } @Override - public void onApplyPreferenceChange(String prefId, boolean appliedToAllProfiles, Object newValue) { + public void onApplyPreferenceChange(String prefId, boolean applyToAllProfiles, Object newValue) { if ((RELIEF_SMOOTHNESS_FACTOR.equals(prefId) || DRIVING_STYLE.equals(prefId)) && newValue instanceof String) { ApplicationMode appMode = getSelectedAppMode(); String selectedParameterId = (String) newValue; @@ -422,11 +422,7 @@ public class RouteParametersFragment extends BaseSettingsFragment implements OnP } recalculateRoute(); } else if (ROUTING_SHORT_WAY.equals(prefId) && newValue instanceof Boolean) { - if (appliedToAllProfiles) { - settings.setPreferenceForAllModes(settings.FAST_ROUTE_MODE.getId(), !(Boolean) newValue); - } else { - settings.setPreference(settings.FAST_ROUTE_MODE.getId(), !(Boolean) newValue, getSelectedAppMode()); - } + applyPreference(settings.FAST_ROUTE_MODE.getId(), applyToAllProfiles, !(Boolean) newValue); } else if (ROUTING_RECALC_DISTANCE.equals(prefId)) { boolean enabled = false; float valueToSave = DISABLE_MODE; @@ -437,11 +433,11 @@ public class RouteParametersFragment extends BaseSettingsFragment implements OnP valueToSave = (float) newValue; enabled = valueToSave != DISABLE_MODE; } - super.onApplyPreferenceChange(ROUTING_RECALC_DISTANCE, appliedToAllProfiles, valueToSave); - super.onApplyPreferenceChange(settings.DISABLE_OFFROUTE_RECALC.getId(), appliedToAllProfiles, !enabled); + applyPreference(ROUTING_RECALC_DISTANCE, applyToAllProfiles, valueToSave); + applyPreference(settings.DISABLE_OFFROUTE_RECALC.getId(), applyToAllProfiles, !enabled); updateRouteRecalcDistancePref(); } else { - super.onApplyPreferenceChange(prefId, appliedToAllProfiles, newValue); + super.onApplyPreferenceChange(prefId, applyToAllProfiles, newValue); } } diff --git a/OsmAnd/src/net/osmand/plus/settings/VoiceAnnouncesFragment.java b/OsmAnd/src/net/osmand/plus/settings/VoiceAnnouncesFragment.java index 634b9115e5..fb02fc5160 100644 --- a/OsmAnd/src/net/osmand/plus/settings/VoiceAnnouncesFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/VoiceAnnouncesFragment.java @@ -291,15 +291,15 @@ public class VoiceAnnouncesFragment extends BaseSettingsFragment { } @Override - public void onApplyPreferenceChange(String prefId, boolean appliedToAllProfiles, Object newValue) { + public void onApplyPreferenceChange(String prefId, boolean applyToAllProfiles, Object newValue) { if (prefId.equals(settings.VOICE_PROVIDER.getId()) && newValue instanceof String) { if (VOICE_PROVIDER_NOT_USE.equals(newValue)) { - super.onApplyPreferenceChange(settings.VOICE_MUTE.getId(), appliedToAllProfiles, true); + applyPreference(settings.VOICE_MUTE.getId(), applyToAllProfiles, true); updateToolbar(); } - super.onApplyPreferenceChange(settings.VOICE_PROVIDER.getId(), appliedToAllProfiles, newValue); + applyPreference(settings.VOICE_PROVIDER.getId(), applyToAllProfiles, newValue); app.initVoiceCommandPlayer(getActivity(), getSelectedAppMode(), - false, null, true, false, appliedToAllProfiles); + false, null, true, false, applyToAllProfiles); } else if (prefId.equals(settings.AUDIO_MANAGER_STREAM.getId())) { // Sync DEFAULT value with CAR value, as we have other way to set it for now @@ -310,7 +310,7 @@ public class VoiceAnnouncesFragment extends BaseSettingsFragment { } settings.AUDIO_USAGE.setModeValue(ApplicationMode.DEFAULT, settings.AUDIO_USAGE.getModeValue(ApplicationMode.CAR)); } else { - super.onApplyPreferenceChange(prefId, appliedToAllProfiles, newValue); + super.onApplyPreferenceChange(prefId, applyToAllProfiles, newValue); } } } \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/settings/bottomsheets/ChangeGeneralProfilesPrefBottomSheet.java b/OsmAnd/src/net/osmand/plus/settings/bottomsheets/ChangeGeneralProfilesPrefBottomSheet.java index e34d6f2784..7fe34e0025 100644 --- a/OsmAnd/src/net/osmand/plus/settings/bottomsheets/ChangeGeneralProfilesPrefBottomSheet.java +++ b/OsmAnd/src/net/osmand/plus/settings/bottomsheets/ChangeGeneralProfilesPrefBottomSheet.java @@ -55,7 +55,6 @@ public class ChangeGeneralProfilesPrefBottomSheet extends BasePreferenceBottomSh .setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { - app.getSettings().setPreferenceForAllModes(prefId, newValue); updateTargetSettings(false, true); dismiss(); } @@ -72,7 +71,6 @@ public class ChangeGeneralProfilesPrefBottomSheet extends BasePreferenceBottomSh .setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { - app.getSettings().setPreference(prefId, newValue, getAppMode()); updateTargetSettings(false, false); dismiss(); } @@ -106,12 +104,11 @@ public class ChangeGeneralProfilesPrefBottomSheet extends BasePreferenceBottomSh outState.putSerializable(NEW_VALUE_KEY, newValue); } - private void updateTargetSettings(boolean discard, boolean appliedToAllProfiles) { + private void updateTargetSettings(boolean discard, boolean applyToAllProfiles) { BaseSettingsFragment target = (BaseSettingsFragment) getTargetFragment(); if (target != null) { if (!discard) { - target.onSettingApplied(getPrefId(), appliedToAllProfiles); - target.onApplyPreferenceChange(getPrefId(), appliedToAllProfiles, newValue); + target.onApplyPreferenceChange(getPrefId(), applyToAllProfiles, newValue); } target.updateSetting(getPrefId()); if (!discard) { From f6280afc26cb52ba36e81161e428b44f09c17126 Mon Sep 17 00:00:00 2001 From: veliymolfar Date: Fri, 10 Apr 2020 11:00:19 +0300 Subject: [PATCH 133/202] wip --- .../plus/activities/MapActivityActions.java | 12 +++--------- .../plus/mapcontextmenu/MapContextMenu.java | 2 +- .../mapcontextmenu/MapContextMenuFragment.java | 18 ++++++++++-------- 3 files changed, 14 insertions(+), 18 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java index 597ce3984a..88b67354e0 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java @@ -64,7 +64,7 @@ import net.osmand.plus.routepreparationmenu.WaypointsFragment; import net.osmand.plus.routing.RouteProvider.GPXRouteParamsBuilder; import net.osmand.plus.routing.RoutingHelper; import net.osmand.plus.settings.BaseSettingsFragment; -import net.osmand.plus.settings.ConfigureMenuRootFragment.ScreenType; +import net.osmand.plus.mapcontextmenu.AdditionalActionsBottomSheetDialogFragment.ContextMenuItemClickListener; import net.osmand.plus.views.BaseMapLayer; import net.osmand.plus.views.MapControlsLayer; import net.osmand.plus.views.MapTileLayer; @@ -434,18 +434,12 @@ public class MapActivityActions implements DialogProvider { .createItem()); adapter.sortItemsByOrder(); - - } public void contextMenuPoint(final double latitude, final double longitude, final ContextMenuAdapter iadapter, Object selectedObj) { final ContextMenuAdapter adapter = iadapter == null ? new ContextMenuAdapter() : iadapter; addActionsToAdapter(latitude, longitude, adapter, selectedObj, false); - - - AdditionalActionsBottomSheetDialogFragment actionsBottomSheetDialogFragment = new AdditionalActionsBottomSheetDialogFragment(); - actionsBottomSheetDialogFragment.setAdapter(adapter, getListener(latitude, longitude, adapter)); - actionsBottomSheetDialogFragment.show(mapActivity.getSupportFragmentManager(), AdditionalActionsBottomSheetDialogFragment.TAG); + showAdditionalActionsFragment(adapter, getContextMenuItemClickListener(latitude, longitude, adapter)); } public void showAdditionalActionsFragment(final ContextMenuAdapter adapter, AdditionalActionsBottomSheetDialogFragment.ContextMenuItemClickListener listener) { @@ -454,7 +448,7 @@ public class MapActivityActions implements DialogProvider { actionsBottomSheetDialogFragment.show(mapActivity.getSupportFragmentManager(), AdditionalActionsBottomSheetDialogFragment.TAG); } - public AdditionalActionsBottomSheetDialogFragment.ContextMenuItemClickListener getListener(final double latitude, final double longitude, final ContextMenuAdapter adapter) { + public ContextMenuItemClickListener getContextMenuItemClickListener(final double latitude, final double longitude, final ContextMenuAdapter adapter) { final ArrayAdapter listAdapter = adapter.createListAdapter(mapActivity, getMyApplication().getSettings().isLightContent()); diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenu.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenu.java index 43d67dc087..31899617ff 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenu.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenu.java @@ -1092,7 +1092,7 @@ public class MapContextMenu extends MenuTitleController implements StateChangedL MapActivity mapActivity = getMapActivity(); if (mapActivity != null) { LatLon latLon = getLatLon(); - return mapActivity.getMapActions().getListener(latLon.getLatitude(), latLon.getLatitude(), menuAdapter); + return mapActivity.getMapActions().getContextMenuItemClickListener(latLon.getLatitude(), latLon.getLatitude(), menuAdapter); } return null; } diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenuFragment.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenuFragment.java index fc0f0a353d..49ee6bba55 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenuFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenuFragment.java @@ -566,7 +566,6 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo // Action buttons ContextMenuAdapter adapter = menu.getActionsContextMenuAdapter(false); - ContextMenuItemClickListener listener = menu.getContextMenuItemClickListener(adapter); adapter.initItemsCustomOrder(requireMyApplication()); List items = adapter.getItems(); List main = new ArrayList<>(); @@ -585,7 +584,7 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo ); buttons.removeAllViews(); for (int i = 0; i < main.size(); i++) { - buttons.addView(getActionView(main.get(i), listener, i, adapter, additional), params); + buttons.addView(getActionView(main.get(i), i, adapter, additional,main), params); } buttons.setGravity(Gravity.CENTER); @@ -701,10 +700,10 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo } private View getActionView(ContextMenuItem contextMenuItem, - final ContextMenuItemClickListener listener, final int position, final ContextMenuAdapter adapter, - List additional) { + List additional, + List main) { UiUtilities uiUtilities = requireMyApplication().getUIUtilities(); LayoutInflater inflater = UiUtilities.getInflater(getMyApplication(), nightMode); View view = inflater.inflate(R.layout.context_menu_action_item, null); @@ -713,20 +712,23 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo TextView title = view.findViewById(R.id.text); icon.setImageDrawable(uiUtilities.getIcon(contextMenuItem.getIcon(), nightMode)); title.setText(contextMenuItem.getTitle()); - + adapter.updateItems(main); + final ContextMenuItemClickListener l = menu.getContextMenuItemClickListener(adapter); if (contextMenuItem.getId().equals(MAP_CONTEXT_MENU_MORE_ID)) { - adapter.updateItems(additional); + final ContextMenuAdapter aditionalAdapter = adapter; + aditionalAdapter.updateItems(additional); + final ContextMenuItemClickListener listener = menu.getContextMenuItemClickListener(aditionalAdapter); item.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { - menu.showAdditionalActionsFragment(adapter, listener); + menu.showAdditionalActionsFragment(aditionalAdapter, listener); } }); } else { item.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { - listener.onItemClick(position); + l.onItemClick(position); } }); } From 1e3056cc4acc77e94afb8d7956f05cd5ab1db504 Mon Sep 17 00:00:00 2001 From: veliymolfar Date: Fri, 10 Apr 2020 11:29:19 +0300 Subject: [PATCH 134/202] fix icon margin / checkBox unselected color --- .../plus/settings/ExportImportSettingsAdapter.java | 10 ++++++++-- .../plus/settings/ImportedSettingsItemsAdapter.java | 1 - 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/settings/ExportImportSettingsAdapter.java b/OsmAnd/src/net/osmand/plus/settings/ExportImportSettingsAdapter.java index c90b9cb990..509fb394b7 100644 --- a/OsmAnd/src/net/osmand/plus/settings/ExportImportSettingsAdapter.java +++ b/OsmAnd/src/net/osmand/plus/settings/ExportImportSettingsAdapter.java @@ -55,6 +55,7 @@ class ExportImportSettingsAdapter extends OsmandBaseExpandableListAdapter { private boolean nightMode; private boolean importState; private int activeColorRes; + private int secondaryColorRes; ExportImportSettingsAdapter(OsmandApplication app, boolean nightMode, boolean importState) { this.app = app; @@ -68,6 +69,9 @@ class ExportImportSettingsAdapter extends OsmandBaseExpandableListAdapter { activeColorRes = nightMode ? R.color.icon_color_active_dark : R.color.icon_color_active_light; + secondaryColorRes = nightMode + ? R.color.icon_color_secondary_dark + : R.color.icon_color_secondary_light; } @Override @@ -94,7 +98,6 @@ class ExportImportSettingsAdapter extends OsmandBaseExpandableListAdapter { lineDivider.setVisibility(importState || isExpanded || isLastGroup ? View.GONE : View.VISIBLE); cardTopDivider.setVisibility(importState ? View.VISIBLE : View.GONE); cardBottomDivider.setVisibility(importState && !isExpanded ? View.VISIBLE : View.GONE); - CompoundButtonCompat.setButtonTintList(checkBox, ColorStateList.valueOf(ContextCompat.getColor(app, activeColorRes))); final List listItems = itemsMap.get(type); subTextTv.setText(getSelectedItemsAmount(listItems)); @@ -111,6 +114,8 @@ class ExportImportSettingsAdapter extends OsmandBaseExpandableListAdapter { } checkBox.setState(contains ? MISC : UNCHECKED); } + int checkBoxColor = checkBox.getState() == UNCHECKED ? secondaryColorRes : activeColorRes; + CompoundButtonCompat.setButtonTintList(checkBox, ColorStateList.valueOf(ContextCompat.getColor(app, checkBoxColor))); checkBoxContainer.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { @@ -153,7 +158,8 @@ class ExportImportSettingsAdapter extends OsmandBaseExpandableListAdapter { lineDivider.setVisibility(!importState && isLastChild && !isLastGroup ? View.VISIBLE : View.GONE); cardBottomDivider.setVisibility(importState && isLastChild ? View.VISIBLE : View.GONE); - CompoundButtonCompat.setButtonTintList(checkBox, ColorStateList.valueOf(ContextCompat.getColor(app, activeColorRes))); + int checkBoxColor = itemSelected ? activeColorRes : secondaryColorRes; + CompoundButtonCompat.setButtonTintList(checkBox, ColorStateList.valueOf(ContextCompat.getColor(app, checkBoxColor))); checkBox.setChecked(itemSelected); checkBox.setClickable(false); diff --git a/OsmAnd/src/net/osmand/plus/settings/ImportedSettingsItemsAdapter.java b/OsmAnd/src/net/osmand/plus/settings/ImportedSettingsItemsAdapter.java index 3dd0e4102c..dcb86fa87c 100644 --- a/OsmAnd/src/net/osmand/plus/settings/ImportedSettingsItemsAdapter.java +++ b/OsmAnd/src/net/osmand/plus/settings/ImportedSettingsItemsAdapter.java @@ -60,7 +60,6 @@ public class ImportedSettingsItemsAdapter extends ? R.color.active_color_primary_dark : R.color.active_color_primary_light; - holder.icon.setPadding(0, 0, AndroidUtils.dpToPx(app, 16), 0); holder.title.setTextColor(app.getResources().getColor(activeColorRes)); Typeface typeface = FontCache.getFont(app, app.getString(R.string.font_roboto_medium)); if (typeface != null) { From 9655500ea998d66d3b61dfdb9f67e376e5960b9e Mon Sep 17 00:00:00 2001 From: veliymolfar Date: Fri, 10 Apr 2020 12:54:57 +0300 Subject: [PATCH 135/202] slope/hillshade fixes --- OsmAnd/res/drawable/btn_bg_border_inactive.xml | 2 +- OsmAnd/res/values/attrs.xml | 1 + OsmAnd/res/values/styles.xml | 2 ++ OsmAnd/src/net/osmand/plus/srtmplugin/SRTMPlugin.java | 4 ++++ OsmAnd/src/net/osmand/plus/srtmplugin/TerrainFragment.java | 6 +++--- 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/OsmAnd/res/drawable/btn_bg_border_inactive.xml b/OsmAnd/res/drawable/btn_bg_border_inactive.xml index 844747ac35..dcf60ef7ed 100644 --- a/OsmAnd/res/drawable/btn_bg_border_inactive.xml +++ b/OsmAnd/res/drawable/btn_bg_border_inactive.xml @@ -4,7 +4,7 @@ - + \ No newline at end of file diff --git a/OsmAnd/res/values/attrs.xml b/OsmAnd/res/values/attrs.xml index 750eb1993a..048cd83aca 100644 --- a/OsmAnd/res/values/attrs.xml +++ b/OsmAnd/res/values/attrs.xml @@ -34,6 +34,7 @@ + diff --git a/OsmAnd/res/values/styles.xml b/OsmAnd/res/values/styles.xml index cea274876b..8fea939e8f 100644 --- a/OsmAnd/res/values/styles.xml +++ b/OsmAnd/res/values/styles.xml @@ -277,6 +277,7 @@ @color/list_background_color_light @color/list_background_color_light @style/OsmandPreferenceTheme + @color/stroked_buttons_and_links_outline_light