diff --git a/OsmAnd/res/drawable-hdpi/bg_card_shadow_cr3dp.9.png b/OsmAnd/res/drawable-hdpi/bg_card_shadow_cr3dp.9.png new file mode 100644 index 0000000000..5f8a7de98a Binary files /dev/null and b/OsmAnd/res/drawable-hdpi/bg_card_shadow_cr3dp.9.png differ diff --git a/OsmAnd/res/drawable-hdpi/ic_action_contents.png b/OsmAnd/res/drawable-hdpi/ic_action_contents.png new file mode 100644 index 0000000000..50eccae2e4 Binary files /dev/null and b/OsmAnd/res/drawable-hdpi/ic_action_contents.png differ diff --git a/OsmAnd/res/drawable-hdpi/ic_action_list_bullet.png b/OsmAnd/res/drawable-hdpi/ic_action_list_bullet.png new file mode 100644 index 0000000000..d751e56ff6 Binary files /dev/null and b/OsmAnd/res/drawable-hdpi/ic_action_list_bullet.png differ diff --git a/OsmAnd/res/drawable-hdpi/ic_action_list_header.png b/OsmAnd/res/drawable-hdpi/ic_action_list_header.png new file mode 100644 index 0000000000..72896911ae Binary files /dev/null and b/OsmAnd/res/drawable-hdpi/ic_action_list_header.png differ diff --git a/OsmAnd/res/drawable-mdpi/bg_card_shadow_cr3dp.9.png b/OsmAnd/res/drawable-mdpi/bg_card_shadow_cr3dp.9.png new file mode 100644 index 0000000000..9639a463cc Binary files /dev/null and b/OsmAnd/res/drawable-mdpi/bg_card_shadow_cr3dp.9.png differ diff --git a/OsmAnd/res/drawable-mdpi/ic_action_contents.png b/OsmAnd/res/drawable-mdpi/ic_action_contents.png new file mode 100644 index 0000000000..744a0775cf Binary files /dev/null and b/OsmAnd/res/drawable-mdpi/ic_action_contents.png differ diff --git a/OsmAnd/res/drawable-mdpi/ic_action_list_bullet.png b/OsmAnd/res/drawable-mdpi/ic_action_list_bullet.png new file mode 100644 index 0000000000..fe5a72b68a Binary files /dev/null and b/OsmAnd/res/drawable-mdpi/ic_action_list_bullet.png differ diff --git a/OsmAnd/res/drawable-mdpi/ic_action_list_header.png b/OsmAnd/res/drawable-mdpi/ic_action_list_header.png new file mode 100644 index 0000000000..b03c9e3bb5 Binary files /dev/null and b/OsmAnd/res/drawable-mdpi/ic_action_list_header.png differ diff --git a/OsmAnd/res/drawable-xhdpi/bg_card_shadow_cr3dp.9.png b/OsmAnd/res/drawable-xhdpi/bg_card_shadow_cr3dp.9.png new file mode 100644 index 0000000000..f0babad941 Binary files /dev/null and b/OsmAnd/res/drawable-xhdpi/bg_card_shadow_cr3dp.9.png differ diff --git a/OsmAnd/res/drawable-xhdpi/ic_action_contents.png b/OsmAnd/res/drawable-xhdpi/ic_action_contents.png new file mode 100644 index 0000000000..582fbe6b23 Binary files /dev/null and b/OsmAnd/res/drawable-xhdpi/ic_action_contents.png differ diff --git a/OsmAnd/res/drawable-xhdpi/ic_action_list_bullet.png b/OsmAnd/res/drawable-xhdpi/ic_action_list_bullet.png new file mode 100644 index 0000000000..79ea39f036 Binary files /dev/null and b/OsmAnd/res/drawable-xhdpi/ic_action_list_bullet.png differ diff --git a/OsmAnd/res/drawable-xhdpi/ic_action_list_header.png b/OsmAnd/res/drawable-xhdpi/ic_action_list_header.png new file mode 100644 index 0000000000..07880142cb Binary files /dev/null and b/OsmAnd/res/drawable-xhdpi/ic_action_list_header.png differ diff --git a/OsmAnd/res/drawable-xxhdpi/bg_card_shadow_cr3dp.9.png b/OsmAnd/res/drawable-xxhdpi/bg_card_shadow_cr3dp.9.png new file mode 100644 index 0000000000..cb4746d4e6 Binary files /dev/null and b/OsmAnd/res/drawable-xxhdpi/bg_card_shadow_cr3dp.9.png differ diff --git a/OsmAnd/res/drawable-xxhdpi/ic_action_contents.png b/OsmAnd/res/drawable-xxhdpi/ic_action_contents.png new file mode 100644 index 0000000000..469945de25 Binary files /dev/null and b/OsmAnd/res/drawable-xxhdpi/ic_action_contents.png differ diff --git a/OsmAnd/res/drawable-xxhdpi/ic_action_list_bullet.png b/OsmAnd/res/drawable-xxhdpi/ic_action_list_bullet.png new file mode 100644 index 0000000000..034b522bfb Binary files /dev/null and b/OsmAnd/res/drawable-xxhdpi/ic_action_list_bullet.png differ diff --git a/OsmAnd/res/drawable-xxhdpi/ic_action_list_header.png b/OsmAnd/res/drawable-xxhdpi/ic_action_list_header.png new file mode 100644 index 0000000000..89446cd3dd Binary files /dev/null and b/OsmAnd/res/drawable-xxhdpi/ic_action_list_header.png differ diff --git a/OsmAnd/res/drawable/wikivoyage_search_card_bg.xml b/OsmAnd/res/drawable/wikivoyage_search_card_bg.xml new file mode 100644 index 0000000000..de280be397 --- /dev/null +++ b/OsmAnd/res/drawable/wikivoyage_search_card_bg.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/OsmAnd/res/layout/fragment_wikivoyage_article_dialog.xml b/OsmAnd/res/layout/fragment_wikivoyage_article_dialog.xml index 719b003751..5874c973f8 100644 --- a/OsmAnd/res/layout/fragment_wikivoyage_article_dialog.xml +++ b/OsmAnd/res/layout/fragment_wikivoyage_article_dialog.xml @@ -37,7 +37,7 @@ android:layout_marginTop="@dimen/content_padding_small" android:drawablePadding="@dimen/context_menu_padding_margin_small" android:gravity="center_vertical" - android:letterSpacing="0.01" + android:letterSpacing="@dimen/text_button_letter_spacing" android:padding="@dimen/context_menu_padding_margin_tiny" android:textSize="@dimen/default_desc_text_size" osmand:typeface="@string/font_roboto_medium" diff --git a/OsmAnd/res/layout/fragment_wikivoyage_explore_dialog.xml b/OsmAnd/res/layout/fragment_wikivoyage_explore_dialog.xml index 61bf640f91..a86d95c526 100644 --- a/OsmAnd/res/layout/fragment_wikivoyage_explore_dialog.xml +++ b/OsmAnd/res/layout/fragment_wikivoyage_explore_dialog.xml @@ -48,48 +48,60 @@ android:background="?attr/selectableItemBackground" android:ellipsize="end" android:gravity="center_vertical" - android:letterSpacing="0.01" + android:letterSpacing="@dimen/text_button_letter_spacing" android:maxLines="1" android:paddingLeft="16dp" android:paddingRight="16dp" android:text="@string/shared_string_options" android:textColor="?attr/wikivoyage_active_color" android:textSize="@dimen/default_desc_text_size" - osmand:typeface="@string/font_roboto_medium"/> + osmand:typeface="@string/font_roboto_medium" + tools:ignore="UnusedAttribute"/> - + android:layout_height="wrap_content" + android:layout_marginLeft="@dimen/text_margin_small" + android:layout_marginRight="@dimen/text_margin_small" + android:background="@drawable/wikivoyage_search_card_bg"> - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/OsmAnd/res/values-b+hrx/strings.xml b/OsmAnd/res/values-b+hrx/strings.xml new file mode 100644 index 0000000000..ee1c2cc89a --- /dev/null +++ b/OsmAnd/res/values-b+hrx/strings.xml @@ -0,0 +1,3 @@ + + + diff --git a/OsmAnd/res/values-large/sizes.xml b/OsmAnd/res/values-large/sizes.xml index 0f33324d93..ec6927b459 100644 --- a/OsmAnd/res/values-large/sizes.xml +++ b/OsmAnd/res/values-large/sizes.xml @@ -195,4 +195,5 @@ 84dp 54dp + 120dp \ No newline at end of file diff --git a/OsmAnd/res/values/sizes.xml b/OsmAnd/res/values/sizes.xml index 2774de8aab..1d050252d5 100644 --- a/OsmAnd/res/values/sizes.xml +++ b/OsmAnd/res/values/sizes.xml @@ -269,4 +269,7 @@ 56dp 36dp + 80dp + + 0.01 \ No newline at end of file diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index 9b2290aa4b..a4f49887bd 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -9,6 +9,8 @@ 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 --> + Search: Country, City, Province + Read Saved articles Explore Result diff --git a/OsmAnd/src/net/osmand/plus/OsmandSettings.java b/OsmAnd/src/net/osmand/plus/OsmandSettings.java index a631100e19..ea14d27611 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandSettings.java +++ b/OsmAnd/src/net/osmand/plus/OsmandSettings.java @@ -1099,6 +1099,7 @@ public class OsmandSettings { public final OsmandPreference SPEAK_PEDESTRIAN = new BooleanPreference("speak_pedestrian", true).makeProfile().cache(); public final OsmandPreference SPEAK_SPEED_LIMIT = new BooleanPreference("speak_speed_limit", true).makeProfile().cache(); public final OsmandPreference SPEAK_SPEED_CAMERA = new BooleanPreference("speak_cameras", false).makeProfile().cache(); + public final OsmandPreference SPEAK_TUNNELS = new BooleanPreference("speak_tunnels", false).makeProfile().cache(); public final OsmandPreference ANNOUNCE_WPT = new BooleanPreference("announce_wpt", true).makeGlobal().cache(); public final OsmandPreference ANNOUNCE_NEARBY_FAVORITES = new BooleanPreference("announce_nearby_favorites", false).makeProfile().cache(); public final OsmandPreference ANNOUNCE_NEARBY_POI = new BooleanPreference("announce_nearby_poi", false).makeProfile().cache(); diff --git a/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java b/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java index f088cfb2fb..32b056682e 100644 --- a/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java @@ -636,11 +636,12 @@ public class SettingsNavigationActivity extends SettingsBaseActivity { } else if (preference == speakAlarms) { AlertDialog dlg = showBooleanSettings(new String[] { getString(R.string.speak_street_names), getString(R.string.speak_traffic_warnings), getString(R.string.speak_pedestrian), - getString(R.string.speak_speed_limit), getString(R.string.speak_cameras), + getString(R.string.speak_speed_limit), getString(R.string.speak_cameras), getString(R.string.show_tunnels), getString(R.string.announce_gpx_waypoints), getString(R.string.speak_favorites), getString(R.string.speak_poi) }, new OsmandPreference[] { settings.SPEAK_STREET_NAMES, settings.SPEAK_TRAFFIC_WARNINGS, settings.SPEAK_PEDESTRIAN, settings.SPEAK_SPEED_LIMIT, - settings.SPEAK_SPEED_CAMERA, settings.ANNOUNCE_WPT, settings.ANNOUNCE_NEARBY_FAVORITES, + settings.SPEAK_SPEED_CAMERA, settings.SPEAK_TUNNELS, + settings.ANNOUNCE_WPT, settings.ANNOUNCE_NEARBY_FAVORITES, settings.ANNOUNCE_NEARBY_POI }, preference.getTitle()); final boolean initialSpeedCam = settings.SPEAK_SPEED_CAMERA.get(); final boolean initialFavorites = settings.ANNOUNCE_NEARBY_FAVORITES.get(); diff --git a/OsmAnd/src/net/osmand/plus/helpers/WaypointHelper.java b/OsmAnd/src/net/osmand/plus/helpers/WaypointHelper.java index fef53f115d..266e034af1 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/WaypointHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/WaypointHelper.java @@ -219,6 +219,8 @@ public class WaypointHelper { app.getSettings().SPEAK_TRAFFIC_WARNINGS.setModeValue(appMode, enable); app.getSettings().SHOW_PEDESTRIAN.setModeValue(appMode, enable); app.getSettings().SPEAK_PEDESTRIAN.setModeValue(appMode, enable); + app.getSettings().SHOW_TUNNELS.setModeValue(appMode, enable); + app.getSettings().SPEAK_TUNNELS.setModeValue(appMode, enable); //But do not implicitly change speed_cam settings here because of legal restrictions in some countries, so Nav settings must prevail } else if (type == POI) { app.getSettings().SHOW_NEARBY_POI.setModeValue(appMode, enable); diff --git a/OsmAnd/src/net/osmand/plus/routing/VoiceRouter.java b/OsmAnd/src/net/osmand/plus/routing/VoiceRouter.java index b1ac9d9a85..af27e575ea 100644 --- a/OsmAnd/src/net/osmand/plus/routing/VoiceRouter.java +++ b/OsmAnd/src/net/osmand/plus/routing/VoiceRouter.java @@ -349,6 +349,14 @@ public class VoiceRouter { p.attention(type+"").play(); } } + } else if (type == AlarmInfoType.TUNNEL) { + if (router.getSettings().SPEAK_TUNNELS.get()) { + CommandBuilder p = getNewCommandPlayerToPlay(); + if (p != null) { + notifyOnVoiceMessage(); + p.attention(type+"").play(); + } + } } else { if (router.getSettings().SPEAK_TRAFFIC_WARNINGS.get()) { CommandBuilder p = getNewCommandPlayerToPlay(); diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/data/WikivoyageArticle.java b/OsmAnd/src/net/osmand/plus/wikivoyage/data/WikivoyageArticle.java index 8334b9bf2f..7e00ba73fd 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/data/WikivoyageArticle.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/data/WikivoyageArticle.java @@ -1,7 +1,9 @@ package net.osmand.plus.wikivoyage.data; import android.support.annotation.NonNull; +import android.support.annotation.Nullable; import android.support.annotation.Size; +import android.text.Html; import net.osmand.plus.GPXUtilities.GPXFile; @@ -14,6 +16,8 @@ public class WikivoyageArticle { private static final String THUMB_PREFIX = "320px-"; private static final String REGULAR_PREFIX = "800px-"; + private static final int PARTIAL_CONTENT_PHRASES = 3; + String id; String title; String content; @@ -80,6 +84,35 @@ public class WikivoyageArticle { return aggregatedPartOf; } + @Nullable + public String getPartialContent() { + if (content == null) { + return null; + } + + int firstParagraphStart = content.indexOf("

"); + int firstParagraphEnd = content.indexOf("

"); + if (firstParagraphStart == -1 || firstParagraphEnd == -1) { + return null; + } + + // 4 is the length of

tag + String firstParagraphHtml = content.substring(firstParagraphStart, firstParagraphEnd + 4); + String firstParagraphText = Html.fromHtml(firstParagraphHtml).toString(); + String[] phrases = firstParagraphText.split("\\. "); + + StringBuilder res = new StringBuilder(); + int limit = Math.min(phrases.length, PARTIAL_CONTENT_PHRASES); + for (int i = 0; i < limit; i++) { + res.append(phrases[i]).append("."); + if (i < limit - 1) { + res.append(" "); + } + } + + return res.toString(); + } + @NonNull public static String getImageUrl(@NonNull String imageTitle, boolean thumbnail) { String[] hash = getHash(imageTitle); diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/data/WikivoyageLocalDataHelper.java b/OsmAnd/src/net/osmand/plus/wikivoyage/data/WikivoyageLocalDataHelper.java index a6924dd2b4..aab19d481e 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/data/WikivoyageLocalDataHelper.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/data/WikivoyageLocalDataHelper.java @@ -1,6 +1,7 @@ package net.osmand.plus.wikivoyage.data; import android.support.annotation.NonNull; +import android.support.annotation.Nullable; import net.osmand.plus.OsmandApplication; import net.osmand.plus.api.SQLiteAPI.SQLiteConnection; @@ -22,10 +23,12 @@ public class WikivoyageLocalDataHelper { private WikivoyageLocalDataDbHelper dbHelper; private TLongObjectHashMap historyMap; + private List savedArticles; private WikivoyageLocalDataHelper(OsmandApplication app) { dbHelper = new WikivoyageLocalDataDbHelper(app); historyMap = dbHelper.getAllHistoryMap(); + savedArticles = dbHelper.getSavedArticles(); } public static WikivoyageLocalDataHelper getInstance(OsmandApplication app) { @@ -51,7 +54,7 @@ public class WikivoyageLocalDataHelper { return res; } - public void addToHistory(WikivoyageArticle article) { + public void addToHistory(@NonNull WikivoyageArticle article) { addToHistory(article.getCityId(), article.getTitle(), article.getLang(), article.getIsPartOf()); } @@ -80,9 +83,49 @@ public class WikivoyageLocalDataHelper { } } + public List getSavedArticles() { + return new ArrayList<>(savedArticles); + } + + public void addArticleToSaved(@NonNull WikivoyageArticle article) { + if (!isArticleSaved(article)) { + WikivoyageArticle saved = new WikivoyageArticle(); + saved.cityId = article.cityId; + saved.title = article.title; + saved.lang = article.lang; + saved.aggregatedPartOf = article.aggregatedPartOf; + saved.imageTitle = article.imageTitle; + saved.content = article.getPartialContent(); + savedArticles.add(saved); + dbHelper.addSavedArticle(saved); + } + } + + public void removeArticleFromSaved(@NonNull WikivoyageArticle article) { + WikivoyageArticle savedArticle = getArticle(article.cityId, article.lang); + if (savedArticle != null) { + savedArticles.remove(savedArticle); + dbHelper.removeSavedArticle(savedArticle); + } + } + + public boolean isArticleSaved(@NonNull WikivoyageArticle article) { + return getArticle(article.cityId, article.lang) != null; + } + + @Nullable + private WikivoyageArticle getArticle(long cityId, String lang) { + for (WikivoyageArticle article : savedArticles) { + if (article.cityId == cityId && article.lang != null && article.lang.equals(lang)) { + return article; + } + } + return null; + } + private static class WikivoyageLocalDataDbHelper { - private static final int DB_VERSION = 1; + private static final int DB_VERSION = 2; private static final String DB_NAME = "wikivoyage_local_data"; private static final String HISTORY_TABLE_NAME = "wikivoyage_search_history"; @@ -108,9 +151,35 @@ public class WikivoyageLocalDataHelper { HISTORY_COL_LAST_ACCESSED + " FROM " + HISTORY_TABLE_NAME; + private static final String BOOKMARKS_TABLE_NAME = "wikivoyage_saved_articles"; + private static final String BOOKMARKS_COL_CITY_ID = "city_id"; + private static final String BOOKMARKS_COL_ARTICLE_TITLE = "article_title"; + private static final String BOOKMARKS_COL_LANG = "lang"; + private static final String BOOKMARKS_COL_IS_PART_OF = "is_part_of"; + private static final String BOOKMARKS_COL_IMAGE_TITLE = "image_title"; + private static final String BOOKMARKS_COL_PARTIAL_CONTENT = "partial_content"; + + private static final String BOOKMARKS_TABLE_CREATE = "CREATE TABLE IF NOT EXISTS " + + BOOKMARKS_TABLE_NAME + " (" + + BOOKMARKS_COL_CITY_ID + " long, " + + BOOKMARKS_COL_ARTICLE_TITLE + " TEXT, " + + BOOKMARKS_COL_LANG + " TEXT, " + + BOOKMARKS_COL_IS_PART_OF + " TEXT, " + + BOOKMARKS_COL_IMAGE_TITLE + " TEXT, " + + BOOKMARKS_COL_PARTIAL_CONTENT + " TEXT);"; + + private static final String BOOKMARKS_TABLE_SELECT = "SELECT " + + BOOKMARKS_COL_CITY_ID + ", " + + BOOKMARKS_COL_ARTICLE_TITLE + ", " + + BOOKMARKS_COL_LANG + ", " + + BOOKMARKS_COL_IS_PART_OF + ", " + + BOOKMARKS_COL_IMAGE_TITLE + ", " + + BOOKMARKS_COL_PARTIAL_CONTENT + + " FROM " + BOOKMARKS_TABLE_NAME; + private final OsmandApplication context; - private WikivoyageLocalDataDbHelper(OsmandApplication context) { + WikivoyageLocalDataDbHelper(OsmandApplication context) { this.context = context; } @@ -135,11 +204,14 @@ public class WikivoyageLocalDataHelper { private void onCreate(SQLiteConnection conn) { conn.execSQL(HISTORY_TABLE_CREATE); + conn.execSQL(BOOKMARKS_TABLE_CREATE); } @SuppressWarnings("unused") private void onUpgrade(SQLiteConnection conn, int oldVersion, int newVersion) { - + if (oldVersion < 2) { + conn.execSQL(BOOKMARKS_TABLE_CREATE); + } } @NonNull @@ -203,6 +275,52 @@ public class WikivoyageLocalDataHelper { } } + @NonNull + List getSavedArticles() { + List res = new ArrayList<>(); + SQLiteConnection conn = openConnection(true); + if (conn != null) { + try { + SQLiteCursor cursor = conn.rawQuery(BOOKMARKS_TABLE_SELECT, null); + if (cursor.moveToFirst()) { + do { + res.add(readSavedArticle(cursor)); + } while (cursor.moveToNext()); + } + } finally { + conn.close(); + } + } + return res; + } + + void addSavedArticle(WikivoyageArticle article) { + SQLiteConnection conn = openConnection(false); + if (conn != null) { + try { + conn.execSQL("INSERT INTO " + BOOKMARKS_TABLE_NAME + " VALUES (?, ?, ?, ?, ?, ?)", + new Object[]{article.cityId, article.title, article.lang, + article.aggregatedPartOf, article.imageTitle, article.content}); + } finally { + conn.close(); + } + } + } + + void removeSavedArticle(WikivoyageArticle article) { + SQLiteConnection conn = openConnection(false); + if (conn != null) { + try { + conn.execSQL("DELETE FROM " + BOOKMARKS_TABLE_NAME + + " WHERE " + BOOKMARKS_COL_CITY_ID + " = ?" + + " AND " + BOOKMARKS_COL_LANG + " = ?", + new Object[]{article.cityId, article.lang}); + } finally { + conn.close(); + } + } + } + private WikivoyageSearchHistoryItem readHistoryItem(SQLiteCursor cursor) { WikivoyageSearchHistoryItem res = new WikivoyageSearchHistoryItem(); @@ -214,5 +332,18 @@ public class WikivoyageLocalDataHelper { return res; } + + private WikivoyageArticle readSavedArticle(SQLiteCursor cursor) { + WikivoyageArticle res = new WikivoyageArticle(); + + res.cityId = cursor.getLong(0); + res.title = cursor.getString(1); + res.lang = cursor.getString(2); + res.aggregatedPartOf = cursor.getString(3); + res.imageTitle = cursor.getString(4); + res.content = cursor.getString(5); + + return res; + } } } diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/WikivoyageExploreDialogFragment.java b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/WikivoyageExploreDialogFragment.java index a65784367a..7cb8ca66f1 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/WikivoyageExploreDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/WikivoyageExploreDialogFragment.java @@ -15,6 +15,7 @@ import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; +import android.widget.TextView; import net.osmand.AndroidUtils; import net.osmand.plus.LockableViewPager; @@ -40,8 +41,10 @@ public class WikivoyageExploreDialogFragment extends WikivoyageBaseDialogFragmen setupToolbar((Toolbar) mainView.findViewById(R.id.toolbar)); + int searchColorId = nightMode ? R.color.icon_color : R.color.ctx_menu_title_color_dark; + ((TextView) mainView.findViewById(R.id.search_hint)).setTextColor(getResolvedColor(searchColorId)); ((ImageView) mainView.findViewById(R.id.search_icon)) - .setImageDrawable(getContentIcon(R.drawable.ic_action_search_dark)); + .setImageDrawable(getIcon(R.drawable.ic_action_search_dark, searchColorId)); mainView.findViewById(R.id.search_button).setOnClickListener(new View.OnClickListener() { @Override