Second step colors refactoring

This commit is contained in:
crimean 2019-07-01 22:28:13 +03:00
parent 2c70bce622
commit 6dabd11dba
33 changed files with 113 additions and 119 deletions

View file

@ -15,7 +15,7 @@
</item> </item>
<item> <item>
<shape android:shape="rectangle"> <shape android:shape="rectangle">
<stroke android:width="1dp" android:color="@color/inactive_pages_dark" /> <stroke android:width="1dp" android:color="@color/divider_color_dark" />
<solid android:color="@color/stroked_buttons_and_links_dark" /> <solid android:color="@color/stroked_buttons_and_links_dark" />
<corners android:radius="@dimen/dlg_button_rect_rad" /> <corners android:radius="@dimen/dlg_button_rect_rad" />
</shape> </shape>

View file

@ -14,7 +14,7 @@
</item> </item>
<item> <item>
<shape android:shape="rectangle"> <shape android:shape="rectangle">
<stroke android:width="1dp" android:color="@color/profile_button_gray" /> <stroke android:width="1dp" android:color="@color/divider_color_light" />
<solid android:color="@color/stroked_buttons_and_links_light" /> <solid android:color="@color/stroked_buttons_and_links_light" />
<corners android:radius="@dimen/dlg_button_rect_rad" /> <corners android:radius="@dimen/dlg_button_rect_rad" />
</shape> </shape>

View file

@ -5,7 +5,7 @@
</item> </item>
<item> <item>
<shape> <shape>
<solid android:color="@color/bg_color_dark" /> <solid android:color="@color/list_background_color_dark" />
</shape> </shape>
</item> </item>
</layer-list> </layer-list>

View file

@ -5,7 +5,7 @@
</item> </item>
<item> <item>
<shape> <shape>
<solid android:color="@color/bg_color_light" /> <solid android:color="@color/list_background_color_light" />
</shape> </shape>
</item> </item>
</layer-list> </layer-list>

View file

@ -10,7 +10,7 @@
<corners android:radius="@dimen/dlg_button_rect_rad" /> <corners android:radius="@dimen/dlg_button_rect_rad" />
</shape></item> </shape></item>
<item><shape android:shape="rectangle"> <item><shape android:shape="rectangle">
<stroke android:color="@color/inactive_pages_dark" android:width="1dp" /> <stroke android:color="@color/divider_color_dark" android:width="1dp" />
<solid android:color="@color/stroked_buttons_and_links_dark" /> <solid android:color="@color/stroked_buttons_and_links_dark" />
<corners android:radius="@dimen/dlg_button_rect_rad" /> <corners android:radius="@dimen/dlg_button_rect_rad" />
</shape></item> </shape></item>

View file

@ -10,7 +10,7 @@
<corners android:radius="@dimen/dlg_button_rect_rad" /> <corners android:radius="@dimen/dlg_button_rect_rad" />
</shape></item> </shape></item>
<item><shape android:shape="rectangle"> <item><shape android:shape="rectangle">
<stroke android:color="@color/profile_button_gray" android:width="1dp" /> <stroke android:color="@color/divider_color_light" android:width="1dp" />
<solid android:color="@color/stroked_buttons_and_links_light" /> <solid android:color="@color/stroked_buttons_and_links_light" />
<corners android:radius="@dimen/dlg_button_rect_rad" /> <corners android:radius="@dimen/dlg_button_rect_rad" />
</shape></item> </shape></item>

View file

@ -77,8 +77,9 @@
android:id="@+id/findParkingButton" android:id="@+id/findParkingButton"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp" android:minHeight="@dimen/dialog_button_ex_height"
android:layout_marginBottom="8dp" android:paddingTop="12dp"
android:paddingBottom="12dp"
android:paddingLeft="8dp" android:paddingLeft="8dp"
android:paddingRight="8dp" android:paddingRight="8dp"
android:drawableLeft="@drawable/ic_action_parking_dark" android:drawableLeft="@drawable/ic_action_parking_dark"
@ -97,8 +98,9 @@
android:id="@+id/recalcDestButton" android:id="@+id/recalcDestButton"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp" android:minHeight="@dimen/dialog_button_ex_height"
android:layout_marginBottom="8dp" android:paddingTop="12dp"
android:paddingBottom="12dp"
android:paddingLeft="8dp" android:paddingLeft="8dp"
android:paddingRight="8dp" android:paddingRight="8dp"
android:drawableLeft="@drawable/ic_action_gdirections_dark" android:drawableLeft="@drawable/ic_action_gdirections_dark"
@ -117,8 +119,9 @@
android:id="@+id/removeDestButton" android:id="@+id/removeDestButton"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp" android:minHeight="@dimen/dialog_button_ex_height"
android:layout_marginBottom="8dp" android:paddingTop="12dp"
android:paddingBottom="12dp"
android:paddingLeft="8dp" android:paddingLeft="8dp"
android:paddingRight="8dp" android:paddingRight="8dp"
android:drawableLeft="@drawable/ic_action_done" android:drawableLeft="@drawable/ic_action_done"

View file

@ -324,7 +324,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" android:layout_height="1dp"
android:layout_marginTop="@dimen/content_padding" android:layout_marginTop="@dimen/content_padding"
android:background="@color/dialog_divider_dark"/> android:background="@color/divider_color_dark"/>
<LinearLayout <LinearLayout
android:id="@+id/point_name_et_container" android:id="@+id/point_name_et_container"

View file

@ -77,8 +77,9 @@
android:id="@+id/findParkingButton" android:id="@+id/findParkingButton"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp" android:minHeight="@dimen/dialog_button_ex_height"
android:layout_marginBottom="8dp" android:paddingTop="12dp"
android:paddingBottom="12dp"
android:paddingLeft="8dp" android:paddingLeft="8dp"
android:paddingRight="8dp" android:paddingRight="8dp"
android:drawableLeft="@drawable/ic_action_parking_dark" android:drawableLeft="@drawable/ic_action_parking_dark"
@ -97,8 +98,9 @@
android:id="@+id/recalcDestButton" android:id="@+id/recalcDestButton"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp" android:minHeight="@dimen/dialog_button_ex_height"
android:layout_marginBottom="8dp" android:paddingTop="12dp"
android:paddingBottom="12dp"
android:paddingLeft="8dp" android:paddingLeft="8dp"
android:paddingRight="8dp" android:paddingRight="8dp"
android:drawableLeft="@drawable/ic_action_gdirections_dark" android:drawableLeft="@drawable/ic_action_gdirections_dark"
@ -117,8 +119,9 @@
android:id="@+id/removeDestButton" android:id="@+id/removeDestButton"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp" android:minHeight="@dimen/dialog_button_ex_height"
android:layout_marginBottom="8dp" android:paddingTop="12dp"
android:paddingBottom="12dp"
android:paddingLeft="8dp" android:paddingLeft="8dp"
android:paddingRight="8dp" android:paddingRight="8dp"
android:drawableLeft="@drawable/ic_action_done" android:drawableLeft="@drawable/ic_action_done"

View file

