COORDS_INPUT_USE_RIGHT_SIDE = new BooleanPreference("coords_input_use_right_side", true).makeGlobal();
diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleDialogFragment.java b/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleDialogFragment.java
index 6edf4e53fa..fd5b3c0a00 100644
--- a/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleDialogFragment.java
+++ b/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleDialogFragment.java
@@ -119,6 +119,7 @@ public class WikivoyageArticleDialogFragment extends WikivoyageBaseDialogFragmen
contentWebView = (WebView) mainView.findViewById(R.id.content_web_view);
contentWebView.getSettings().setJavaScriptEnabled(true);
+ contentWebView.getSettings().setLoadsImagesAutomatically(getSettings().WIKIVOYAGE_SHOW_IMAGES.get());
return mainView;
}
@@ -229,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)) {
- String url = WikivoyageArticle.getImageUrl(articleTitle, false);
+ String imageTitle = article.getImageTitle();
+ if (!TextUtils.isEmpty(imageTitle) && getSettings().WIKIVOYAGE_SHOW_IMAGES.get()) {
+ String url = WikivoyageArticle.getImageUrl(imageTitle, false);
sb.append("");
}
sb.append("\n");
diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/SavedArticlesRvAdapter.java b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/SavedArticlesRvAdapter.java
index b4391c4169..461530c97d 100644
--- a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/SavedArticlesRvAdapter.java
+++ b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/SavedArticlesRvAdapter.java
@@ -76,21 +76,24 @@ public class SavedArticlesRvAdapter extends RecyclerView.Adapter showImagesPref = app.getSettings().WIKIVOYAGE_SHOW_IMAGES;
+
+ items.add(new TitleItem(getString(R.string.shared_string_options)));
+
+ BaseBottomSheetItem showImagesItem = new BottomSheetItemWithCompoundButton.Builder()
+ .setChecked(showImagesPref.get())
+ .setIcon(getContentIcon(R.drawable.ic_type_img))
+ .setTitle(getString(R.string.show_images))
+ .setLayoutId(R.layout.bottom_sheet_item_with_switch)
+ .setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ showImagesPref.set(!showImagesPref.get());
+ dismiss();
+ }
+ })
+ .create();
+ items.add(showImagesItem);
+
+ BaseBottomSheetItem clearCacheItem = new BottomSheetItemWithDescription.Builder()
+ .setDescription(getString(R.string.shared_string_clear))
+ .setTitle(getString(R.string.images_cache) + ": ???") // TODO : show images cache size
+ .setLayoutId(R.layout.bottom_sheet_item_with_right_descr)
+ .setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ // TODO : implement clearing of cache
+ Toast.makeText(getContext(), "Currently in development", Toast.LENGTH_SHORT).show();
+ }
+ })
+ .create();
+ items.add(clearCacheItem);
+
+ items.add(new DividerHalfItem(getContext()));
+
+ BaseBottomSheetItem clearHistoryItem = new SimpleBottomSheetItem.Builder()
+ .setIcon(getContentIcon(R.drawable.ic_action_history))
+ .setTitle(getString(R.string.delete_search_history))
+ .setLayoutId(R.layout.bottom_sheet_item_simple)
+ .setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ WikivoyageLocalDataHelper.getInstance(app).clearHistory();
+ dismiss();
+ }
+ })
+ .create();
+ items.add(clearHistoryItem);
+ }
+}
diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/search/SearchRecyclerViewAdapter.java b/OsmAnd/src/net/osmand/plus/wikivoyage/search/SearchRecyclerViewAdapter.java
index a3f2b5679f..f182249b16 100644
--- a/OsmAnd/src/net/osmand/plus/wikivoyage/search/SearchRecyclerViewAdapter.java
+++ b/OsmAnd/src/net/osmand/plus/wikivoyage/search/SearchRecyclerViewAdapter.java
@@ -74,7 +74,8 @@ public class SearchRecyclerViewAdapter extends RecyclerView.Adapter