From e509e23c20fa305684d0e703eda64338d1a9b6a3 Mon Sep 17 00:00:00 2001 From: Alexander Sytnyk Date: Fri, 16 Jun 2017 11:50:45 +0300 Subject: [PATCH] Set the color and size of the text; rename string "to"; fix night mode check --- OsmAnd/res/layout/list_item_date_spinners.xml | 14 +++++++++++--- OsmAnd/res/layout/list_item_edit_text.xml | 1 + .../layout/list_item_icon_with_title_and_descr.xml | 1 + OsmAnd/res/values/strings.xml | 2 +- .../net/osmand/plus/mapillary/MapillaryMenu.java | 6 +++--- .../osmand/plus/srtmplugin/ContourLinesMenu.java | 6 +++--- .../net/osmand/plus/srtmplugin/HillshadeMenu.java | 6 +++--- 7 files changed, 23 insertions(+), 13 deletions(-) diff --git a/OsmAnd/res/layout/list_item_date_spinners.xml b/OsmAnd/res/layout/list_item_date_spinners.xml index d94f55522e..c4d7c97aa4 100644 --- a/OsmAnd/res/layout/list_item_date_spinners.xml +++ b/OsmAnd/res/layout/list_item_date_spinners.xml @@ -22,6 +22,8 @@ android:layout_marginRight="12dp" android:layout_weight="1" android:text="@string/mapillary_menu_date_from" + android:textColor="?android:textColorSecondary" + android:textSize="@dimen/default_desc_text_size" tools:text="From" /> @@ -47,7 +51,9 @@ android:layout_height="wrap_content" android:layout_marginEnd="12dp" android:layout_marginRight="12dp" - android:layout_weight="1" /> + android:layout_weight="1" + android:textColor="?android:textColorPrimary" + android:textSize="@dimen/default_list_text_size" /> + android:layout_weight="1" + android:textColor="?android:textColorPrimary" + android:textSize="@dimen/default_list_text_size" /> diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index aab6485879..fc21ea469b 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -9,7 +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 --> - To + To From View images added in a certain period. Dates diff --git a/OsmAnd/src/net/osmand/plus/mapillary/MapillaryMenu.java b/OsmAnd/src/net/osmand/plus/mapillary/MapillaryMenu.java index 927425677c..233689249d 100644 --- a/OsmAnd/src/net/osmand/plus/mapillary/MapillaryMenu.java +++ b/OsmAnd/src/net/osmand/plus/mapillary/MapillaryMenu.java @@ -42,15 +42,15 @@ public class MapillaryMenu { } }; - boolean light = settings.isLightContent(); + boolean nightMode = mapActivity.getMyApplication().getDaynightHelper().isNightModeForMapControls(); int toggleIconColorId; int toggleIconId; if (selected) { toggleIconId = R.drawable.ic_action_view; - toggleIconColorId = light ? R.color.color_dialog_buttons_light : R.color.color_dialog_buttons_dark; + toggleIconColorId = nightMode ? R.color.color_dialog_buttons_light : R.color.color_dialog_buttons_dark; } else { toggleIconId = R.drawable.ic_action_hide; - toggleIconColorId = light ? R.color.icon_color : 0; + toggleIconColorId = nightMode ? R.color.icon_color : 0; } contextMenuAdapter.addItem(new ContextMenuItem.ItemBuilder() diff --git a/OsmAnd/src/net/osmand/plus/srtmplugin/ContourLinesMenu.java b/OsmAnd/src/net/osmand/plus/srtmplugin/ContourLinesMenu.java index 5489b8d2f3..a6bfd4f1ab 100644 --- a/OsmAnd/src/net/osmand/plus/srtmplugin/ContourLinesMenu.java +++ b/OsmAnd/src/net/osmand/plus/srtmplugin/ContourLinesMenu.java @@ -168,16 +168,16 @@ public class ContourLinesMenu { } }; - boolean light = settings.isLightContent(); + boolean nightMode = mapActivity.getMyApplication().getDaynightHelper().isNightModeForMapControls(); int toggleIconColorId; int toggleIconId; if (selected) { toggleIconId = R.drawable.ic_action_view; - toggleIconColorId = light ? + toggleIconColorId = nightMode ? R.color.color_dialog_buttons_light : R.color.color_dialog_buttons_dark; } else { toggleIconId = R.drawable.ic_action_hide; - toggleIconColorId = light ? R.color.icon_color : 0; + toggleIconColorId = nightMode ? R.color.icon_color : 0; } contextMenuAdapter.addItem(new ContextMenuItem.ItemBuilder() .setTitleId(toggleActionStringId, mapActivity) diff --git a/OsmAnd/src/net/osmand/plus/srtmplugin/HillshadeMenu.java b/OsmAnd/src/net/osmand/plus/srtmplugin/HillshadeMenu.java index 61cff93838..5dfef274a1 100644 --- a/OsmAnd/src/net/osmand/plus/srtmplugin/HillshadeMenu.java +++ b/OsmAnd/src/net/osmand/plus/srtmplugin/HillshadeMenu.java @@ -76,16 +76,16 @@ public class HillshadeMenu { } }; - boolean light = settings.isLightContent(); + boolean nightMode = mapActivity.getMyApplication().getDaynightHelper().isNightModeForMapControls(); int toggleIconColorId; int toggleIconId; if (selected) { toggleIconId = R.drawable.ic_action_view; - toggleIconColorId = light ? + toggleIconColorId = nightMode ? R.color.color_dialog_buttons_light : R.color.color_dialog_buttons_dark; } else { toggleIconId = R.drawable.ic_action_hide; - toggleIconColorId = light ? R.color.icon_color : 0; + toggleIconColorId = nightMode ? R.color.icon_color : 0; } contextMenuAdapter.addItem(new ContextMenuItem.ItemBuilder() .setTitleId(toggleActionStringId, mapActivity)