From a67b47d7171a1e9db7938e5aae10a570bfd34c92 Mon Sep 17 00:00:00 2001 From: Alex Sytnyk Date: Thu, 3 May 2018 19:50:32 +0300 Subject: [PATCH 01/14] Add TravelNeededMapsCard and related stuff --- OsmAnd/res/layout/travel_needed_map_item.xml | 1 + OsmAnd/res/layout/travel_needed_maps_card.xml | 5 +- OsmAnd/res/values/strings.xml | 2 +- .../wikivoyage/explore/ExploreRvAdapter.java | 46 +++++++-- .../explore/ExploreTabFragment.java | 8 ++ .../travelcards/TravelDownloadUpdateCard.java | 2 +- .../travelcards/TravelNeededMapsCard.java | 96 +++++++++++++++++++ 7 files changed, 146 insertions(+), 14 deletions(-) create mode 100644 OsmAnd/src/net/osmand/plus/wikivoyage/explore/travelcards/TravelNeededMapsCard.java diff --git a/OsmAnd/res/layout/travel_needed_map_item.xml b/OsmAnd/res/layout/travel_needed_map_item.xml index 796217baa0..2f7860f4cd 100644 --- a/OsmAnd/res/layout/travel_needed_map_item.xml +++ b/OsmAnd/res/layout/travel_needed_map_item.xml @@ -76,6 +76,7 @@ + osmand:typeface="@string/font_roboto_regular"/> diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index a2d845e36b..97c2b1d22f 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -12,7 +12,7 @@ You have cancel OsmAnd Live subscription Renew subscription to continue use the all features: - You read articles: %1$s. Based on this, we suggest you download these maps: + Based on the articles you saved, we recommend you to download following maps: Maps you need OsmAnd team Popular destinations diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreRvAdapter.java b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreRvAdapter.java index 99b00c9f99..e1ffdc77a3 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreRvAdapter.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreRvAdapter.java @@ -19,13 +19,16 @@ import net.osmand.plus.wikivoyage.explore.travelcards.StartEditingTravelCard; import net.osmand.plus.wikivoyage.explore.travelcards.StartEditingTravelCard.StartEditingTravelVH; import net.osmand.plus.wikivoyage.explore.travelcards.TravelDownloadUpdateCard; import net.osmand.plus.wikivoyage.explore.travelcards.TravelDownloadUpdateCard.DownloadUpdateVH; +import net.osmand.plus.wikivoyage.explore.travelcards.TravelNeededMapsCard; +import net.osmand.plus.wikivoyage.explore.travelcards.TravelNeededMapsCard.NeededMapsVH; import java.util.ArrayList; import java.util.List; public class ExploreRvAdapter extends RecyclerView.Adapter { - private static final int DOWNLOAD_UPDATE_CARD_POSITION = 0; + private static final int FIRST_POSITION = 0; + private static final int SECOND_POSITION = 1; private final List items = new ArrayList<>(); @@ -48,6 +51,9 @@ public class ExploreRvAdapter extends RecyclerView.Adapter DOWNLOAD_UPDATE_CARD_POSITION) { - BaseTravelCard card = getItem(DOWNLOAD_UPDATE_CARD_POSITION); - if (card.getCardType() == TravelDownloadUpdateCard.TYPE) { - removeItem(DOWNLOAD_UPDATE_CARD_POSITION); - notifyItemRemoved(DOWNLOAD_UPDATE_CARD_POSITION); - } + int pos = getDownloadUpdateCardPosition(); + if (downloadUpdateCardExists(pos)) { + removeItem(pos); + notifyItemRemoved(pos); } } + + private int getDownloadUpdateCardPosition() { + return FIRST_POSITION; + } + + private boolean downloadUpdateCardExists(int position) { + return items.size() > position && items.get(position).getCardType() == TravelDownloadUpdateCard.TYPE; + } } diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreTabFragment.java b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreTabFragment.java index 746e4e116c..19dd01e526 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreTabFragment.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreTabFragment.java @@ -34,6 +34,7 @@ import net.osmand.plus.wikivoyage.explore.travelcards.HeaderTravelCard; import net.osmand.plus.wikivoyage.explore.travelcards.OpenBetaTravelCard; import net.osmand.plus.wikivoyage.explore.travelcards.StartEditingTravelCard; import net.osmand.plus.wikivoyage.explore.travelcards.TravelDownloadUpdateCard; +import net.osmand.plus.wikivoyage.explore.travelcards.TravelNeededMapsCard; import java.io.File; import java.io.IOException; @@ -153,6 +154,7 @@ public class ExploreTabFragment extends BaseOsmAndFragment implements DownloadIn this.mainIndexItem = mainIndexItem; this.neededIndexItems = neededIndexItems; addDownloadUpdateCard(); + addNeededMapsCard(); } private void addDownloadUpdateCard() { @@ -209,6 +211,12 @@ public class ExploreTabFragment extends BaseOsmAndFragment implements DownloadIn } } + private void addNeededMapsCard() { + if (!neededIndexItems.isEmpty()) { + adapter.setNeededMapsCard(new TravelNeededMapsCard(getMyApplication(), nightMode, neededIndexItems)); + } + } + @NonNull private String getWikivoyageFileName() { File selectedTravelBook = getMyApplication().getTravelDbHelper().getSelectedTravelBook(); diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/travelcards/TravelDownloadUpdateCard.java b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/travelcards/TravelDownloadUpdateCard.java index b7c1226887..a8b8987727 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/travelcards/TravelDownloadUpdateCard.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/travelcards/TravelDownloadUpdateCard.java @@ -128,7 +128,7 @@ public class TravelDownloadUpdateCard extends BaseTravelCard { @NonNull private String getFileTitle() { - return indexItem == null ? "" : indexItem.getBasename().replace("_", " "); + return indexItem == null ? "" : indexItem.getVisibleName(app, app.getRegions(), false); } @NonNull diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/travelcards/TravelNeededMapsCard.java b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/travelcards/TravelNeededMapsCard.java new file mode 100644 index 0000000000..a987764b76 --- /dev/null +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/travelcards/TravelNeededMapsCard.java @@ -0,0 +1,96 @@ +package net.osmand.plus.wikivoyage.explore.travelcards; + +import android.graphics.drawable.Drawable; +import android.support.annotation.NonNull; +import android.support.v7.widget.RecyclerView; +import android.view.LayoutInflater; +import android.view.View; +import android.widget.ImageView; +import android.widget.LinearLayout; +import android.widget.TextView; + +import net.osmand.plus.OsmandApplication; +import net.osmand.plus.R; +import net.osmand.plus.download.IndexItem; + +import java.util.List; + +public class TravelNeededMapsCard extends BaseTravelCard { + + public static final int TYPE = 70; + + private List items; + + private Drawable downloadIcon; + + public TravelNeededMapsCard(OsmandApplication app, boolean nightMode, List items) { + super(app, nightMode); + this.items = items; + downloadIcon = getActiveIcon(R.drawable.ic_action_import); + } + + @Override + public void bindViewHolder(@NonNull RecyclerView.ViewHolder viewHolder) { + if (viewHolder instanceof NeededMapsVH) { + NeededMapsVH holder = (NeededMapsVH) viewHolder; + adjustChildCount(holder.itemsContainer); + for (int i = 0; i < items.size(); i++) { + boolean lastItem = i == items.size() - 1; + IndexItem item = items.get(i); + View view = holder.itemsContainer.getChildAt(i); + ((ImageView) view.findViewById(R.id.icon)) + .setImageDrawable(getActiveIcon(item.getType().getIconResource())); + ((TextView) view.findViewById(R.id.title)).setText(item.getVisibleName(app, app.getRegions(), false)); + ((TextView) view.findViewById(R.id.description)).setText(getItemDescription(item)); + ((ImageView) view.findViewById(R.id.icon_action)).setImageDrawable(downloadIcon); + view.findViewById(R.id.divider).setVisibility(lastItem ? View.GONE : View.VISIBLE); + } + } + } + + @Override + public int getCardType() { + return TYPE; + } + + private void adjustChildCount(LinearLayout itemsContainer) { + int itemsCount = items.size(); + int childCount = itemsContainer.getChildCount(); + if (itemsCount == childCount) { + return; + } + if (itemsCount > childCount) { + LayoutInflater inflater = LayoutInflater.from(itemsContainer.getContext()); + for (int i = childCount; i < itemsCount; i++) { + inflater.inflate(R.layout.travel_needed_map_item, itemsContainer); + } + } else if (itemsCount < childCount) { + itemsContainer.removeViews(0, childCount - itemsCount); + } + } + + private String getItemDescription(IndexItem item) { + return app.getString(R.string.file_size_in_mb, item.getArchiveSizeMB()) + " • " + item.getType().getString(app); + } + + public static class NeededMapsVH extends RecyclerView.ViewHolder { + + final LinearLayout itemsContainer; + final View secondaryBtnContainer; + final TextView secondaryBtn; + final View buttonsDivider; + final View primaryBtnContainer; + final TextView primaryButton; + + @SuppressWarnings("RedundantCast") + public NeededMapsVH(View itemView) { + super(itemView); + itemsContainer = (LinearLayout) itemView.findViewById(R.id.items_container); + secondaryBtnContainer = itemView.findViewById(R.id.secondary_btn_container); + secondaryBtn = (TextView) itemView.findViewById(R.id.secondary_button); + buttonsDivider = itemView.findViewById(R.id.buttons_divider); + primaryBtnContainer = itemView.findViewById(R.id.primary_btn_container); + primaryButton = (TextView) itemView.findViewById(R.id.primary_button); + } + } +} From b3c4a40899f4e939e188fed2e3b1e42eecbc27f6 Mon Sep 17 00:00:00 2001 From: PaulStets Date: Fri, 4 May 2018 10:17:57 +0300 Subject: [PATCH 02/14] Fixed an issue with incorrect dialog in cologne --- .../osmand/plus/wikivoyage/WikivoyageWebViewClient.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/WikivoyageWebViewClient.java b/OsmAnd/src/net/osmand/plus/wikivoyage/WikivoyageWebViewClient.java index f10c962121..62e8b5b167 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/WikivoyageWebViewClient.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/WikivoyageWebViewClient.java @@ -80,7 +80,8 @@ public class WikivoyageWebViewClient extends WebViewClient implements RegionCall @Override public boolean shouldOverrideUrlLoading(WebView view, String url) { - if (url.contains(WIKIVOAYAGE_DOMAIN)) { + boolean isWebPage = url.startsWith(PAGE_PREFIX_HTTP) || url.startsWith(PAGE_PREFIX_HTTPS); + if (url.contains(WIKIVOAYAGE_DOMAIN) && isWebPage) { String lang = getLang(url); String articleName = getArticleNameFromUrl(url, lang); long articleId = app.getTravelDbHelper().getArticleId(articleName, lang); @@ -90,11 +91,11 @@ public class WikivoyageWebViewClient extends WebViewClient implements RegionCall warnAboutExternalLoad(url, context, nightMode); } return true; - } else if (url.contains(WIKI_DOMAIN)) { + } else if (url.contains(WIKI_DOMAIN) && isWebPage) { String lang = getLang(url); String articleName = getArticleNameFromUrl(url, lang); getWikiArticle(articleName, lang, url); - } else if (url.startsWith(PAGE_PREFIX_HTTP) || url.startsWith(PAGE_PREFIX_HTTPS)) { + } else if (isWebPage) { warnAboutExternalLoad(url, context, nightMode); } else if (url.startsWith(PREFIX_GEO)) { if (article != null) { From 2e55393c4f1728ddefd23e4502e0cf613389fdc2 Mon Sep 17 00:00:00 2001 From: Chumva Date: Fri, 4 May 2018 11:26:07 +0300 Subject: [PATCH 03/14] added sort languages for wikivoyage popupMenu --- .../wikivoyage/article/WikivoyageArticleDialogFragment.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleDialogFragment.java b/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleDialogFragment.java index 98cd31fe51..cf2411006e 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleDialogFragment.java @@ -253,7 +253,8 @@ public class WikivoyageArticleDialogFragment extends WikiArticleBaseDialogFragme for (String n : langs) { names.put(n, FileNameTranslationHelper.getVoiceName(getContext(), n)); } - for (final Map.Entry e : names.entrySet()) { + Map sortedNames = AndroidUtils.sortByValue(names); + for (final Map.Entry e : sortedNames.entrySet()) { final String lang = e.getValue(); final String langKey = e.getKey(); MenuItem item = popup.getMenu().add(lang); From 00c57563cb3d9e2f9766e1852b13a906ad18e467 Mon Sep 17 00:00:00 2001 From: PaulStets Date: Fri, 4 May 2018 12:15:31 +0300 Subject: [PATCH 04/14] Fix the domains --- .../src/net/osmand/plus/wikivoyage/WikivoyageWebViewClient.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/WikivoyageWebViewClient.java b/OsmAnd/src/net/osmand/plus/wikivoyage/WikivoyageWebViewClient.java index 62e8b5b167..6e2ba7207a 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/WikivoyageWebViewClient.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/WikivoyageWebViewClient.java @@ -65,7 +65,7 @@ public class WikivoyageWebViewClient extends WebViewClient implements RegionCall private static final String PREFIX_GEO = "geo:"; private static final String PAGE_PREFIX_HTTP = "http://"; private static final String PAGE_PREFIX_HTTPS = "https://"; - private static final String WIKIVOAYAGE_DOMAIN = ".wikivoyage.com/wiki/"; + private static final String WIKIVOAYAGE_DOMAIN = ".wikivoyage.org/wiki/"; private static final String WIKI_DOMAIN = ".wikipedia.org/wiki/"; private FetchWikiRegion fetchRegionTask; private WikiArticleSearchTask articleSearchTask; From 1609233fddc6fe8867f517f755748659e5e5711d Mon Sep 17 00:00:00 2001 From: Chumva Date: Fri, 4 May 2018 12:31:57 +0300 Subject: [PATCH 05/14] added background color to wiki webview --- OsmAnd/res/values/colors.xml | 2 ++ .../src/net/osmand/plus/wikipedia/WikipediaDialogFragment.java | 2 ++ .../wikivoyage/article/WikivoyageArticleDialogFragment.java | 3 +++ 3 files changed, 7 insertions(+) diff --git a/OsmAnd/res/values/colors.xml b/OsmAnd/res/values/colors.xml index e0872ed64c..7f3b8674e5 100644 --- a/OsmAnd/res/values/colors.xml +++ b/OsmAnd/res/values/colors.xml @@ -437,5 +437,7 @@ #727272 #339966 #008bf8 + #ffffff + #17191a \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/wikipedia/WikipediaDialogFragment.java b/OsmAnd/src/net/osmand/plus/wikipedia/WikipediaDialogFragment.java index 1b7fbd4d29..21f492937a 100644 --- a/OsmAnd/src/net/osmand/plus/wikipedia/WikipediaDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/wikipedia/WikipediaDialogFragment.java @@ -106,6 +106,8 @@ public class WikipediaDialogFragment extends WikiArticleBaseDialogFragment { webSettings.setJavaScriptEnabled(true); contentWebView.setWebViewClient(new WikipediaWebViewClient(getActivity(), nightMode)); updateWebSettings(); + contentWebView.setBackgroundColor(ContextCompat.getColor(getMyApplication(), + nightMode ? R.color.wikivoyage_webview_background_dark : R.color.wikivoyage_webview_background_light)); return mainView; } diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleDialogFragment.java b/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleDialogFragment.java index cf2411006e..84181a4163 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleDialogFragment.java @@ -10,6 +10,7 @@ import android.support.annotation.Nullable; import android.support.v4.app.FragmentActivity; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentManager.BackStackEntry; +import android.support.v4.content.ContextCompat; import android.support.v7.widget.PopupMenu; import android.support.v7.widget.Toolbar; import android.text.TextUtils; @@ -159,6 +160,8 @@ public class WikivoyageArticleDialogFragment extends WikiArticleBaseDialogFragme contentWebView.addJavascriptInterface(new WikivoyageArticleWebAppInterface(), "Android"); webViewClient = new WikivoyageWebViewClient(getActivity(), getFragmentManager(), nightMode); contentWebView.setWebViewClient(webViewClient); + contentWebView.setBackgroundColor(ContextCompat.getColor(getMyApplication(), + nightMode ? R.color.wikivoyage_webview_background_dark : R.color.wikivoyage_webview_background_light)); return mainView; } From ee6ab670007ddafb76c8688306373f39dcf1e0e7 Mon Sep 17 00:00:00 2001 From: Chumva Date: Fri, 4 May 2018 12:33:54 +0300 Subject: [PATCH 06/14] renamed wiki webview colors --- OsmAnd/res/values/colors.xml | 5 +++-- .../net/osmand/plus/wikipedia/WikipediaDialogFragment.java | 2 +- .../wikivoyage/article/WikivoyageArticleDialogFragment.java | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/OsmAnd/res/values/colors.xml b/OsmAnd/res/values/colors.xml index 7f3b8674e5..40f3143980 100644 --- a/OsmAnd/res/values/colors.xml +++ b/OsmAnd/res/values/colors.xml @@ -437,7 +437,8 @@ #727272 #339966 #008bf8 - #ffffff - #17191a + + #ffffff + #17191a \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/wikipedia/WikipediaDialogFragment.java b/OsmAnd/src/net/osmand/plus/wikipedia/WikipediaDialogFragment.java index 21f492937a..b4170e1da4 100644 --- a/OsmAnd/src/net/osmand/plus/wikipedia/WikipediaDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/wikipedia/WikipediaDialogFragment.java @@ -107,7 +107,7 @@ public class WikipediaDialogFragment extends WikiArticleBaseDialogFragment { contentWebView.setWebViewClient(new WikipediaWebViewClient(getActivity(), nightMode)); updateWebSettings(); contentWebView.setBackgroundColor(ContextCompat.getColor(getMyApplication(), - nightMode ? R.color.wikivoyage_webview_background_dark : R.color.wikivoyage_webview_background_light)); + nightMode ? R.color.wiki_webview_background_dark : R.color.wiki_webview_background_light)); return mainView; } diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleDialogFragment.java b/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleDialogFragment.java index 84181a4163..a069d938ad 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleDialogFragment.java @@ -161,7 +161,7 @@ public class WikivoyageArticleDialogFragment extends WikiArticleBaseDialogFragme webViewClient = new WikivoyageWebViewClient(getActivity(), getFragmentManager(), nightMode); contentWebView.setWebViewClient(webViewClient); contentWebView.setBackgroundColor(ContextCompat.getColor(getMyApplication(), - nightMode ? R.color.wikivoyage_webview_background_dark : R.color.wikivoyage_webview_background_light)); + nightMode ? R.color.wiki_webview_background_dark : R.color.wiki_webview_background_light)); return mainView; } From 6dd1712cc8ed21d8184849b060611289e19748a4 Mon Sep 17 00:00:00 2001 From: Chumva Date: Fri, 4 May 2018 13:35:24 +0300 Subject: [PATCH 07/14] added show images dialog options for wikipedia --- .../res/layout/wikipedia_dialog_fragment.xml | 9 +++ OsmAnd/res/values/strings.xml | 1 + .../wikipedia/WikipediaDialogFragment.java | 69 ++++++++---------- ...pediaOptionsBottomSheetDialogFragment.java | 70 +++++++++++++++++++ 4 files changed, 110 insertions(+), 39 deletions(-) create mode 100644 OsmAnd/src/net/osmand/plus/wikivoyage/WikipediaOptionsBottomSheetDialogFragment.java diff --git a/OsmAnd/res/layout/wikipedia_dialog_fragment.xml b/OsmAnd/res/layout/wikipedia_dialog_fragment.xml index db6b07919f..8dbb3f31ca 100644 --- a/OsmAnd/res/layout/wikipedia_dialog_fragment.xml +++ b/OsmAnd/res/layout/wikipedia_dialog_fragment.xml @@ -54,6 +54,15 @@ tools:text="En" tools:textColor="?attr/wikivoyage_active_color" /> + + diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index 97c2b1d22f..5c55afa69f 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -9,6 +9,7 @@ 3. All your modified/created strings are in the top of the file (to make easier find what\'s translated). PLEASE: Have a look at http://code.google.com/p/osmand/wiki/UIConsistency, it may really improve your and our work :-) Thx - Hardy --> + Show images You have cancel OsmAnd Live subscription Renew subscription to continue use the all features: diff --git a/OsmAnd/src/net/osmand/plus/wikipedia/WikipediaDialogFragment.java b/OsmAnd/src/net/osmand/plus/wikipedia/WikipediaDialogFragment.java index b4170e1da4..b9fead599f 100644 --- a/OsmAnd/src/net/osmand/plus/wikipedia/WikipediaDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/wikipedia/WikipediaDialogFragment.java @@ -3,6 +3,7 @@ package net.osmand.plus.wikipedia; import android.annotation.SuppressLint; import android.app.Dialog; import android.content.Context; +import android.content.Intent; import android.content.res.ColorStateList; import android.graphics.drawable.Drawable; import android.net.Uri; @@ -10,6 +11,7 @@ import android.os.Bundle; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.customtabs.CustomTabsIntent; +import android.support.v4.app.FragmentManager; import android.support.v4.content.ContextCompat; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.PopupMenu; @@ -17,12 +19,12 @@ import android.support.v7.widget.Toolbar; import android.text.TextUtils; import android.view.Gravity; import android.view.LayoutInflater; -import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; import android.webkit.WebSettings; import android.webkit.WebView; +import android.widget.ImageView; import android.widget.TextView; import net.osmand.AndroidUtils; @@ -30,10 +32,10 @@ import net.osmand.IndexConstants; import net.osmand.data.Amenity; import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandPlugin; -import net.osmand.plus.OsmandSettings; import net.osmand.plus.R; import net.osmand.plus.development.OsmandDevelopmentPlugin; import net.osmand.plus.helpers.FileNameTranslationHelper; +import net.osmand.plus.wikivoyage.WikipediaOptionsBottomSheetDialogFragment; import net.osmand.util.Algorithms; import java.io.File; @@ -47,10 +49,6 @@ public class WikipediaDialogFragment extends WikiArticleBaseDialogFragment { public static final String TAG = "WikipediaDialogFragment"; - private static final int MENU_ITEM_NO_ID = 0; - private static final int MENU_ITEM_SHOW_ID = 1; - private static final int MENU_ITEM_WIFI_ID = 2; - private TextView readFullArticleButton; private Amenity amenity; @@ -75,7 +73,25 @@ public class WikipediaDialogFragment extends WikiArticleBaseDialogFragment { setupToolbar((Toolbar) mainView.findViewById(R.id.toolbar)); articleToolbarText = (TextView) mainView.findViewById(R.id.title_text_view); - + ImageView options = (ImageView) mainView.findViewById(R.id.options_button); + options.setImageDrawable(getIcon(R.drawable.ic_overflow_menu_white, R.color.icon_color)); + options.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + OsmandApplication app = getMyApplication(); + if (app != null) { + FragmentManager fm = getFragmentManager(); + if (fm == null) { + return; + } + WikipediaOptionsBottomSheetDialogFragment fragment = new WikipediaOptionsBottomSheetDialogFragment(); + fragment.setUsedOnMap(false); + fragment.setTargetFragment(WikipediaDialogFragment.this, + WikipediaOptionsBottomSheetDialogFragment.REQUEST_CODE); + fragment.show(fm, WikipediaOptionsBottomSheetDialogFragment.TAG); + } + } + }); ColorStateList buttonColorStateList = AndroidUtils.createPressedColorStateList(getContext(), nightMode, R.color.ctx_menu_controller_button_text_color_light_n, R.color.ctx_menu_controller_button_text_color_light_p, R.color.ctx_menu_controller_button_text_color_dark_n, R.color.ctx_menu_controller_button_text_color_dark_p); @@ -256,37 +272,12 @@ public class WikipediaDialogFragment extends WikiArticleBaseDialogFragment { return showInstance(activity, amenity, null); } - protected void setupToolbar(Toolbar toolbar) { - super.setupToolbar(toolbar); - toolbar.setOverflowIcon(getIcon(R.drawable.ic_overflow_menu_white, R.color.icon_color)); - - Menu menu = toolbar.getMenu(); - MenuItem.OnMenuItemClickListener itemClickListener = new MenuItem.OnMenuItemClickListener() { - @Override - public boolean onMenuItemClick(MenuItem item) { - OsmandApplication app = getMyApplication(); - if (app != null) { - int itemId = item.getItemId(); - if (itemId == MENU_ITEM_SHOW_ID) { - app.getSettings().WIKI_ARTICLE_SHOW_IMAGES.set(OsmandSettings.WikiArticleShowImages.ON); - return true; - } else if (itemId == MENU_ITEM_WIFI_ID) { - app.getSettings().WIKI_ARTICLE_SHOW_IMAGES.set(OsmandSettings.WikiArticleShowImages.WIFI); - return true; - } else if (itemId == MENU_ITEM_NO_ID) { - app.getSettings().WIKI_ARTICLE_SHOW_IMAGES.set(OsmandSettings.WikiArticleShowImages.OFF); - return true; - } - } - return false; - } - }; - - MenuItem itemShow = menu.add(0, MENU_ITEM_SHOW_ID, 0, R.string.shared_string_show); - itemShow.setOnMenuItemClickListener(itemClickListener); - MenuItem itemWifi = menu.add(0, MENU_ITEM_WIFI_ID, 0, R.string.shared_string_only_with_wifi); - itemWifi.setOnMenuItemClickListener(itemClickListener); - MenuItem itemNo = menu.add(0, MENU_ITEM_NO_ID, 0, R.string.shared_string_dont); - itemNo.setOnMenuItemClickListener(itemClickListener); + @Override + public void onActivityResult(int requestCode, int resultCode, Intent data) { + super.onActivityResult(requestCode, resultCode, data); + if (resultCode == WikipediaOptionsBottomSheetDialogFragment.SHOW_PICTURES_CHANGED_REQUEST_CODE) { + updateWebSettings(); + populateArticle(); + } } } diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/WikipediaOptionsBottomSheetDialogFragment.java b/OsmAnd/src/net/osmand/plus/wikivoyage/WikipediaOptionsBottomSheetDialogFragment.java new file mode 100644 index 0000000000..9532b7b57d --- /dev/null +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/WikipediaOptionsBottomSheetDialogFragment.java @@ -0,0 +1,70 @@ +package net.osmand.plus.wikivoyage; + +import android.os.Bundle; +import android.support.v4.app.Fragment; +import android.support.v7.widget.PopupMenu; +import android.view.Gravity; +import android.view.MenuItem; +import android.view.View; + +import net.osmand.plus.OsmandApplication; +import net.osmand.plus.OsmandSettings; +import net.osmand.plus.OsmandSettings.WikiArticleShowImages; +import net.osmand.plus.R; +import net.osmand.plus.base.MenuBottomSheetDialogFragment; +import net.osmand.plus.base.bottomsheetmenu.BaseBottomSheetItem; +import net.osmand.plus.base.bottomsheetmenu.BottomSheetItemWithDescription; +import net.osmand.plus.base.bottomsheetmenu.simpleitems.TitleItem; + + +public class WikipediaOptionsBottomSheetDialogFragment extends MenuBottomSheetDialogFragment { + + public final static String TAG = "WikipediaOptionsBottomSheetDialogFragment"; + + public static final int REQUEST_CODE = 0; + public static final int SHOW_PICTURES_CHANGED_REQUEST_CODE = 1; + + @Override + public void createMenuItems(Bundle savedInstanceState) { + final OsmandApplication app = getMyApplication(); + final OsmandSettings.CommonPreference showImagesPref = app.getSettings().WIKI_ARTICLE_SHOW_IMAGES; + + items.add(new TitleItem(getString(R.string.shared_string_options))); + + BaseBottomSheetItem showImagesItem = new BottomSheetItemWithDescription.Builder() + .setDescription(getString(showImagesPref.get().name)) + .setDescriptionColorId(nightMode ? R.color.wikivoyage_active_dark : R.color.wikivoyage_active_light) + .setIcon(getContentIcon(R.drawable.ic_type_img)) + .setTitle(getString(R.string.download_images)) + .setLayoutId(R.layout.bottom_sheet_item_with_right_descr) + .setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + final PopupMenu popup = new PopupMenu(v.getContext(), v, Gravity.END); + for (final WikiArticleShowImages showImages : WikiArticleShowImages.values()) { + MenuItem item = popup.getMenu().add(getString(showImages.name)); + item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { + @Override + public boolean onMenuItemClick(MenuItem item) { + showImagesPref.set(showImages); + sendResult(); + dismiss(); + return true; + } + }); + } + popup.show(); + } + }) + .create(); + items.add(showImagesItem); + } + + private void sendResult() { + Fragment fragment = getTargetFragment(); + if (fragment != null) { + fragment.onActivityResult(getTargetRequestCode(), SHOW_PICTURES_CHANGED_REQUEST_CODE, null); + } + } +} + From 32a1e729d9a1407e0698c9891689fa650e558201 Mon Sep 17 00:00:00 2001 From: Alex Sytnyk Date: Fri, 4 May 2018 13:38:18 +0300 Subject: [PATCH 08/14] Fix NPE --- .../explore/ExploreTabFragment.java | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreTabFragment.java b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreTabFragment.java index 19dd01e526..9bfc4df848 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreTabFragment.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreTabFragment.java @@ -94,17 +94,19 @@ public class ExploreTabFragment extends BaseOsmAndFragment implements DownloadIn @Override public void downloadHasFinished() { - final OsmandApplication app = getMyApplication(); - File targetFile = mainIndexItem.getTargetFile(app); - if (downloadUpdateCard != null && mainIndexItem != null && targetFile.exists()) { - downloadUpdateCard.setLoadingInProgress(false); - removeDownloadUpdateCard(); - TravelDbHelper travelDbHelper = app.getTravelDbHelper(); - travelDbHelper.initTravelBooks(); - travelDbHelper.selectTravelBook(targetFile); - Fragment parent = getParentFragment(); - if (parent != null && parent instanceof WikivoyageExploreDialogFragment) { - ((WikivoyageExploreDialogFragment) parent).populateData(); + if (mainIndexItem != null) { + final OsmandApplication app = getMyApplication(); + File targetFile = mainIndexItem.getTargetFile(app); + if (downloadUpdateCard != null && targetFile.exists()) { + downloadUpdateCard.setLoadingInProgress(false); + removeDownloadUpdateCard(); + TravelDbHelper travelDbHelper = app.getTravelDbHelper(); + travelDbHelper.initTravelBooks(); + travelDbHelper.selectTravelBook(targetFile); + Fragment parent = getParentFragment(); + if (parent != null && parent instanceof WikivoyageExploreDialogFragment) { + ((WikivoyageExploreDialogFragment) parent).populateData(); + } } } } From abcaaa4bf498fe3ada090f87d3813f5549a82074 Mon Sep 17 00:00:00 2001 From: Dmitriy Prodchenko Date: Fri, 4 May 2018 13:44:24 +0300 Subject: [PATCH 09/14] CSS for Travel and Wikipedia: fix table styles --- OsmAnd/assets/article_style.css | 53 ++++++++++++++++++++++++++------- 1 file changed, 43 insertions(+), 10 deletions(-) diff --git a/OsmAnd/assets/article_style.css b/OsmAnd/assets/article_style.css index db40aa439d..7d32f8d31d 100755 --- a/OsmAnd/assets/article_style.css +++ b/OsmAnd/assets/article_style.css @@ -242,7 +242,8 @@ p { color: var(--main-text-color-night); } -ul, dl { +/* Lists */ +ul, dl, ol { /* font-size: var(--main-text-font-size); */ color: var(--main-text-color-day); font-size: inherit; @@ -259,15 +260,10 @@ li { padding-bottom: 1%; } -.nightmode ul, .nightmode dl { +.nightmode ul, .nightmode dl, .nightmode ol { color: #cccccc; } -.toc { - font-size: var(--main-text-font-size); -} - - img { width: 100%; } @@ -327,10 +323,47 @@ a.geo { text-decoration: none; display: inline-block; } - -td { - display: inline-block; +/* Tables */ +table { + display: block; + overflow-y: scroll; word-wrap: break-word; + color: var(--main-text-color-day); + border: 1px solid var(--divider-color-day); + background: var(--divider-color-day); + margin-left: 0% !important; + margin-right: 0% !important; + margin-bottom: 7% !important; + font-size: inherit; +} + +.nightmode table { + color: var(--main-text-color-night); + border: 1px solid var(--background-color-night); + background: var(--divider-color-night) !important; +} + + +td, tr, th { + border: 1px solid var(--divider-color-day); + color: var(--main-text-color-night); + background: var(--divider-color-day); +} + +.nightmode td, .nightmode tr, .nightmode th { + color: var(--main-text-color-night); + border: 1px solid var(--background-color-night); + background: var(--divider-color-night) !important; +} + +.toc, .toc td, .toc tr { + border: 0px solid; + background: var(--background-color-day); +} + +.nightmode .toc, .toc td, .toc tr { + border: 0px solid; + background: var(--background-color-night) !important; } .thumb-tright, .thumbinner { From 9f8c329e28c8cd9968874d322fd7c3b49a007541 Mon Sep 17 00:00:00 2001 From: Chumva Date: Fri, 4 May 2018 13:48:57 +0300 Subject: [PATCH 10/14] add check for requestCode --- .../src/net/osmand/plus/wikipedia/WikipediaDialogFragment.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/wikipedia/WikipediaDialogFragment.java b/OsmAnd/src/net/osmand/plus/wikipedia/WikipediaDialogFragment.java index b9fead599f..613f71bea4 100644 --- a/OsmAnd/src/net/osmand/plus/wikipedia/WikipediaDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/wikipedia/WikipediaDialogFragment.java @@ -275,7 +275,8 @@ public class WikipediaDialogFragment extends WikiArticleBaseDialogFragment { @Override public void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); - if (resultCode == WikipediaOptionsBottomSheetDialogFragment.SHOW_PICTURES_CHANGED_REQUEST_CODE) { + if (requestCode == WikipediaOptionsBottomSheetDialogFragment.REQUEST_CODE + && resultCode == WikipediaOptionsBottomSheetDialogFragment.SHOW_PICTURES_CHANGED_REQUEST_CODE) { updateWebSettings(); populateArticle(); } From 4ab036bd21f5bfa84bd82f5d3a909a3f32709239 Mon Sep 17 00:00:00 2001 From: Chumva Date: Fri, 4 May 2018 13:53:01 +0300 Subject: [PATCH 11/14] moved WikipediaOptionsBottomSheetDialogFragment to wikipedia package --- .../WikipediaOptionsBottomSheetDialogFragment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename OsmAnd/src/net/osmand/plus/{wikivoyage => wikipedia}/WikipediaOptionsBottomSheetDialogFragment.java (98%) diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/WikipediaOptionsBottomSheetDialogFragment.java b/OsmAnd/src/net/osmand/plus/wikipedia/WikipediaOptionsBottomSheetDialogFragment.java similarity index 98% rename from OsmAnd/src/net/osmand/plus/wikivoyage/WikipediaOptionsBottomSheetDialogFragment.java rename to OsmAnd/src/net/osmand/plus/wikipedia/WikipediaOptionsBottomSheetDialogFragment.java index 9532b7b57d..e2c1e50a38 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/WikipediaOptionsBottomSheetDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/wikipedia/WikipediaOptionsBottomSheetDialogFragment.java @@ -1,4 +1,4 @@ -package net.osmand.plus.wikivoyage; +package net.osmand.plus.wikipedia; import android.os.Bundle; import android.support.v4.app.Fragment; From ac7e56013d8cfee048dc12b31569355e83dda37b Mon Sep 17 00:00:00 2001 From: Chumva Date: Fri, 4 May 2018 13:54:13 +0300 Subject: [PATCH 12/14] removed unnecessary import --- .../src/net/osmand/plus/wikipedia/WikipediaDialogFragment.java | 1 - 1 file changed, 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/wikipedia/WikipediaDialogFragment.java b/OsmAnd/src/net/osmand/plus/wikipedia/WikipediaDialogFragment.java index 613f71bea4..d224c0ced4 100644 --- a/OsmAnd/src/net/osmand/plus/wikipedia/WikipediaDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/wikipedia/WikipediaDialogFragment.java @@ -35,7 +35,6 @@ import net.osmand.plus.OsmandPlugin; import net.osmand.plus.R; import net.osmand.plus.development.OsmandDevelopmentPlugin; import net.osmand.plus.helpers.FileNameTranslationHelper; -import net.osmand.plus.wikivoyage.WikipediaOptionsBottomSheetDialogFragment; import net.osmand.util.Algorithms; import java.io.File; From 03b8977aa5912d04c9a22bfd16d8e1328d999e8f Mon Sep 17 00:00:00 2001 From: Dmitriy Prodchenko Date: Fri, 4 May 2018 17:15:56 +0300 Subject: [PATCH 13/14] Add icon for OsmAnd Live subscription --- .../ic_action_subscription_osmand_live.png | Bin 0 -> 2566 bytes .../ic_action_subscription_osmand_live.png | Bin 0 -> 3556 bytes .../ic_action_subscription_osmand_live.png | Bin 0 -> 4696 bytes 3 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 OsmAnd/res/drawable-hdpi/ic_action_subscription_osmand_live.png create mode 100644 OsmAnd/res/drawable-xhdpi/ic_action_subscription_osmand_live.png create mode 100644 OsmAnd/res/drawable-xxhdpi/ic_action_subscription_osmand_live.png diff --git a/OsmAnd/res/drawable-hdpi/ic_action_subscription_osmand_live.png b/OsmAnd/res/drawable-hdpi/ic_action_subscription_osmand_live.png new file mode 100644 index 0000000000000000000000000000000000000000..9ed159d530099d123acf5bebc7e71aea9398200b GIT binary patch literal 2566 zcmbVOdpK0<8lSXX3Y9Sw)ie!BnlbllRK~a^a@!}Nn9CX_=3-`;A=wm3xg;l4N_!-! zDWp;)Qi&p)L^Va)rRd@oQQ|C>&iSKf|8dsyto420yWZdX{@&a3e90c}PWp3A=RzP5 zeHUk@7r3Ip*IY*n{0?jRAiyH z$nT_l-8>NXA_;&XS(DKm9D$0U(5!JJ8Wm4OA@Eon8H1%^a6~i~N5|6WSRCTVg9N=v zxIDTS)A5Hd@MMb&k;%k#3`Q=OTgwU7B1td?N2Ad&SUd)gM}rz@X_QdLQlN!Wvl$Ca zK+2Ku#WKD~h?us>Vv8bVwn&ia_YeePH@BaLh0-610#k-ju*4XgH5MZfOvm+2TPpJc z{!8PR+ESk=F@W&`q@oB32doFrYz7SG?w=h^D}rq3nu!i3A)T&E~NvXbzD@CQ;b{j!YrX*!dNnNVRihIx-nViaiO3 zbD&c3cmfrNC1a_ejETd|U|ob#8B53kW_Z00Pl6c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Y*1lSG7vR zaO?8O^3B&?x4$v1n*<5>_gQ*EYi~TCuYBI~?xL6sy*0F>^i^`(g^uHW$R~$RIwW`A zqDt=gHv}U$#KCTl>}cqGKU(d#+cF$=V4&hJ7=35&t9k0weK)-;5?bBbp_?_%Mrprfct%eoIA-l1)qh{iG2FEHl}V}E+@*X;b&E53 zAOM+S7~llnc+z!RW4wG2n^wAdE)J^Pka~fw>&hrvF=-eCX}qBJ{ql?yI(;*9ad2mz IX9Vr~4?pBU!2kdN literal 0 HcmV?d00001 diff --git a/OsmAnd/res/drawable-xhdpi/ic_action_subscription_osmand_live.png b/OsmAnd/res/drawable-xhdpi/ic_action_subscription_osmand_live.png new file mode 100644 index 0000000000000000000000000000000000000000..07cc2f82885dab4bcfd4540a5afc7c514cd94c58 GIT binary patch literal 3556 zcmbVPX*iT?A0JC(2`|}(@)(k6%#3BsSff!PLUvMP76!8zW1F(%kZe&=sZf$A$5v6v zk{DaaF_dI0jGbP)aNcoFo%j84uJhr2uIqX3`~Khm-|xSFcoOVvkM9u%3xhzQJ(edh z4&2p<`@(k%aKAPt@QCIFUXtPjC~fW?Ogwh*`ozA%!b zE5p_1qydgf*23=SXoZn!Tr`)^G>nGD`4bp`H^GNQF^0@n)j|Lg-WcMdX9KsP9VPgZ zPB7_&(@a}O9Md0%#zRa^0HZJiE&-Xqzye|907{TSm@(uJUIXraM+}1if2c70jUj(J z7OBxX*M>05mSPGB#N6dSQwTDLukQaWb#g2e`p6W z90>n)<8QTt9K&e@m;)h*8cfG=>p@ic3FhYRpAGFOa=kG)MJI8Kf(^h>alvE)g<**? zhH!7R@Fcu}x30Dhfr!+GqTxgYR96R~4fQ5s^`SUjEK(2UO+X;^kw1C<4zG(cJBB%i z(bv^Ks)s;WpitV{Iw%Aj2}fbfbukFUPpl;+h=HZx2tRF;xVC>_k^hJ_I7%mA8C1F> zl^XD~3+#NU3~G=sl?EI=x>I$1K-~t5BT;sQhjt3}XWSS9ofJaAAEQ&rz#o}5ApMOO zS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D?aDc$w^Q#`ZYT;J-t`LwJUYd^*`VwKsqN4^+qdU?sBE>KOr=|ahIuI<>W zb)5I-TQt9riS;RzkV{fQ8u?_{1<#$Ul0@P56pH9;B84=u{t6|ORAk$%GeKpjs#doL z)aP7=BP7bEQ6hBvaZ4*T=l%uljJUbR_h~LSzkNR(KPJD-5u^6y=-gR2RQ4@8;p?}_ z)E9iVdCxRPm!=fFF5<*lm>coayCQ4ztgb%#AUi!WCA2<&I-dg44Jf6xzOnCh3odbZ zI;E$i*ghHI=U%W^+>o7)0GGe6-17AUU&9UZ?CXxo_Mc4^ODa(m)yXNCxc&Zo#jJQZ zVlHf^%9_hP_wIsIC#mznb&GeGWQrO6`r%S3EsI4UI|@_Vk{cN5De)msj&0$}>y zH2qr=C0!rmD|tOJb3BttT~ft@Bl^B7HT!I6cC_|m<)e9E*lx9mIjF09-!LvJQ5o>O zpZZcppoMXvw#Pr%0g>JH)V>P z>PY%(vv1imM_ztp%Ji2jTE-6C z(PXb9h9lEfz&`HSxl=sxhA^pzDpg*$38j;locx;}!@LqW8p9yFb{tN#DT=%gOwt>3^M_80?$YuKu9h-Ps%GWI71GH;|*j6XPSknlZd` zV#?&>^^HIjWV?r*kOQqO3!24j_lPgO%4j!yP~>Z1n_S|;;<2KU(7V*C{0g0dpa|u<5%U-|&TV zc5Mt<#EDc5i2#fZvaUBq zP^wF}`)o6d#r(%;XZPZ%f5x0Tj!qR78 z?4;>pc`56Y_~lyD1=FzoC!dIctLs6OM=qW~DM84r#UQy83S^m%? T+Zw>mf0w0&EvDG~T+Dv}9)m(- literal 0 HcmV?d00001 diff --git a/OsmAnd/res/drawable-xxhdpi/ic_action_subscription_osmand_live.png b/OsmAnd/res/drawable-xxhdpi/ic_action_subscription_osmand_live.png new file mode 100644 index 0000000000000000000000000000000000000000..58092db4f03b6c8a810564d04689916b4742335d GIT binary patch literal 4696 zcmbVQc{r5o-yg;w{b32?~e{0000%qw^SR z_Ug!f&-3xHzk!dZQ`n0b6>Cqm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387356f3c Mon Sep 17 00:00:00 2001 From: Dmitriy Prodchenko Date: Fri, 4 May 2018 18:45:18 +0300 Subject: [PATCH 14/14] Fix string --- OsmAnd/res/values/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index 5c55afa69f..16218bc7af 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -673,7 +673,7 @@ Do not show my name in reports Support region Month cost - Monthly payment. + Monthly payment Active Inactive Please enter a valid e-mail address