@ -22,9 +22,9 @@
<color name="status_bar_color_light">#e68200</color> <color name="status_bar_color_light">#e68200</color>
<color name="status_bar_color_dark">#101112</color> <color name="status_bar_color_dark">#101112</color>
<color name="active_buttons_and_links_pressed_light">#0F67EB</color> <color name="active_buttons_and_links_pressed_light">#0f67eb</color>
<color name="active_buttons_and_links_pressed_dark">#B87114</color> <color name="active_buttons_and_links_pressed_dark">#b87114</color>
<color name="inactive_buttons_and_links_light">#F0F0F0</color> <color name="inactive_buttons_and_links_light">#f0f0f0</color>
<color name="inactive_buttons_and_links_dark">#222526</color> <color name="inactive_buttons_and_links_dark">#222526</color>
<color name="stroked_buttons_and_links_light">#ffffff</color> <color name="stroked_buttons_and_links_light">#ffffff</color>
<color name="stroked_buttons_and_links_dark">#17181a</color> <color name="stroked_buttons_and_links_dark">#17181a</color>
@ -39,30 +39,20 @@
<color name="subscription_active_div_color_dark">#32332c</color> <color name="subscription_active_div_color_dark">#32332c</color>
<color name="feature_purchased_bg">#78cc5c</color> <color name="feature_purchased_bg">#78cc5c</color>
<color name="dialog_divider_light">#e6e6e6</color>
<color name="dialog_divider_dark">#2d3133</color>
<color name="card_description_text_color_light">#b3b3b3</color>
<color name="card_description_text_color_dark">#4d4d4d</color>
<color name="ctx_menu_nearby_routes_text_color_dark">#bfbfbf</color>
<color name="map_toolbar_switch_track_color">#c5d2e6</color> <color name="map_toolbar_switch_track_color">#c5d2e6</color>
<color name="mapillary_color">#3db878</color> <color name="mapillary_color">#3db878</color>
<color name="mapillary_color_pressed">#3a9f73</color> <color name="mapillary_color_pressed">#3a9f73</color>
<color name="mapillary_action_bar">#14c45d</color> <color name="mapillary_action_bar">#14c45d</color>
<color name="buy_button_color">#50ae55</color> <color name="buy_button_color">#50ae55</color>
<color name="buy_button_pressed_color">#b5e5b9</color> <color name="buy_button_pressed_color">#b5e5b9</color>
<color name="gpx_track_width_prop">#853fc5</color>
<color name="xmas_blue">#3f51b5</color> <color name="xmas_blue">#3f51b5</color>
<color name="disabled_btn_text_color">#a0a0a0</color>
<color name="discount_bar_bg">#357ef2</color> <color name="discount_bar_bg">#357ef2</color>
<color name="searchbar_text_dark">#fff</color>
<color name="searchbar_text_light">#212121</color>
<color name="searchbar_text_hint_dark">#7a8c99</color> <color name="searchbar_text_hint_dark">#7a8c99</color>
<color name="searchbar_text_hint_light">#727272</color> <color name="searchbar_text_hint_light">#727272</color>
<color name="searchbar_tab_inactive_dark">#5b6872</color> <color name="searchbar_tab_inactive_dark">#5b6872</color>
<color name="searchbar_tab_inactive_light">#727272</color> <color name="searchbar_tab_inactive_light">#727272</color>
@ -82,8 +72,6 @@
<color name="popup_separator_color">#BBBBBB</color> <color name="popup_separator_color">#BBBBBB</color>
<color name="popup_text_color">#FFFFFF</color> <color name="popup_text_color">#FFFFFF</color>
<color name="primary_text_light">#de000000</color>
<color name="secondary_text_light">#8a000000</color>
<color name="primary_text_dark">#ffffffff</color> <color name="primary_text_dark">#ffffffff</color>
<color name="secondary_text_dark">#b3ffffff</color> <color name="secondary_text_dark">#b3ffffff</color>
@ -153,7 +141,6 @@
<color name="icon_color">#727272</color> <color name="icon_color">#727272</color>
<color name="icon_color_light">#ccc</color> <color name="icon_color_light">#ccc</color>
<color name="icon_color_dark">#ff4f4f4f</color>
<color name="on_map_icon_color">#505050</color> <color name="on_map_icon_color">#505050</color>

View file

