[android] Use dark background in the editor

Signed-off-by: Jean-Baptiste <jeanbaptiste.charron@outlook.fr>
This commit is contained in:
Jean-Baptiste
2026-01-05 18:43:16 +01:00
parent 20d9185c79
commit 721991048c
13 changed files with 22 additions and 29 deletions

View File

@@ -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">

View File

@@ -430,7 +430,6 @@
android:layout_height="wrap_content"
android:gravity="center"
android:layout_marginBottom="@dimen/margin_quarter"
app:backgroundTint="?cardBackground"
android:textColor="@color/base_red"
app:strokeColor="@color/base_red"
android:text="@string/editor_business_vacant_button"/>
@@ -441,7 +440,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"/>

View File

@@ -5,7 +5,6 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="?windowBackgroundForced"
android:orientation="vertical">
<com.google.android.material.appbar.MaterialToolbar

View File

@@ -10,13 +10,12 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/frameLayout"
android:background="?windowBackgroundForced">
android:layout_marginBottom="@dimen/margin_quarter">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/phones_recycler"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?cardBackground"
android:scrollbars="vertical" />
</FrameLayout>

View File

@@ -9,7 +9,6 @@
style="@style/MwmWidget.FrameLayout.Elevation"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?windowBackgroundForced"
android:layout_above="@+id/tv__mode_switch"
android:layout_below="@id/toolbar"/>
@@ -18,15 +17,13 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignTop="@+id/tv__mode_switch"
android:layout_alignParentBottom="true"
android:background="?cardBackground"/>
android:layout_alignParentBottom="true" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/tv__mode_switch"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="?clickableBackground"
android:gravity="center_vertical"
android:padding="@dimen/margin_base"
android:text="@string/editor_time_advanced"
@@ -35,7 +32,7 @@
android:textColor="?colorSecondary" />
<include
layout="@layout/shadow_bottom"
layout="@layout/item_divider"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@id/tv__mode_switch"/>

View File

@@ -4,8 +4,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?windowBackgroundForced">
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
@@ -17,8 +16,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_half"
style="@style/MwmWidget.M3.Editor.CardView"
app:cardBackgroundColor="?cardBackground">
style="@style/MwmWidget.M3.Editor.CardView">
<LinearLayout
android:id="@+id/examples"

View File

@@ -4,7 +4,7 @@
android:id="@+id/recycler"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?windowBackgroundForced"
android:background="?appBackground"
android:paddingStart="@dimen/margin_half"
android:paddingEnd="@dimen/margin_half"
android:scrollbars="vertical"/>

View File

@@ -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">

View File

@@ -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"/>
</LinearLayout>

View File

@@ -4,5 +4,5 @@
android:id="@+id/recycler"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?cardBackground"
android:background="?appBackground"
android:scrollbars="vertical"/>

View File

@@ -85,12 +85,21 @@
<item name="android:textAppearance">@style/MwmTextAppearance.Body1</item>
</style>
<style name="MwmWidget.M3.Editor.CardView" parent="Widget.Material3.CardView.Elevated">
<style name="MwmWidget.M3.Editor.CardView" parent="Widget.Material3.CardView.Outlined">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_marginBottom">@dimen/margin_half</item>
<item name="cardBackgroundColor">?cardBackground</item>
<item name="cardBackgroundColor">?appBackground</item>
<item name="android:padding">@dimen/margin_base</item>
<item name="cardPreventCornerOverlap">false</item>
</style>
<style name="MwmWidget.M3.CardView" parent="Widget.Material3.CardView.Elevated">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_marginBottom">@dimen/margin_half</item>
<item name="cardBackgroundColor">?cardBackground</item>
<item name="android:padding">@dimen/margin_base</item>
<item name="cardPreventCornerOverlap">false</item>
</style>
</resources>

View File

@@ -242,10 +242,6 @@
<item name="android:foreground">@drawable/shadow_top</item>
</style>
<style name="MwmWidget.FrameLayout.BookmarkCategories">
<item name="android:background">?windowBackgroundForced</item>
</style>
<style name="MwmWidget.Counter">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>

View File

@@ -277,10 +277,6 @@
<style name="MwmTheme.Navigation">
<item name="iconTint">@color/white_primary</item>
</style>
<style name="PopupMenu" parent="ThemeOverlay.Material3">
<item name="android:popupBackground">?windowBackgroundForced</item>
</style>
<!-- Theme required to apply M3 dialog style on preference screen -->
<style name="MwmTheme.M3.AlertDialog" parent="ThemeOverlay.Material3.MaterialAlertDialog">
<item name="dialogCornerRadius">28dp</item>