From 5d52f9e49c19671ec14b7ded1ed56eb58274f3ef Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Date: Mon, 5 Jan 2026 18:43:16 +0100 Subject: [PATCH] [android] Use dark background in the editor Signed-off-by: Jean-Baptiste --- android/app/src/main/res/layout/button_new_item.xml | 2 +- android/app/src/main/res/layout/fragment_editor.xml | 3 +-- .../app/src/main/res/layout/fragment_editor_host.xml | 3 +-- android/app/src/main/res/layout/fragment_phone.xml | 4 ++-- android/app/src/main/res/layout/fragment_timetable.xml | 7 +++---- .../main/res/layout/fragment_timetable_advanced.xml | 5 ++--- .../src/main/res/layout/fragment_timetable_simple.xml | 2 +- android/app/src/main/res/layout/item_charge_socket.xml | 2 +- .../app/src/main/res/layout/item_charging_sockets.xml | 3 ++- android/app/src/main/res/layout/localized_name.xml | 8 +++++++- android/app/src/main/res/layout/recycler_default.xml | 2 +- android/app/src/main/res/values-night/colors.xml | 2 ++ android/app/src/main/res/values/colors.xml | 2 ++ android/app/src/main/res/values/styles-editor.xml | 10 +++++++++- android/app/src/main/res/values/styles.xml | 4 ---- android/app/src/main/res/values/themes.xml | 4 ---- 16 files changed, 35 insertions(+), 28 deletions(-) diff --git a/android/app/src/main/res/layout/button_new_item.xml b/android/app/src/main/res/layout/button_new_item.xml index 9d238de6b..10d296650 100644 --- a/android/app/src/main/res/layout/button_new_item.xml +++ b/android/app/src/main/res/layout/button_new_item.xml @@ -8,7 +8,7 @@ android:layout_margin="4dp" android:clickable="true" android:focusable="true" - app:cardBackgroundColor="?cardBackground" + app:cardBackgroundColor="?appBackground" app:cardCornerRadius="12dp" app:cardElevation="2dp" tools:showIn="@layout/item_charging_sockets"> diff --git a/android/app/src/main/res/layout/fragment_editor.xml b/android/app/src/main/res/layout/fragment_editor.xml index 3715c47a3..fa913e98f 100644 --- a/android/app/src/main/res/layout/fragment_editor.xml +++ b/android/app/src/main/res/layout/fragment_editor.xml @@ -6,6 +6,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:clipToPadding="false" + android:background="@color/bg_editor" tools:context=".editor.EditorActivity"> @@ -441,7 +441,6 @@ android:layout_height="wrap_content" android:gravity="center" android:layout_marginBottom="@dimen/margin_base" - app:backgroundTint="?cardBackground" android:textColor="@color/base_red" app:strokeColor="@color/base_red" tools:text="Reset my changes"/> diff --git a/android/app/src/main/res/layout/fragment_editor_host.xml b/android/app/src/main/res/layout/fragment_editor_host.xml index 9ea3723ec..ab1f62182 100644 --- a/android/app/src/main/res/layout/fragment_editor_host.xml +++ b/android/app/src/main/res/layout/fragment_editor_host.xml @@ -2,10 +2,9 @@ + android:background="@color/bg_editor" + android:layout_marginBottom="@dimen/margin_quarter"> diff --git a/android/app/src/main/res/layout/fragment_timetable.xml b/android/app/src/main/res/layout/fragment_timetable.xml index 700a7ea8d..0dd8ac169 100644 --- a/android/app/src/main/res/layout/fragment_timetable.xml +++ b/android/app/src/main/res/layout/fragment_timetable.xml @@ -9,7 +9,7 @@ style="@style/MwmWidget.FrameLayout.Elevation" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="?windowBackgroundForced" + android:background="@color/bg_editor" android:layout_above="@+id/tv__mode_switch" android:layout_below="@id/toolbar"/> @@ -19,14 +19,13 @@ android:layout_height="wrap_content" android:layout_alignTop="@+id/tv__mode_switch" android:layout_alignParentBottom="true" - android:background="?cardBackground"/> + android:background="@color/bg_editor"/> diff --git a/android/app/src/main/res/layout/fragment_timetable_advanced.xml b/android/app/src/main/res/layout/fragment_timetable_advanced.xml index bd729e103..51514a767 100644 --- a/android/app/src/main/res/layout/fragment_timetable_advanced.xml +++ b/android/app/src/main/res/layout/fragment_timetable_advanced.xml @@ -5,7 +5,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="?windowBackgroundForced"> + android:background="@color/bg_editor"> + style="@style/MwmWidget.M3.Editor.CardView"> diff --git a/android/app/src/main/res/layout/item_charge_socket.xml b/android/app/src/main/res/layout/item_charge_socket.xml index eeb49abef..04fecac58 100644 --- a/android/app/src/main/res/layout/item_charge_socket.xml +++ b/android/app/src/main/res/layout/item_charge_socket.xml @@ -6,7 +6,7 @@ android:layout_margin="4dp" android:clickable="true" android:focusable="true" - app:cardBackgroundColor="?cardBackground" + app:cardBackgroundColor="?appBackground" app:cardCornerRadius="12dp" app:cardElevation="2dp"> diff --git a/android/app/src/main/res/layout/item_charging_sockets.xml b/android/app/src/main/res/layout/item_charging_sockets.xml index 5ca42266e..e0dfde78a 100644 --- a/android/app/src/main/res/layout/item_charging_sockets.xml +++ b/android/app/src/main/res/layout/item_charging_sockets.xml @@ -21,5 +21,6 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/edit_socket_info_tooltip" - android:textAppearance="?android:attr/textAppearanceSmall" /> + android:textAppearance="?android:attr/textAppearanceSmall" + android:layout_marginBottom="@dimen/margin_quarter"/> \ No newline at end of file diff --git a/android/app/src/main/res/layout/localized_name.xml b/android/app/src/main/res/layout/localized_name.xml index d0cabef51..3f45c124c 100644 --- a/android/app/src/main/res/layout/localized_name.xml +++ b/android/app/src/main/res/layout/localized_name.xml @@ -7,6 +7,7 @@ android:orientation="vertical" android:paddingEnd="@dimen/margin_base" android:paddingStart="@dimen/margin_base" + android:background="@color/fg_editor" android:animateLayoutChanges="true"> - + diff --git a/android/app/src/main/res/values-night/colors.xml b/android/app/src/main/res/values-night/colors.xml index 7f7af0456..d7ea723a6 100644 --- a/android/app/src/main/res/values-night/colors.xml +++ b/android/app/src/main/res/values-night/colors.xml @@ -16,6 +16,8 @@ @color/bg_window #FF588157 #10140F + #161b14 + #282e25 #CC2D3237 diff --git a/android/app/src/main/res/values/colors.xml b/android/app/src/main/res/values/colors.xml index 67ece1c6d..5998dc52a 100644 --- a/android/app/src/main/res/values/colors.xml +++ b/android/app/src/main/res/values/colors.xml @@ -65,6 +65,8 @@ @color/bg_window #37653F @android:color/white + #ebefe4 + #f9faf2 #BB000000 #99FFFFFF diff --git a/android/app/src/main/res/values/styles-editor.xml b/android/app/src/main/res/values/styles-editor.xml index 52bf50066..ab77e8cd4 100644 --- a/android/app/src/main/res/values/styles-editor.xml +++ b/android/app/src/main/res/values/styles-editor.xml @@ -89,8 +89,16 @@ match_parent wrap_content @dimen/margin_half - ?cardBackground + @color/fg_editor @dimen/margin_base false + \ No newline at end of file diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml index e8811e55d..8381e529d 100644 --- a/android/app/src/main/res/values/styles.xml +++ b/android/app/src/main/res/values/styles.xml @@ -239,10 +239,6 @@ @drawable/shadow_top - - - -