@ -137,7 +137,7 @@
<item name="bottom_menu_view_bg">@drawable/bg_bottom_menu_light</item> <item name="bottom_menu_view_bg">@drawable/bg_bottom_menu_light</item>
<item name="left_menu_view_bg">@drawable/bg_left_menu_light</item> <item name="left_menu_view_bg">@drawable/bg_left_menu_light</item>
<item name="bg_point_editor_view">@drawable/bg_point_editor_view_light</item> <item name="bg_point_editor_view">@drawable/bg_point_editor_view_light</item>
<item name="dashboard_divider">@color/dashboard_divider_light</item> <item name="dashboard_divider">@color/divider_color_light</item>
<item name="divider_color">@color/divider_color</item> <item name="divider_color">@color/divider_color</item>
<item name="dashboard_button">@drawable/dashboard_button_light</item> <item name="dashboard_button">@drawable/dashboard_button_light</item>
<item name="ctx_menu_info_view_bg">@color/ctx_menu_info_view_bg_light</item> <item name="ctx_menu_info_view_bg">@color/ctx_menu_info_view_bg_light</item>
@ -165,7 +165,11 @@
@color/dashboard_general_button_text_light @color/dashboard_general_button_text_light
</item> </item>
<item name="android:listChoiceIndicatorMultiple">@drawable/check_light</item> <item name="android:listChoiceIndicatorMultiple">@drawable/check_light</item>
<item name="android:textColorPrimary">@color/color_black</item>
<item name="android:textColorPrimary">@color/text_color_primary_light</item>
<item name="android:textColorSecondary">@color/text_color_secondary_light</item>
<item name="android:textColorTertiary">@color/text_color_tertiary_light</item>
<item name="spinnerItemTextColor">@color/color_black</item> <item name="spinnerItemTextColor">@color/color_black</item>
<item name="spinnerListBackground">@color/spinner_list_background_light</item> <item name="spinnerListBackground">@color/spinner_list_background_light</item>
<item name="colorButtonNormal">@color/color_white</item> <item name="colorButtonNormal">@color/color_white</item>
@ -189,7 +193,6 @@
<item name="search_tabbar_layout_theme">@style/OsmandLightTheme.SearchTabbar</item> <item name="search_tabbar_layout_theme">@style/OsmandLightTheme.SearchTabbar</item>
<item name="toolbar_theme">@style/OsmandLightTheme.Toolbar</item> <item name="toolbar_theme">@style/OsmandLightTheme.Toolbar</item>
<item name="new_app_theme">@style/OsmandLightTheme.NewAppTheme</item> <item name="new_app_theme">@style/OsmandLightTheme.NewAppTheme</item>
<item name="android:textColorSecondary">@color/icon_color</item>
<item name="contextMenuButtonColor">@color/map_widget_blue</item> <item name="contextMenuButtonColor">@color/map_widget_blue</item>
<item name="color_dialog_buttons">@color/color_dialog_buttons_light</item> <item name="color_dialog_buttons">@color/color_dialog_buttons_light</item>
@ -208,7 +211,7 @@
<item name="dialog_title_color">@color/text_color_primary_light</item> <item name="dialog_title_color">@color/text_color_primary_light</item>
<item name="dialog_description_color">@color/text_color_primary_light</item> <item name="dialog_description_color">@color/text_color_primary_light</item>
<item name="dialog_text_description_color">@color/text_color_secondary_light</item> <item name="dialog_text_description_color">@color/text_color_secondary_light</item>
<item name="card_description_text_color">@color/card_description_text_color_light</item> <item name="card_description_text_color">@color/text_color_tertiary_light</item>
<item name="wikivoyage_bg_color">@color/wikivoyage_bg_light</item> <item name="wikivoyage_bg_color">@color/wikivoyage_bg_light</item>
<item name="wikivoyage_card_bg_color">@color/wikivoyage_card_bg_light</item> <item name="wikivoyage_card_bg_color">@color/wikivoyage_card_bg_light</item>
@ -275,7 +278,7 @@
</style> </style>
<style name="OsmandLightTheme.NoActionbar.Preferences"> <style name="OsmandLightTheme.NoActionbar.Preferences">
<item name="android:textColorSecondary">@color/color_black</item> <item name="android:textColorSecondary">@color/text_color_secondary_light</item>
</style> </style>
<style name="OsmandLightTheme.DarkActionbar"> <style name="OsmandLightTheme.DarkActionbar">
@ -343,7 +346,7 @@
</style> </style>
<style name="OsmandDarkTheme.NoActionbar.Preferences"> <style name="OsmandDarkTheme.NoActionbar.Preferences">
<item name="android:textColorSecondary">@color/color_white</item> <item name="android:textColorSecondary">@color/text_color_secondary_dark</item>
</style> </style>
<style name="OsmandDarkTheme.NoAnimation"> <style name="OsmandDarkTheme.NoAnimation">
@ -390,7 +393,7 @@
<item name="bottom_menu_view_bg">@drawable/bg_bottom_menu_dark</item> <item name="bottom_menu_view_bg">@drawable/bg_bottom_menu_dark</item>
<item name="left_menu_view_bg">@drawable/bg_left_menu_dark</item> <item name="left_menu_view_bg">@drawable/bg_left_menu_dark</item>
<item name="bg_point_editor_view">@drawable/bg_point_editor_view_dark</item> <item name="bg_point_editor_view">@drawable/bg_point_editor_view_dark</item>
<item name="dashboard_divider">@color/dashboard_divider_dark</item> <item name="dashboard_divider">@color/divider_color_dark</item>
<item name="divider_color">@color/dashboard_divider_dark</item> <item name="divider_color">@color/dashboard_divider_dark</item>
<item name="dashboard_button">@drawable/dashboard_button_dark</item> <item name="dashboard_button">@drawable/dashboard_button_dark</item>
<item name="ctx_menu_info_view_bg">@color/ctx_menu_info_view_bg_dark</item> <item name="ctx_menu_info_view_bg">@color/ctx_menu_info_view_bg_dark</item>
@ -411,7 +414,11 @@
<item name="dashboard_subheader_text_color">@color/dashboard_subheader_text_dark</item> <item name="dashboard_subheader_text_color">@color/dashboard_subheader_text_dark</item>
<item name="dashboard_general_button_text_color">@color/dashboard_general_button_text_dark</item> <item name="dashboard_general_button_text_color">@color/dashboard_general_button_text_dark</item>
<item name="android:listChoiceIndicatorMultiple">@drawable/check_dark</item> <item name="android:listChoiceIndicatorMultiple">@drawable/check_dark</item>
<item name="android:textColorPrimary">@color/color_white</item>
<item name="android:textColorPrimary">@color/text_color_primary_dark</item>
<item name="android:textColorSecondary">@color/text_color_secondary_dark</item>
<item name="android:textColorTertiary">@color/text_color_tertiary_dark</item>
<item name="spinnerItemTextColor">@color/color_white</item> <item name="spinnerItemTextColor">@color/color_white</item>
<item name="spinnerListBackground">@color/spinner_list_background_dark</item> <item name="spinnerListBackground">@color/spinner_list_background_dark</item>
<item name="colorButtonNormal">@color/actionbar_dark_color</item> <item name="colorButtonNormal">@color/actionbar_dark_color</item>
@ -427,7 +434,6 @@
<item name="search_tabbar_layout_theme">@style/OsmandDarkTheme.SearchTabbar</item> <item name="search_tabbar_layout_theme">@style/OsmandDarkTheme.SearchTabbar</item>
<item name="toolbar_theme">@style/OsmandDarkTheme</item> <item name="toolbar_theme">@style/OsmandDarkTheme</item>
<item name="new_app_theme">@style/OsmandDarkTheme</item> <item name="new_app_theme">@style/OsmandDarkTheme</item>
<item name="android:textColorSecondary">@color/dash_search_icon_dark</item>
<item name="contextMenuButtonColor">@color/osmand_orange</item> <item name="contextMenuButtonColor">@color/osmand_orange</item>
<item name="color_dialog_buttons">@color/color_dialog_buttons_dark</item> <item name="color_dialog_buttons">@color/color_dialog_buttons_dark</item>
@ -447,7 +453,7 @@
<item name="dialog_title_color">@color/text_color_primary_dark</item> <item name="dialog_title_color">@color/text_color_primary_dark</item>
<item name="dialog_description_color">@color/text_color_secondary_dark</item> <item name="dialog_description_color">@color/text_color_secondary_dark</item>
<item name="dialog_text_description_color">@color/text_color_secondary_dark</item> <item name="dialog_text_description_color">@color/text_color_secondary_dark</item>
<item name="card_description_text_color">@color/card_description_text_color_dark</item> <item name="card_description_text_color">@color/text_color_tertiary_dark</item>
<item name="wikivoyage_bg_color">@color/wikivoyage_bg_dark</item> <item name="wikivoyage_bg_color">@color/wikivoyage_bg_dark</item>
<item name="wikivoyage_card_bg_color">@color/wikivoyage_card_bg_dark</item> <item name="wikivoyage_card_bg_color">@color/wikivoyage_card_bg_dark</item>

View file

@ -351,20 +351,20 @@ public class AndroidUtils {
public static void setTextPrimaryColor(Context ctx, TextView textView, boolean night) { public static void setTextPrimaryColor(Context ctx, TextView textView, boolean night) {
textView.setTextColor(night ? textView.setTextColor(night ?
ctx.getResources().getColor(R.color.primary_text_dark) ctx.getResources().getColor(R.color.text_color_primary_dark)
: ctx.getResources().getColor(R.color.primary_text_light)); : ctx.getResources().getColor(R.color.text_color_primary_light));
} }
public static void setTextSecondaryColor(Context ctx, TextView textView, boolean night) { public static void setTextSecondaryColor(Context ctx, TextView textView, boolean night) {
textView.setTextColor(night ? textView.setTextColor(night ?
ctx.getResources().getColor(R.color.secondary_text_dark) ctx.getResources().getColor(R.color.text_color_secondary_dark)
: ctx.getResources().getColor(R.color.secondary_text_light)); : ctx.getResources().getColor(R.color.text_color_secondary_light));
} }
public static void setHintTextSecondaryColor(Context ctx, TextView textView, boolean night) { public static void setHintTextSecondaryColor(Context ctx, TextView textView, boolean night) {
textView.setHintTextColor(night ? textView.setHintTextColor(night ?
ctx.getResources().getColor(R.color.secondary_text_dark) ctx.getResources().getColor(R.color.text_color_secondary_dark)
: ctx.getResources().getColor(R.color.secondary_text_light)); : ctx.getResources().getColor(R.color.text_color_secondary_light));
} }

View file

@ -101,14 +101,14 @@ public class UiUtilities {
} }
public Drawable getIcon(@DrawableRes int id, boolean light) { public Drawable getIcon(@DrawableRes int id, boolean light) {
return getDrawable(id, light ? R.color.icon_color : 0); return getDrawable(id, light ? R.color.icon_color : R.color.icon_color_light);
} }
@ColorRes @ColorRes
public static int getDefaultColorRes(Context context) { public static int getDefaultColorRes(Context context) {
final OsmandApplication app = (OsmandApplication) context.getApplicationContext(); final OsmandApplication app = (OsmandApplication) context.getApplicationContext();
boolean light = app.getSettings().isLightContent(); boolean light = app.getSettings().isLightContent();
return light ? R.color.icon_color : R.color.color_white; return light ? R.color.icon_color : R.color.icon_color_light;
} }
@ColorInt @ColorInt

