diff --git a/android/app/src/main/java/app/organicmaps/car/screens/CategoriesScreen.java b/android/app/src/main/java/app/organicmaps/car/screens/CategoriesScreen.java index 7598bfbf0c..a15fd8e90a 100644 --- a/android/app/src/main/java/app/organicmaps/car/screens/CategoriesScreen.java +++ b/android/app/src/main/java/app/organicmaps/car/screens/CategoriesScreen.java @@ -30,15 +30,15 @@ public class CategoriesScreen extends BaseMapScreen private record CategoryData(@StringRes int nameResId, @DrawableRes int iconResId, @DrawableRes int iconNightResId) { } - + //TODO: previously handled theme by itself, but now icons are dynamic so not needed. private static final List CATEGORIES = Arrays.asList( - new CategoryData(R.string.category_fuel, R.drawable.ic_category_fuel, R.drawable.ic_category_fuel_night), - new CategoryData(R.string.category_parking, R.drawable.ic_category_parking, R.drawable.ic_category_parking_night), - new CategoryData(R.string.category_eat, R.drawable.ic_category_eat, R.drawable.ic_category_eat_night), - new CategoryData(R.string.category_food, R.drawable.ic_category_food, R.drawable.ic_category_food_night), - new CategoryData(R.string.category_hotel, R.drawable.ic_category_hotel, R.drawable.ic_category_hotel_night), - new CategoryData(R.string.category_toilet, R.drawable.ic_category_toilet, R.drawable.ic_category_toilet_night), - new CategoryData(R.string.category_rv, R.drawable.ic_category_rv, R.drawable.ic_category_rv_night) + new CategoryData(R.string.category_fuel, R.drawable.ic_category_fuel, R.drawable.ic_category_fuel), + new CategoryData(R.string.category_parking, R.drawable.ic_category_parking, R.drawable.ic_category_parking), + new CategoryData(R.string.category_eat, R.drawable.ic_category_eat, R.drawable.ic_category_eat), + new CategoryData(R.string.category_food, R.drawable.ic_category_food, R.drawable.ic_category_food), + new CategoryData(R.string.category_hotel, R.drawable.ic_category_hotel, R.drawable.ic_category_hotel), + new CategoryData(R.string.category_toilet, R.drawable.ic_category_toilet, R.drawable.ic_category_toilet), + new CategoryData(R.string.category_rv, R.drawable.ic_category_rv, R.drawable.ic_category_rv) ); private final int MAX_CATEGORIES_SIZE; diff --git a/android/app/src/main/java/app/organicmaps/maplayer/traffic/widget/TrafficButton.java b/android/app/src/main/java/app/organicmaps/maplayer/traffic/widget/TrafficButton.java index 7d254867c0..5b1b0f339f 100644 --- a/android/app/src/main/java/app/organicmaps/maplayer/traffic/widget/TrafficButton.java +++ b/android/app/src/main/java/app/organicmaps/maplayer/traffic/widget/TrafficButton.java @@ -39,14 +39,14 @@ public class TrafficButton { Context context = trafficBtn.getContext(); Resources res = context.getResources(); - final int animResId = ThemeUtils.getResource(context, R.attr.trafficLoadingAnimation); + final int animResId = R.drawable.anim_traffic_loading; return (AnimationDrawable) Objects.requireNonNull(ResourcesCompat.getDrawable(res, animResId, context.getTheme())); } void turnOff() { stopWaitingAnimation(); -// Don't set theme programatically - use an xml with a night variant instead. +// Don't set theme programatically - use an xml with a night variant instead. Also convert to svg. // mButton.setImageResource(ThemeUtils.isNightTheme(mButton.getContext()) ? R.drawable.ic_traffic_on_night // : R.drawable.ic_traffic_on); } @@ -54,7 +54,7 @@ public class TrafficButton void turnOn() { stopWaitingAnimation(); -// Don't set theme programatically - use an xml with a night variant instead. +// Don't set theme programatically - use an xml with a night variant instead. Also convert to svg. // mButton.setImageResource(ThemeUtils.isNightTheme(mButton.getContext()) ? R.drawable.ic_traffic_on_night // : R.drawable.ic_traffic_on); } @@ -62,7 +62,7 @@ public class TrafficButton void markAsOutdated() { stopWaitingAnimation(); -// Don't set theme programatically - use an xml with a night variant instead. +// Don't set theme programatically - use an xml with a night variant instead. Also convert to svg. // mButton.setImageResource(ThemeUtils.isNightTheme(mButton.getContext()) ? R.drawable.ic_traffic_outdated_night // : R.drawable.ic_traffic_outdated); } diff --git a/android/app/src/main/java/app/organicmaps/routing/RoutingBottomMenuController.java b/android/app/src/main/java/app/organicmaps/routing/RoutingBottomMenuController.java index e9745a52b5..a15a423cce 100644 --- a/android/app/src/main/java/app/organicmaps/routing/RoutingBottomMenuController.java +++ b/android/app/src/main/java/app/organicmaps/routing/RoutingBottomMenuController.java @@ -146,7 +146,7 @@ final class RoutingBottomMenuController implements View.OnClickListener mActionIcon = mActionButton.findViewById(R.id.iv__icon); UiUtils.hide(mAltitudeChartFrame, mActionFrame); mListener = listener; - int dividerRes = ThemeUtils.getResource(mContext, R.attr.transitStepDivider); + int dividerRes = R.drawable.dot_divider; Drawable dividerDrawable = ContextCompat.getDrawable(mContext, dividerRes); Resources res = mContext.getResources(); mTransitViewDecorator = new DotDividerItemDecoration(dividerDrawable, res.getDimensionPixelSize(R.dimen.margin_base), diff --git a/android/app/src/main/res/drawable-night/button_accent.xml b/android/app/src/main/res/drawable-night/button_accent.xml index 192a6af3ec..102a72b2a8 100644 --- a/android/app/src/main/res/drawable-night/button_accent.xml +++ b/android/app/src/main/res/drawable-night/button_accent.xml @@ -3,5 +3,5 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:color="?attr/colorBtnHighlight"> - + diff --git a/android/app/src/main/res/drawable-night/button_accent_internal.xml b/android/app/src/main/res/drawable-night/button_accent_internal.xml index 67c7755d24..d2aa33222d 100644 --- a/android/app/src/main/res/drawable-night/button_accent_internal.xml +++ b/android/app/src/main/res/drawable-night/button_accent_internal.xml @@ -1,9 +1,9 @@ - - - + diff --git a/android/app/src/main/res/layout-land/layout_nav_top.xml b/android/app/src/main/res/layout-land/layout_nav_top.xml index 3ed8acfe81..c6cc284af4 100644 --- a/android/app/src/main/res/layout-land/layout_nav_top.xml +++ b/android/app/src/main/res/layout-land/layout_nav_top.xml @@ -48,7 +48,7 @@ android:layout_height="wrap_content" android:layout_margin="@dimen/margin_half" android:orientation="vertical" - android:background="?navNextTurnFrame" + android:background="@drawable/bg_nav_next_turn" android:elevation="@dimen/nav_elevation"> diff --git a/android/app/src/main/res/layout/current_location_marker.xml b/android/app/src/main/res/layout/current_location_marker.xml index 50ec2a1c59..7741c329b3 100644 --- a/android/app/src/main/res/layout/current_location_marker.xml +++ b/android/app/src/main/res/layout/current_location_marker.xml @@ -11,7 +11,7 @@ android:id="@+id/label" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:background="?elevationProfileYourLocationPinBg" + android:background="@drawable/bg_your_location_pin" android:ellipsize="end" android:paddingStart="@dimen/margin_quarter" android:paddingEnd="@dimen/margin_quarter" diff --git a/android/app/src/main/res/layout/elevation_profile.xml b/android/app/src/main/res/layout/elevation_profile.xml index e8caa071ef..59623905aa 100644 --- a/android/app/src/main/res/layout/elevation_profile.xml +++ b/android/app/src/main/res/layout/elevation_profile.xml @@ -23,7 +23,7 @@ android:layout_marginStart="@dimen/margin_half" android:layout_marginTop="@dimen/margin_quarter" android:layout_marginEnd="@dimen/margin_base_plus" - android:background="?altitudeBg" + android:background="@drawable/bg_altitude" android:paddingStart="@dimen/margin_quarter_plus" android:paddingTop="@dimen/margin_eighth" android:paddingEnd="@dimen/margin_quarter_plus" @@ -39,7 +39,7 @@ android:layout_marginStart="@dimen/margin_half" android:layout_marginEnd="@dimen/margin_base_plus" android:layout_marginBottom="@dimen/margin_base_plus" - android:background="?altitudeBg" + android:background="@drawable/bg_altitude" android:paddingStart="@dimen/margin_quarter_plus" android:paddingTop="@dimen/margin_eighth" android:paddingEnd="@dimen/margin_quarter_plus" diff --git a/android/app/src/main/res/layout/elevation_profile_internal.xml b/android/app/src/main/res/layout/elevation_profile_internal.xml index 564b3ade8f..993fafc75b 100644 --- a/android/app/src/main/res/layout/elevation_profile_internal.xml +++ b/android/app/src/main/res/layout/elevation_profile_internal.xml @@ -43,7 +43,7 @@ android:layout_height="match_parent" android:layout_marginEnd="@dimen/margin_quarter" android:layout_weight="1" - android:background="?elevationProfilePropertyBg" + android:background="@drawable/bg_rounded_rect" android:gravity="center_horizontal" android:orientation="vertical" android:padding="@dimen/margin_quarter_plus"> @@ -73,7 +73,7 @@ android:layout_height="match_parent" android:layout_marginEnd="@dimen/margin_quarter" android:layout_weight="1" - android:background="?elevationProfilePropertyBg" + android:background="@drawable/bg_rounded_rect" android:gravity="center_horizontal" android:orientation="vertical" android:padding="@dimen/margin_quarter_plus"> @@ -103,7 +103,7 @@ android:layout_height="match_parent" android:layout_marginEnd="@dimen/margin_quarter" android:layout_weight="1" - android:background="?elevationProfilePropertyBg" + android:background="@drawable/bg_rounded_rect" android:gravity="center_horizontal" android:orientation="vertical" android:padding="@dimen/margin_quarter_plus"> @@ -132,7 +132,7 @@ android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" - android:background="?elevationProfilePropertyBg" + android:background="@drawable/bg_rounded_rect" android:gravity="center_horizontal" android:orientation="vertical" android:padding="@dimen/margin_quarter_plus"> diff --git a/android/app/src/main/res/layout/floating_marker_view.xml b/android/app/src/main/res/layout/floating_marker_view.xml index 6cee6ebd65..169678c9aa 100644 --- a/android/app/src/main/res/layout/floating_marker_view.xml +++ b/android/app/src/main/res/layout/floating_marker_view.xml @@ -38,7 +38,7 @@ android:layout_marginTop="@dimen/margin_half" android:layout_marginBottom="@dimen/margin_half" android:layout_toEndOf="@id/floating_triangle" - android:background="?elevationProfileSelectedPointBg" + android:background="@drawable/bg_point_desc" android:elevation="@dimen/margin_eighth" android:maxWidth="@dimen/dialog_min_height" android:padding="@dimen/margin_quarter_plus" diff --git a/android/app/src/main/res/layout/layout_nav_top.xml b/android/app/src/main/res/layout/layout_nav_top.xml index 93ea3b9771..a3adf0d6d9 100644 --- a/android/app/src/main/res/layout/layout_nav_top.xml +++ b/android/app/src/main/res/layout/layout_nav_top.xml @@ -48,7 +48,7 @@ android:layout_height="wrap_content" android:layout_margin="@dimen/margin_half" android:orientation="vertical" - android:background="?navNextTurnFrame" + android:background="@drawable/bg_nav_next_turn" android:elevation="@dimen/nav_elevation"> diff --git a/android/app/src/main/res/values-night/themes-base.xml b/android/app/src/main/res/values-night/themes-base.xml index 11d4d6eb76..2716dc5779 100644 --- a/android/app/src/main/res/values-night/themes-base.xml +++ b/android/app/src/main/res/values-night/themes-base.xml @@ -46,18 +46,14 @@ @color/bg_cards_night @color/bg_window_night - @drawable/bg_nav_next_turn_night - @drawable/bg_nav_next_next_turn_night @color/base_accent_night @color/nav_lane_arrow_active_night @color/nav_lane_arrow_inactive_night - @drawable/button_night @color/button_text_night @color/button_text_disabled_night @color/base_accent_night - @drawable/button_accent_night @color/button_accent_text_night @@ -71,9 +67,7 @@ @color/bg_menu_night - @drawable/ic_menu_location_pending_night @drawable/anim_spinner_pending - @drawable/anim_traffic_loading_night @style/MwmTheme.NavButtonsRect @style/MwmTheme.NavButtonsRound @@ -85,11 +79,9 @@ @color/routing_button_tint @color/bg_primary_dark_night - @drawable/list_divider_night @color/white_4 @color/white_4 - @drawable/dot_divider_night @color/accent_color_selector_night @style/TextAppearance @style/TextAppearance.Small @@ -109,12 +101,8 @@ @style/TextAppearance.MdcTypographyStyles.Caption @style/TextAppearance.MdcTypographyStyles.Overline @color/driving_options_bg_black - @drawable/bg_rounded_rect_night @color/white_secondary - @drawable/bg_altitude_night @color/white_54 - @drawable/bg_your_location_pin_night - @drawable/bg_point_desc_night @drawable/ic_triangle_night @drawable/ic_triangle_elevation_night @color/elevation_profile_dark diff --git a/android/app/src/main/res/values-night/themes.xml b/android/app/src/main/res/values-night/themes.xml index 237a0c34f4..d489133669 100644 --- a/android/app/src/main/res/values-night/themes.xml +++ b/android/app/src/main/res/values-night/themes.xml @@ -33,11 +33,11 @@ diff --git a/android/app/src/main/res/values/themes-attrs.xml b/android/app/src/main/res/values/themes-attrs.xml index d8ee76d584..27b5c7bdb0 100644 --- a/android/app/src/main/res/values/themes-attrs.xml +++ b/android/app/src/main/res/values/themes-attrs.xml @@ -18,16 +18,12 @@ - - - - @@ -35,9 +31,7 @@ - - @@ -50,7 +44,6 @@ - @@ -66,12 +59,8 @@ - - - - diff --git a/android/app/src/main/res/values/themes-base.xml b/android/app/src/main/res/values/themes-base.xml index 6ae504024b..955a55ae4b 100644 --- a/android/app/src/main/res/values/themes-base.xml +++ b/android/app/src/main/res/values/themes-base.xml @@ -44,18 +44,14 @@ @color/bg_cards ?panel - @drawable/bg_nav_next_turn - @drawable/bg_nav_next_next_turn @color/base_accent @color/nav_lane_arrow_active_light @color/nav_lane_arrow_inactive_light - @drawable/button @color/button_text @color/button_text_disabled @color/base_accent - @drawable/button_accent @color/button_text_accent @@ -69,9 +65,7 @@ @color/bg_menu - @drawable/ic_menu_location_pending @drawable/anim_spinner_pending - @drawable/anim_traffic_loading @style/MwmTheme.NavButtonsRect @style/MwmTheme.NavButtonsRound @@ -83,14 +77,10 @@ @color/routing_button_tint @color/bg_primary_dark - @style/PreferenceThemeOverlay.v14.Material - @drawable/list_divider - @color/black_4 @color/black_4 - @drawable/dot_divider @drawable/ic_layers_outdoors_active @drawable/ic_layers_traffic_active @drawable/ic_layers_subway_active @@ -122,12 +112,8 @@ @style/TextAppearance.MdcTypographyStyles.Caption @style/TextAppearance.MdcTypographyStyles.Overline @color/light_green - @drawable/bg_rounded_rect @color/black_secondary - @drawable/bg_altitude @color/black_54 - @drawable/bg_your_location_pin - @drawable/bg_point_desc @drawable/ic_triangle @drawable/ic_triangle_elevation @color/elevation_profile