diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index 6ef916f89b..d3f75c56e2 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -9,12 +9,12 @@ 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 --> + Images cache: + Delete search history + Show images Travel maps Wikivoyage Article removed - Images cache - Delete search history - Show images Search: Country, City, Province Read Saved articles diff --git a/OsmAnd/src/net/osmand/plus/OsmandSettings.java b/OsmAnd/src/net/osmand/plus/OsmandSettings.java index 68af0772d2..67ee106e8d 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandSettings.java +++ b/OsmAnd/src/net/osmand/plus/OsmandSettings.java @@ -717,7 +717,7 @@ public class OsmandSettings { public final CommonPreference SHOW_LINES_TO_FIRST_MARKERS = new BooleanPreference("show_lines_to_first_markers", false).makeProfile(); public final CommonPreference SHOW_ARROWS_TO_FIRST_MARKERS = new BooleanPreference("show_arrows_to_first_markers", false).makeProfile(); - public final CommonPreference SHOW_WEBVIEW_IMAGES = new BooleanPreference("show_webview_images", false); + public final CommonPreference SHOW_IMAGES = new BooleanPreference("show_images", false); public final CommonPreference SELECT_MARKER_ON_SINGLE_TAP = new BooleanPreference("select_marker_on_single_tap", false).makeProfile(); diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleDialogFragment.java b/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleDialogFragment.java index 2e5c361d7c..d43f33e78a 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleDialogFragment.java @@ -119,7 +119,7 @@ public class WikivoyageArticleDialogFragment extends WikivoyageBaseDialogFragmen contentWebView = (WebView) mainView.findViewById(R.id.content_web_view); contentWebView.getSettings().setJavaScriptEnabled(true); - contentWebView.getSettings().setLoadsImagesAutomatically(getSettings().SHOW_WEBVIEW_IMAGES.get()); + contentWebView.getSettings().setLoadsImagesAutomatically(getSettings().SHOW_IMAGES.get()); return mainView; } @@ -230,9 +230,9 @@ public class WikivoyageArticleDialogFragment extends WikivoyageBaseDialogFragmen private String createHtmlContent(@NonNull WikivoyageArticle article) { StringBuilder sb = new StringBuilder(HEADER_INNER); - String articleTitle = article.getImageTitle(); - if (!TextUtils.isEmpty(articleTitle)&&!getSettings().SHOW_WEBVIEW_IMAGES.get()) { - String url = WikivoyageArticle.getImageUrl(articleTitle, false); + String articleImageTitle = article.getImageTitle(); + if (!TextUtils.isEmpty(articleImageTitle)&&!getSettings().SHOW_IMAGES.get()) { + String url = WikivoyageArticle.getImageUrl(articleImageTitle, false); sb.append("
"); } sb.append("
\n"); diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/OptionsImagesCasheBottomSheetDialogFragment.java b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/OptionsImagesCacheHistoryBottomSheetDialogFragment.java similarity index 82% rename from OsmAnd/src/net/osmand/plus/wikivoyage/explore/OptionsImagesCasheBottomSheetDialogFragment.java rename to OsmAnd/src/net/osmand/plus/wikivoyage/explore/OptionsImagesCacheHistoryBottomSheetDialogFragment.java index c3661331fe..6bdfa170b8 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/OptionsImagesCasheBottomSheetDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/OptionsImagesCacheHistoryBottomSheetDialogFragment.java @@ -15,7 +15,7 @@ import net.osmand.plus.base.bottomsheetmenu.simpleitems.DividerHalfItem; import net.osmand.plus.base.bottomsheetmenu.simpleitems.TitleItem; import net.osmand.plus.wikivoyage.data.WikivoyageLocalDataHelper; -public class OptionsImagesCasheBottomSheetDialogFragment extends MenuBottomSheetDialogFragment { +public class OptionsImagesCacheHistoryBottomSheetDialogFragment extends MenuBottomSheetDialogFragment { public final static String TAG = "OptionsImagesCasheBottomSheetDialogFragment"; @@ -24,18 +24,18 @@ public class OptionsImagesCasheBottomSheetDialogFragment extends MenuBottomSheet items.add(new TitleItem(getString(R.string.shared_string_options))); - boolean showWebviewImages = getMyApplication().getSettings().SHOW_WEBVIEW_IMAGES.get(); + boolean showImages = getMyApplication().getSettings().SHOW_IMAGES.get(); BaseBottomSheetItem showWebviewImagesItem = new BottomSheetItemWithCompoundButton.Builder() - .setChecked(showWebviewImages) + .setChecked(showImages) .setIcon(getContentIcon(R.drawable.ic_type_img)) - .setTitle(getString(R.string.wikivoyage_show_images)) + .setTitle(getString(R.string.show_images)) .setLayoutId(R.layout.bottom_sheet_item_with_switch) .setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { OsmandSettings settings = getMyApplication().getSettings(); - settings.SHOW_WEBVIEW_IMAGES.set(!settings.SHOW_WEBVIEW_IMAGES.get()); + settings.SHOW_IMAGES.set(!settings.SHOW_IMAGES.get()); dismiss(); } }) @@ -44,7 +44,7 @@ public class OptionsImagesCasheBottomSheetDialogFragment extends MenuBottomSheet BaseBottomSheetItem clearCacheItem = new BottomSheetItemWithDescription.Builder() .setDescription(getString(R.string.shared_string_clear)) - .setTitle(getString(R.string.wikivoyage_images_cache)) + .setTitle(getString(R.string.images_cache)) .setLayoutId(R.layout.bottom_sheet_item_with_right_descr) .setOnClickListener(new View.OnClickListener() { @Override @@ -60,7 +60,7 @@ public class OptionsImagesCasheBottomSheetDialogFragment extends MenuBottomSheet BaseBottomSheetItem clearHistoryItem = new SimpleBottomSheetItem.Builder() .setIcon(getContentIcon(R.drawable.ic_action_history)) - .setTitle(getString(R.string.shared_string_delete_search_history)) + .setTitle(getString(R.string.delete_search_history)) .setLayoutId(R.layout.bottom_sheet_item_simple) .setOnClickListener(new View.OnClickListener() { @Override diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/SavedArticlesRvAdapter.java b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/SavedArticlesRvAdapter.java index 3725d7a0c3..0a69ae34d4 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/SavedArticlesRvAdapter.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/SavedArticlesRvAdapter.java @@ -76,22 +76,24 @@ public class SavedArticlesRvAdapter extends RecyclerView.Adapter