View file

@ -833,8 +833,8 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment implemen
boolean light = app.getSettings().isLightContent(); boolean light = app.getSettings().isLightContent();
final FavoriteGroup model = getGroup(groupPosition); final FavoriteGroup model = getGroup(groupPosition);
boolean visible = model.visible; boolean visible = model.visible;
int enabledColor = light ? R.color.primary_text_light : R.color.primary_text_dark; int enabledColor = light ? R.color.text_color_primary_light : R.color.text_color_primary_dark;
int disabledColor = light ? R.color.secondary_text_light : R.color.secondary_text_dark; int disabledColor = light ? R.color.text_color_secondary_light : R.color.text_color_secondary_dark;
row.findViewById(R.id.group_divider).setVisibility(groupPosition == 0 ? View.GONE : View.VISIBLE); row.findViewById(R.id.group_divider).setVisibility(groupPosition == 0 ? View.GONE : View.VISIBLE);
int color = model.color == 0 || model.color == Color.BLACK ? getResources().getColor(R.color.color_favorite) : model.color; int color = model.color == 0 || model.color == Color.BLACK ? getResources().getColor(R.color.color_favorite) : model.color;
setCategoryIcon(app, app.getUIUtilities().getPaintedIcon( setCategoryIcon(app, app.getUIUtilities().getPaintedIcon(
@ -915,8 +915,8 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment implemen
} }
OsmandApplication app = getMyApplication(); OsmandApplication app = getMyApplication();
boolean light = app.getSettings().isLightContent(); boolean light = app.getSettings().isLightContent();
int enabledColor = light ? R.color.primary_text_light : R.color.primary_text_dark; int enabledColor = light ? R.color.text_color_primary_light : R.color.text_color_primary_dark;
int disabledColor = light ? R.color.secondary_text_light : R.color.secondary_text_dark; int disabledColor = light ? R.color.text_color_secondary_light : R.color.text_color_secondary_dark;
int disabledIconColor = light ? R.color.icon_color : R.color.icon_color_light; int disabledIconColor = light ? R.color.icon_color : R.color.icon_color_light;
TextView name = (TextView) row.findViewById(R.id.favourite_label); TextView name = (TextView) row.findViewById(R.id.favourite_label);

View file

@ -153,7 +153,7 @@ public abstract class MenuBottomSheetDialogFragment extends BottomSheetDialogFra
@Override @Override
protected Drawable getContentIcon(@DrawableRes int id) { protected Drawable getContentIcon(@DrawableRes int id) {
return getIcon(id, nightMode ? R.color.ctx_menu_info_text_dark : R.color.on_map_icon_color); return getIcon(id, nightMode ? R.color.icon_color_light : R.color.icon_color);
} }
protected Drawable getActiveIcon(@DrawableRes int id) { protected Drawable getActiveIcon(@DrawableRes int id) {

View file

@ -1325,7 +1325,7 @@ public class ConfigureMapMenu {
String text = getItem(position); String text = getItem(position);
label.setText(text); label.setText(text);
label.setTextColor(!lightTheme ? label.setTextColor(!lightTheme ?
ContextCompat.getColorStateList(getContext(), android.R.color.primary_text_dark) : ContextCompat.getColorStateList(getContext(), android.R.color.primary_text_light)); ContextCompat.getColorStateList(getContext(), R.color.text_color_primary_dark) : ContextCompat.getColorStateList(getContext(), R.color.text_color_primary_light));
return label; return label;
} }
@ -1336,7 +1336,7 @@ public class ConfigureMapMenu {
String text = getItem(position); String text = getItem(position);
label.setText(text); label.setText(text);
label.setTextColor(!lightTheme ? label.setTextColor(!lightTheme ?
ContextCompat.getColorStateList(getContext(), android.R.color.primary_text_dark) : ContextCompat.getColorStateList(getContext(), android.R.color.primary_text_light)); ContextCompat.getColorStateList(getContext(), R.color.text_color_primary_dark) : ContextCompat.getColorStateList(getContext(), R.color.text_color_primary_light));
return label; return label;
} }

View file

@ -225,7 +225,7 @@ public class SelectMapStyleBottomSheetDialogFragment extends MenuBottomSheetDial
private int getStyleTitleColor(boolean selected) { private int getStyleTitleColor(boolean selected) {
int colorId = selected int colorId = selected
? getActiveColorId() ? getActiveColorId()
: nightMode ? R.color.primary_text_dark : R.color.primary_text_light; : nightMode ? R.color.text_color_primary_dark : R.color.text_color_primary_light;
return getResolvedColor(colorId); return getResolvedColor(colorId);
} }

View file

@ -214,7 +214,7 @@ public class SelectMapViewQuickActionsBottomSheet extends MenuBottomSheetDialogF
private int getStyleTitleColor(boolean selected) { private int getStyleTitleColor(boolean selected) {
int colorId = selected int colorId = selected
? getActiveColorId() ? getActiveColorId()
: nightMode ? R.color.primary_text_dark : R.color.primary_text_light; : nightMode ? R.color.text_color_primary_dark : R.color.text_color_primary_light;
return getResolvedColor(colorId); return getResolvedColor(colorId);
} }

View file

@ -841,7 +841,7 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment implement
this.ctx = ctx; this.ctx = ctx;
warningColor = ContextCompat.getColor(ctx, R.color.color_warning); warningColor = ContextCompat.getColor(ctx, R.color.color_warning);
boolean light = ctx.getMyApplication().getSettings().isLightContent(); boolean light = ctx.getMyApplication().getSettings().isLightContent();
okColor = ContextCompat.getColor(ctx, light ? R.color.primary_text_light : R.color.primary_text_dark); okColor = ContextCompat.getColor(ctx, light ? R.color.text_color_primary_light : R.color.text_color_primary_dark);
corruptedColor = ContextCompat.getColor(ctx, R.color.color_invalid); corruptedColor = ContextCompat.getColor(ctx, R.color.color_invalid);
} }

View file

