summaryrefslogtreecommitdiffhomepage
path: root/ui/src/main/res/values
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2022-05-26 06:00:29 +0530
committerHarsh Shandilya <me@msfjarvis.dev>2022-05-26 06:49:22 +0530
commit5d14caf3b26abaf8dcffdaa83e104e512df4d65b (patch)
tree4282c904fcd6c9897e2ae4487bc9c2b0c332c46f /ui/src/main/res/values
parent81c571f0c700f4da438ae06e3a61cfa984374785 (diff)
ui: move default style to Material3 with Dynamic Colors
The TV theme has been kept as-is since Material You guidance around this is a bit scarce at the moment. Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Diffstat (limited to 'ui/src/main/res/values')
-rw-r--r--ui/src/main/res/values/styles.xml19
-rw-r--r--ui/src/main/res/values/tv_styles.xml18
2 files changed, 17 insertions, 20 deletions
diff --git a/ui/src/main/res/values/styles.xml b/ui/src/main/res/values/styles.xml
index b90f111f..396f156c 100644
--- a/ui/src/main/res/values/styles.xml
+++ b/ui/src/main/res/values/styles.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android">
- <style name="WireGuardTheme" parent="Theme.MaterialComponents.DayNight">
+ <style name="WireGuardTheme" parent="Theme.Material3.DayNight">
<item name="colorPrimary">@color/primary_color</item>
<item name="colorOnPrimary">@color/color_control_normal</item>
<item name="colorPrimaryDark">@color/primary_color</item>
@@ -17,9 +17,6 @@
<item name="elevationOverlayEnabled">true</item>
<item name="android:statusBarColor">@color/status_bar_color</item>
<item name="android:windowBackground">@color/primary_color</item>
- <item name="alertDialogTheme">@style/AppTheme.Dialog</item>
- <item name="materialAlertDialogTheme">@style/AppTheme.Dialog</item>
- <item name="textInputStyle">@style/TextInputLayoutBase</item>
<item name="materialCardViewStyle">@style/AppTheme.MaterialCardView</item>
</style>
@@ -32,12 +29,6 @@
<item name="cardBackgroundColor">?attr/elevationOverlayColor</item>
</style>
- <style name="AppTheme.Dialog" parent="Theme.MaterialComponents.DayNight.Dialog.Alert">
- <item name="colorPrimary">@color/secondary_color</item>
- <item name="colorSecondary">@color/secondary_color</item>
- <item name="android:windowBackground">?attr/colorBackground</item>
- </style>
-
<style name="BottomSheetDialogTheme" parent="ThemeOverlay.MaterialComponents.BottomSheetDialog">
<item name="android:windowIsFloating">false</item>
<item name="android:navigationBarColor">?attr/colorBackground</item>
@@ -70,12 +61,4 @@
<style name="ThemeOverlay.AppTheme.TextInputEditText.OutlinedBox" parent="ThemeOverlay.MaterialComponents.TextInputEditText.OutlinedBox">
<item name="colorControlActivated">@color/color_control_normal</item>
</style>
-
- <style name="TextInputLayoutBase" parent="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
- <item name="boxStrokeColor">?attr/colorSecondary</item>
- <item name="hintTextColor">?attr/colorOnPrimary</item>
- <item name="materialThemeOverlay">
- @style/ThemeOverlay.AppTheme.TextInputEditText.OutlinedBox
- </item>
- </style>
</resources>
diff --git a/ui/src/main/res/values/tv_styles.xml b/ui/src/main/res/values/tv_styles.xml
index c5477f6a..536ca752 100644
--- a/ui/src/main/res/values/tv_styles.xml
+++ b/ui/src/main/res/values/tv_styles.xml
@@ -16,12 +16,26 @@
<item name="elevationOverlayEnabled">false</item>
<item name="android:statusBarColor">@color/tv_primary_color</item>
<item name="android:windowBackground">@color/tv_primary_color</item>
- <item name="alertDialogTheme">@style/AppTheme.Dialog</item>
- <item name="materialAlertDialogTheme">@style/AppTheme.Dialog</item>
+ <item name="alertDialogTheme">@style/TvTheme.Dialog</item>
+ <item name="materialAlertDialogTheme">@style/TvTheme.Dialog</item>
<item name="textInputStyle">@style/TextInputLayoutBase</item>
<item name="materialCardViewStyle">@style/TvTheme.MaterialCardView</item>
</style>
+ <style name="TextInputLayoutBase" parent="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
+ <item name="boxStrokeColor">?attr/colorSecondary</item>
+ <item name="hintTextColor">?attr/colorOnPrimary</item>
+ <item name="materialThemeOverlay">
+ @style/ThemeOverlay.AppTheme.TextInputEditText.OutlinedBox
+ </item>
+ </style>
+
+ <style name="TvTheme.Dialog" parent="Theme.MaterialComponents.DayNight.Dialog.Alert">
+ <item name="colorPrimary">@color/secondary_color</item>
+ <item name="colorSecondary">@color/secondary_color</item>
+ <item name="android:windowBackground">?attr/colorBackground</item>
+ </style>
+
<style name="TvTheme.MaterialCardView" parent="Widget.MaterialComponents.CardView">
<item name="cornerRadius">4dp</item>
<item name="cardElevation">8dp</item>