@ -698,7 +698,7 @@ public class FirstUsageWizardFragment extends BaseOsmAndFragment implements OsmA
AppCompatButton changeStorageButton = (AppCompatButton) storageView.findViewById(R.id.storage_change_button); AppCompatButton changeStorageButton = (AppCompatButton) storageView.findViewById(R.id.storage_change_button);
if (wizardType == WizardType.MAP_DOWNLOAD) { if (wizardType == WizardType.MAP_DOWNLOAD) {
changeStorageButton.setEnabled(false); changeStorageButton.setEnabled(false);
changeStorageButton.setTextColor(getMyApplication().getResources().getColor(R.color.disabled_btn_text_color)); changeStorageButton.setTextColor(getMyApplication().getResources().getColor(R.color.text_color_secondary_light));
} else { } else {
changeStorageButton.setOnClickListener(new View.OnClickListener() { changeStorageButton.setOnClickListener(new View.OnClickListener() {
@Override @Override

View file

@ -1298,7 +1298,7 @@ public class GpxUiHelper {
entries.add(new BarEntry(0, stacks)); entries.add(new BarEntry(0, stacks));
BarDataSet barDataSet = new BarDataSet(entries, ""); BarDataSet barDataSet = new BarDataSet(entries, "");
barDataSet.setColors(colors); barDataSet.setColors(colors);
barDataSet.setHighLightColor(!nightMode ? mChart.getResources().getColor(R.color.secondary_text_light) : mChart.getResources().getColor(R.color.secondary_text_dark)); barDataSet.setHighLightColor(!nightMode ? mChart.getResources().getColor(R.color.text_color_secondary_light) : mChart.getResources().getColor(R.color.text_color_secondary_dark));
BarData dataSet = new BarData(barDataSet); BarData dataSet = new BarData(barDataSet);
dataSet.setDrawValues(false); dataSet.setDrawValues(false);
dataSet.setBarWidth(1); dataSet.setBarWidth(1);
@ -1381,7 +1381,7 @@ public class GpxUiHelper {
dataSet.setHighlightEnabled(true); dataSet.setHighlightEnabled(true);
dataSet.setDrawVerticalHighlightIndicator(true); dataSet.setDrawVerticalHighlightIndicator(true);
dataSet.setDrawHorizontalHighlightIndicator(false); dataSet.setDrawHorizontalHighlightIndicator(false);
dataSet.setHighLightColor(light ? mChart.getResources().getColor(R.color.secondary_text_light) : mChart.getResources().getColor(R.color.secondary_text_dark)); dataSet.setHighLightColor(light ? mChart.getResources().getColor(R.color.text_color_secondary_light) : mChart.getResources().getColor(R.color.text_color_secondary_dark));
//dataSet.setMode(LineDataSet.Mode.HORIZONTAL_BEZIER); //dataSet.setMode(LineDataSet.Mode.HORIZONTAL_BEZIER);
@ -1548,7 +1548,7 @@ public class GpxUiHelper {
dataSet.setHighlightEnabled(true); dataSet.setHighlightEnabled(true);
dataSet.setDrawVerticalHighlightIndicator(true); dataSet.setDrawVerticalHighlightIndicator(true);
dataSet.setDrawHorizontalHighlightIndicator(false); dataSet.setDrawHorizontalHighlightIndicator(false);
dataSet.setHighLightColor(light ? mChart.getResources().getColor(R.color.secondary_text_light) : mChart.getResources().getColor(R.color.secondary_text_dark)); dataSet.setHighLightColor(light ? mChart.getResources().getColor(R.color.text_color_secondary_light) : mChart.getResources().getColor(R.color.secondary_text_dark));
//dataSet.setMode(LineDataSet.Mode.HORIZONTAL_BEZIER); //dataSet.setMode(LineDataSet.Mode.HORIZONTAL_BEZIER);
@ -1712,7 +1712,7 @@ public class GpxUiHelper {
dataSet.setHighlightEnabled(true); dataSet.setHighlightEnabled(true);
dataSet.setDrawVerticalHighlightIndicator(true); dataSet.setDrawVerticalHighlightIndicator(true);
dataSet.setDrawHorizontalHighlightIndicator(false); dataSet.setDrawHorizontalHighlightIndicator(false);
dataSet.setHighLightColor(light ? mChart.getResources().getColor(R.color.secondary_text_light) : mChart.getResources().getColor(R.color.secondary_text_dark)); dataSet.setHighLightColor(light ? mChart.getResources().getColor(R.color.text_color_secondary_light) : mChart.getResources().getColor(R.color.text_color_secondary_dark));
//dataSet.setMode(LineDataSet.Mode.HORIZONTAL_BEZIER); //dataSet.setMode(LineDataSet.Mode.HORIZONTAL_BEZIER);

View file

@ -58,7 +58,7 @@ public class MapMarkerDialogHelper {
if (!marker.history) { if (!marker.history) {
dd.setImage(arrowResId, useCenter ? R.color.color_distance : R.color.color_myloc_distance); dd.setImage(arrowResId, useCenter ? R.color.color_distance : R.color.color_myloc_distance);
} else { } else {
dd.setImage(arrowResId, nightMode ? R.color.secondary_text_dark : R.color.secondary_text_light); dd.setImage(arrowResId, nightMode ? R.color.text_color_secondary_dark : R.color.text_color_secondary_light);
} }
if (loc == null || heading == null || marker.point == null) { if (loc == null || heading == null || marker.point == null) {
dd.setAngle(0); dd.setAngle(0);

View file

@ -117,7 +117,7 @@ public class WaypointDialogHelper {
String devStr = "+" + OsmAndFormatter.getFormattedDistance(ps.deviationDistance, app); String devStr = "+" + OsmAndFormatter.getFormattedDistance(ps.deviationDistance, app);
textDeviation.setText(devStr); textDeviation.setText(devStr);
if (!topBar) { if (!topBar) {
int colorId = nightMode ? R.color.secondary_text_dark : R.color.secondary_text_light; int colorId = nightMode ? R.color.text_color_secondary_dark : R.color.text_color_secondary_light;
AndroidUtils.setTextSecondaryColor(activity, textDeviation, nightMode); AndroidUtils.setTextSecondaryColor(activity, textDeviation, nightMode);
if (ps.deviationDirectionRight) { if (ps.deviationDirectionRight) {
textDeviation.setCompoundDrawablesWithIntrinsicBounds( textDeviation.setCompoundDrawablesWithIntrinsicBounds(

View file

@ -496,13 +496,10 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
zoomInButtonView = (ImageButton) view.findViewById(R.id.context_menu_zoom_in_button); zoomInButtonView = (ImageButton) view.findViewById(R.id.context_menu_zoom_in_button);
zoomOutButtonView = (ImageButton) view.findViewById(R.id.context_menu_zoom_out_button); zoomOutButtonView = (ImageButton) view.findViewById(R.id.context_menu_zoom_out_button);
if (menu.zoomButtonsVisible()) { if (menu.zoomButtonsVisible()) {
Context ctx = getContext(); AndroidUtils.updateImageButton(mapActivity, zoomInButtonView, R.drawable.map_zoom_in, R.drawable.map_zoom_in_night,
if (ctx != null) {
AndroidUtils.updateImageButton(ctx, zoomInButtonView, R.drawable.map_zoom_in, R.drawable.map_zoom_in_night,
R.drawable.btn_circle_trans, R.drawable.btn_circle_night, nightMode); R.drawable.btn_circle_trans, R.drawable.btn_circle_night, nightMode);
AndroidUtils.updateImageButton(ctx, zoomOutButtonView, R.drawable.map_zoom_out, R.drawable.map_zoom_out_night, AndroidUtils.updateImageButton(mapActivity, zoomOutButtonView, R.drawable.map_zoom_out, R.drawable.map_zoom_out_night,
R.drawable.btn_circle_trans, R.drawable.btn_circle_night, nightMode); R.drawable.btn_circle_trans, R.drawable.btn_circle_night, nightMode);
}
zoomInButtonView.setOnClickListener(new View.OnClickListener() { zoomInButtonView.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
@ -528,25 +525,25 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
routesBadgesContainer = (LinearLayout) view.findViewById(R.id.transport_badges_container); routesBadgesContainer = (LinearLayout) view.findViewById(R.id.transport_badges_container);
if (nightMode) { if (nightMode) {
nearbyRoutesWithinTv.setTextColor(ContextCompat.getColor(getContext(), R.color.ctx_menu_bottom_view_secondary_text_color_dark)); nearbyRoutesWithinTv.setTextColor(ContextCompat.getColor(mapActivity, R.color.text_color_secondary_dark));
localRoutesMoreTv.setTextColor(ContextCompat.getColor(getContext(), R.color.ctx_menu_bottom_view_secondary_text_color_dark)); localRoutesMoreTv.setTextColor(ContextCompat.getColor(mapActivity, R.color.text_color_secondary_dark));
} else { } else {
nearbyRoutesWithinTv.setTextColor(ContextCompat.getColor(getContext(), R.color.ctx_menu_nearby_routes_text_color_dark)); nearbyRoutesWithinTv.setTextColor(ContextCompat.getColor(mapActivity, R.color.text_color_secondary_light));
localRoutesMoreTv.setTextColor(ContextCompat.getColor(getContext(), R.color.ctx_menu_nearby_routes_text_color_dark)); localRoutesMoreTv.setTextColor(ContextCompat.getColor(mapActivity, R.color.text_color_secondary_light));
} }
View buttonsBottomBorder = view.findViewById(R.id.buttons_bottom_border); View buttonsBottomBorder = view.findViewById(R.id.buttons_bottom_border);
View buttonsTopBorder = view.findViewById(R.id.buttons_top_border); View buttonsTopBorder = view.findViewById(R.id.buttons_top_border);
buttonsBottomBorder.setBackgroundColor(ContextCompat.getColor(getContext(), nightMode ? R.color.ctx_menu_buttons_divider_dark : R.color.ctx_menu_buttons_divider_light)); buttonsBottomBorder.setBackgroundColor(ContextCompat.getColor(mapActivity, nightMode ? R.color.ctx_menu_buttons_divider_dark : R.color.ctx_menu_buttons_divider_light));
buttonsTopBorder.setBackgroundColor(ContextCompat.getColor(getContext(), nightMode ? R.color.ctx_menu_buttons_divider_dark : R.color.ctx_menu_buttons_divider_light)); buttonsTopBorder.setBackgroundColor(ContextCompat.getColor(mapActivity, nightMode ? R.color.ctx_menu_buttons_divider_dark : R.color.ctx_menu_buttons_divider_light));
View buttons = view.findViewById(R.id.context_menu_buttons); View buttons = view.findViewById(R.id.context_menu_buttons);
buttons.setBackgroundColor(ContextCompat.getColor(getContext(), nightMode ? R.color.ctx_menu_buttons_bg_dark : R.color.ctx_menu_buttons_bg_light)); buttons.setBackgroundColor(ContextCompat.getColor(mapActivity, nightMode ? R.color.ctx_menu_buttons_bg_dark : R.color.ctx_menu_buttons_bg_light));
if (!menu.buttonsVisible()) { if (!menu.buttonsVisible()) {
buttonsTopBorder.setVisibility(View.GONE); buttonsTopBorder.setVisibility(View.GONE);
buttons.setVisibility(View.GONE); buttons.setVisibility(View.GONE);
} }
View bottomButtons = view.findViewById(R.id.context_menu_bottom_buttons); View bottomButtons = view.findViewById(R.id.context_menu_bottom_buttons);
bottomButtons.setBackgroundColor(ContextCompat.getColor(getContext(), nightMode ? R.color.ctx_menu_buttons_bg_dark : R.color.ctx_menu_buttons_bg_light)); bottomButtons.setBackgroundColor(ContextCompat.getColor(mapActivity, nightMode ? R.color.ctx_menu_buttons_bg_dark : R.color.ctx_menu_buttons_bg_light));
if (!menu.navigateButtonVisible()) { if (!menu.navigateButtonVisible()) {
bottomButtons.findViewById(R.id.context_menu_directions_button).setVisibility(View.GONE); bottomButtons.findViewById(R.id.context_menu_directions_button).setVisibility(View.GONE);
} }
@ -605,7 +602,7 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
//Bottom buttons //Bottom buttons
int bottomButtonsColor = nightMode ? R.color.ctx_menu_controller_button_text_color_dark_n : R.color.ctx_menu_controller_button_text_color_light_n; int bottomButtonsColor = nightMode ? R.color.ctx_menu_controller_button_text_color_dark_n : R.color.ctx_menu_controller_button_text_color_light_n;
TextView detailsButton = (TextView) view.findViewById(R.id.context_menu_details_button); TextView detailsButton = (TextView) view.findViewById(R.id.context_menu_details_button);
detailsButton.setTextColor(ContextCompat.getColor(getContext(), bottomButtonsColor)); detailsButton.setTextColor(ContextCompat.getColor(mapActivity, bottomButtonsColor));
detailsButton.setOnClickListener(new View.OnClickListener() { detailsButton.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
@ -618,7 +615,7 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
iconResId = R.drawable.map_action_pedestrian_dark; iconResId = R.drawable.map_action_pedestrian_dark;
} }
Drawable drawable = getIcon(iconResId, bottomButtonsColor); Drawable drawable = getIcon(iconResId, bottomButtonsColor);
directionsButton.setTextColor(ContextCompat.getColor(getContext(), bottomButtonsColor)); directionsButton.setTextColor(ContextCompat.getColor(mapActivity, bottomButtonsColor));
directionsButton.setCompoundDrawablesWithIntrinsicBounds(null, null, drawable, null); directionsButton.setCompoundDrawablesWithIntrinsicBounds(null, null, drawable, null);
directionsButton.setCompoundDrawablePadding(dpToPx(8)); directionsButton.setCompoundDrawablePadding(dpToPx(8));
directionsButton.setOnClickListener(new View.OnClickListener() { directionsButton.setOnClickListener(new View.OnClickListener() {

View file

@ -584,7 +584,7 @@ public class MenuBuilder {
textViewSecondary.setLayoutParams(llTextSecondaryParams); textViewSecondary.setLayoutParams(llTextSecondaryParams);
textViewSecondary.setTypeface(FontCache.getRobotoRegular(view.getContext())); textViewSecondary.setTypeface(FontCache.getRobotoRegular(view.getContext()));
textViewSecondary.setTextSize(14); textViewSecondary.setTextSize(14);
textViewSecondary.setTextColor(app.getResources().getColor(light ? R.color.ctx_menu_bottom_view_secondary_text_color_light: R.color.ctx_menu_bottom_view_secondary_text_color_dark)); textViewSecondary.setTextColor(app.getResources().getColor(light ? R.color.text_color_secondary_light: R.color.text_color_secondary_dark));
textViewSecondary.setText(secondaryText); textViewSecondary.setText(secondaryText);
llText.addView(textViewSecondary); llText.addView(textViewSecondary);
} }

View file

@ -87,7 +87,7 @@ public class FavouritePointMenuBuilder extends MenuBuilder {
List<FavouritePoint> groupFavourites = favoriteGroup.points; List<FavouritePoint> groupFavourites = favoriteGroup.points;
if (groupFavourites.size() > 0) { if (groupFavourites.size() > 0) {
int color = favoriteGroup.color == 0 || favoriteGroup.color == Color.BLACK ? view.getResources().getColor(R.color.color_favorite) : favoriteGroup.color; int color = favoriteGroup.color == 0 || favoriteGroup.color == Color.BLACK ? view.getResources().getColor(R.color.color_favorite) : favoriteGroup.color;
int disabledColor = light ? R.color.secondary_text_light : R.color.secondary_text_dark; int disabledColor = light ? R.color.text_color_secondary_light : R.color.text_color_secondary_dark;
color = favoriteGroup.visible ? (color | 0xff000000) : view.getResources().getColor(disabledColor); color = favoriteGroup.visible ? (color | 0xff000000) : view.getResources().getColor(disabledColor);
String name = view.getContext().getString(R.string.context_menu_points_of_group); String name = view.getContext().getString(R.string.context_menu_points_of_group);
buildRow(view, app.getUIUtilities().getPaintedIcon(R.drawable.ic_action_folder, color), null, name, 0, null, buildRow(view, app.getUIUtilities().getPaintedIcon(R.drawable.ic_action_folder, color), null, name, 0, null,

View file

@ -2,23 +2,24 @@ package net.osmand.plus.mapcontextmenu.other;
import android.app.Activity; import android.app.Activity;
import android.os.Bundle; import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable; import android.support.annotation.Nullable;
import android.support.v4.app.Fragment; import android.support.v4.app.Fragment;
import android.support.v7.view.ContextThemeWrapper;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.Button; import android.widget.Button;
import android.widget.ImageButton; import android.widget.ImageButton;
import android.widget.TextView;
import net.osmand.AndroidUtils; import net.osmand.AndroidUtils;
import net.osmand.data.LatLon; import net.osmand.data.LatLon;
import net.osmand.plus.ApplicationMode; import net.osmand.plus.ApplicationMode;
import net.osmand.plus.UiUtilities;
import net.osmand.plus.OsmandSettings; import net.osmand.plus.OsmandSettings;
import net.osmand.plus.R; import net.osmand.plus.R;
import net.osmand.plus.TargetPointsHelper; import net.osmand.plus.TargetPointsHelper;
import net.osmand.plus.TargetPointsHelper.TargetPoint; import net.osmand.plus.TargetPointsHelper.TargetPoint;
import net.osmand.plus.UiUtilities;
import net.osmand.plus.activities.MapActivity; import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.poi.PoiFiltersHelper; import net.osmand.plus.poi.PoiFiltersHelper;
import net.osmand.plus.poi.PoiUIFilter; import net.osmand.plus.poi.PoiUIFilter;
@ -43,8 +44,11 @@ public class DestinationReachedMenuFragment extends Fragment {
@Nullable @Nullable
@Override @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.dest_reached_menu_fragment, container, false); ContextThemeWrapper ctx = new ContextThemeWrapper(getMapActivity(), menu.isLight() ? R.style.OsmandLightTheme : R.style.OsmandDarkTheme);
LayoutInflater inf = LayoutInflater.from(ctx);
View view = inf.inflate(R.layout.dest_reached_menu_fragment, container, false);
AndroidUtils.addStatusBarPadding21v(ctx, view);
view.setOnClickListener(new View.OnClickListener() { view.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
@ -66,14 +70,13 @@ public class DestinationReachedMenuFragment extends Fragment {
Button removeDestButton = (Button) view.findViewById(R.id.removeDestButton); Button removeDestButton = (Button) view.findViewById(R.id.removeDestButton);
removeDestButton.setCompoundDrawablesWithIntrinsicBounds( removeDestButton.setCompoundDrawablesWithIntrinsicBounds(
iconsCache.getIcon(R.drawable.ic_action_done, menu.isLight()), null, null, null); iconsCache.getIcon(R.drawable.ic_action_done, menu.isLight()), null, null, null);
AndroidUtils.setTextPrimaryColor(view.getContext(), removeDestButton, !menu.isLight());
removeDestButton.setOnClickListener(new View.OnClickListener() { removeDestButton.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
getMapActivity().getMyApplication().getTargetPointsHelper().removeWayPoint(true, -1); getMapActivity().getMyApplication().getTargetPointsHelper().removeWayPoint(true, -1);
Object contextMenuObj = getMapActivity().getContextMenu().getObject(); Object contextMenuObj = getMapActivity().getContextMenu().getObject();
if (getMapActivity().getContextMenu().isActive() if (getMapActivity().getContextMenu().isActive()
&& contextMenuObj != null && contextMenuObj instanceof TargetPoint) { && contextMenuObj instanceof TargetPoint) {
TargetPoint targetPoint = (TargetPoint) contextMenuObj; TargetPoint targetPoint = (TargetPoint) contextMenuObj;
if (!targetPoint.start && !targetPoint.intermediate) { if (!targetPoint.start && !targetPoint.intermediate) {
getMapActivity().getContextMenu().close(); getMapActivity().getContextMenu().close();
@ -89,7 +92,6 @@ public class DestinationReachedMenuFragment extends Fragment {
Button recalcDestButton = (Button) view.findViewById(R.id.recalcDestButton); Button recalcDestButton = (Button) view.findViewById(R.id.recalcDestButton);
recalcDestButton.setCompoundDrawablesWithIntrinsicBounds( recalcDestButton.setCompoundDrawablesWithIntrinsicBounds(
iconsCache.getIcon(R.drawable.ic_action_gdirections_dark, menu.isLight()), null, null, null); iconsCache.getIcon(R.drawable.ic_action_gdirections_dark, menu.isLight()), null, null, null);
AndroidUtils.setTextPrimaryColor(view.getContext(), recalcDestButton, !menu.isLight());
recalcDestButton.setOnClickListener(new View.OnClickListener() { recalcDestButton.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
@ -111,13 +113,12 @@ public class DestinationReachedMenuFragment extends Fragment {
ApplicationMode appMode = getMapActivity().getMyApplication().getRoutingHelper().getAppMode(); ApplicationMode appMode = getMapActivity().getMyApplication().getRoutingHelper().getAppMode();
if (!appMode.isDerivedRoutingFrom(appMode.CAR)) { if (!appMode.isDerivedRoutingFrom(ApplicationMode.CAR)) {
findParkingButton.setVisibility(View.GONE); findParkingButton.setVisibility(View.GONE);
} }
findParkingButton.setCompoundDrawablesWithIntrinsicBounds( findParkingButton.setCompoundDrawablesWithIntrinsicBounds(
iconsCache.getIcon(R.drawable.ic_action_parking_dark, menu.isLight()), null, null, null); iconsCache.getIcon(R.drawable.ic_action_parking_dark, menu.isLight()), null, null, null);
AndroidUtils.setTextPrimaryColor(view.getContext(), findParkingButton, !menu.isLight());
findParkingButton.setOnClickListener(new View.OnClickListener() { findParkingButton.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
@ -139,9 +140,6 @@ public class DestinationReachedMenuFragment extends Fragment {
AndroidUtils.setBackground(view.getContext(), mainView, !menu.isLight(), AndroidUtils.setBackground(view.getContext(), mainView, !menu.isLight(),
R.drawable.bg_bottom_menu_light, R.drawable.bg_bottom_menu_dark); R.drawable.bg_bottom_menu_light, R.drawable.bg_bottom_menu_dark);
} }
TextView title = (TextView) view.findViewById(R.id.titleTextView);
AndroidUtils.setTextPrimaryColor(view.getContext(), title, !menu.isLight());
return view; return view;
} }

View file

@ -249,10 +249,10 @@ public class SplitSegmentDialogFragment extends DialogFragment {
final List<GpxDisplayGroup> groups = getDisplayGroups(); final List<GpxDisplayGroup> groups = getDisplayGroups();
if (groups.size() > 0) { if (groups.size() > 0) {
colorId = app.getSettings().isLightContent() ? colorId = app.getSettings().isLightContent() ?
R.color.primary_text_light : R.color.primary_text_dark; R.color.text_color_primary_light : R.color.text_color_primary_dark;
} else { } else {
colorId = app.getSettings().isLightContent() ? colorId = app.getSettings().isLightContent() ?
R.color.secondary_text_light : R.color.secondary_text_dark; R.color.text_color_secondary_light : R.color.text_color_secondary_dark;
} }
int color = app.getResources().getColor(colorId); int color = app.getResources().getColor(colorId);
title.setTextColor(color); title.setTextColor(color);

View file

@ -640,10 +640,10 @@ public class TrackActivityFragmentAdapter implements TrackBitmapDrawerListener {
final List<GpxDisplayGroup> groups = getDisplayGroups(); final List<GpxDisplayGroup> groups = getDisplayGroups();
if (groups.size() > 0) { if (groups.size() > 0) {
colorId = app.getSettings().isLightContent() ? colorId = app.getSettings().isLightContent() ?
R.color.primary_text_light : R.color.primary_text_dark; R.color.text_color_primary_light : R.color.text_color_primary_dark;
} else { } else {
colorId = app.getSettings().isLightContent() ? colorId = app.getSettings().isLightContent() ?
R.color.secondary_text_light : R.color.secondary_text_dark; R.color.text_color_secondary_light : R.color.text_color_secondary_dark;
} }
int color = app.getResources().getColor(colorId); int color = app.getResources().getColor(colorId);
title.setTextColor(color); title.setTextColor(color);

View file

@ -247,7 +247,7 @@ public class ChooseRouteFragment extends BaseOsmAndFragment implements ContextMe
if (Build.VERSION.SDK_INT >= 23 && !nightMode) { if (Build.VERSION.SDK_INT >= 23 && !nightMode) {
view.setSystemUiVisibility(view.getSystemUiVisibility() | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR); view.setSystemUiVisibility(view.getSystemUiVisibility() | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
} }
return nightMode ? R.color.dialog_divider_dark : R.color.dialog_divider_light; return nightMode ? R.color.divider_color_dark : R.color.divider_color_light;
} else { } else {
if (Build.VERSION.SDK_INT >= 23 && !nightMode) { if (Build.VERSION.SDK_INT >= 23 && !nightMode) {
view.setSystemUiVisibility(view.getSystemUiVisibility() & ~View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR); view.setSystemUiVisibility(view.getSystemUiVisibility() & ~View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);

View file

@ -210,7 +210,7 @@ public class MapRouteInfoMenuFragment extends ContextMenuFragment {
if (Build.VERSION.SDK_INT >= 23 && !nightMode) { if (Build.VERSION.SDK_INT >= 23 && !nightMode) {
view.setSystemUiVisibility(view.getSystemUiVisibility() | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR); view.setSystemUiVisibility(view.getSystemUiVisibility() | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
} }
return nightMode ? R.color.dialog_divider_dark : R.color.dialog_divider_light; return nightMode ? R.color.divider_color_dark : R.color.divider_color_light;
} else { } else {
if (Build.VERSION.SDK_INT >= 23 && !nightMode) { if (Build.VERSION.SDK_INT >= 23 && !nightMode) {
view.setSystemUiVisibility(view.getSystemUiVisibility() & ~View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR); view.setSystemUiVisibility(view.getSystemUiVisibility() & ~View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);

View file

@ -342,13 +342,13 @@ public class MapInfoWidgetsFactory {
protected boolean topBarSwitchChecked = false; protected boolean topBarSwitchChecked = false;
@ColorRes @ColorRes
int titleTextClrLightId = R.color.primary_text_light; int titleTextClrLightId = R.color.text_color_primary_light;
@ColorRes @ColorRes
int titleTextClrDarkId = R.color.primary_text_dark; int titleTextClrDarkId = R.color.text_color_primary_dark;
@ColorRes @ColorRes
int descrTextClrLightId = R.color.primary_text_light; int descrTextClrLightId = R.color.text_color_primary_light;
@ColorRes @ColorRes
int descrTextClrDarkId = R.color.primary_text_dark; int descrTextClrDarkId = R.color.text_color_primary_dark;
@ColorInt @ColorInt
int titleTextClrLight = -1; int titleTextClrLight = -1;
@ColorInt @ColorInt

View file

@ -248,7 +248,7 @@ public class WikivoyageArticleNavigationFragment extends MenuBottomSheetDialogFr
? R.color.wikivoyage_contents_parent_icon_dark : R.color.wikivoyage_contents_parent_icon_light)); ? R.color.wikivoyage_contents_parent_icon_dark : R.color.wikivoyage_contents_parent_icon_light));
} else { } else {
txtListChild.setTextColor(ContextCompat.getColor(context, nightMode txtListChild.setTextColor(ContextCompat.getColor(context, nightMode
? R.color.secondary_text_dark : R.color.secondary_text_light)); ? R.color.text_color_secondary_dark : R.color.text_color_secondary_light));
} }
txtListChild.setCompoundDrawablesWithIntrinsicBounds(itemChildIcon, null, null, null); txtListChild.setCompoundDrawablesWithIntrinsicBounds(itemChildIcon, null, null, null);
@ -274,7 +274,7 @@ public class WikivoyageArticleNavigationFragment extends MenuBottomSheetDialogFr
? R.color.wikivoyage_contents_parent_icon_dark : R.color.wikivoyage_contents_parent_icon_light)); ? R.color.wikivoyage_contents_parent_icon_dark : R.color.wikivoyage_contents_parent_icon_light));
} else { } else {
lblListHeader.setTextColor(ContextCompat.getColor(context, nightMode lblListHeader.setTextColor(ContextCompat.getColor(context, nightMode
? R.color.secondary_text_dark : R.color.secondary_text_light)); ? R.color.text_color_secondary_dark : R.color.text_color_secondary_light));
} }
lblListHeader.setCompoundDrawablesWithIntrinsicBounds(itemGroupIcon, null, null, null); lblListHeader.setCompoundDrawablesWithIntrinsicBounds(itemGroupIcon, null, null, null);