summaryrefslogtreecommitdiff
path: root/app/src/main/res
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2021-11-03 14:22:31 +0530
committerHarsh Shandilya <me@msfjarvis.dev>2021-11-03 15:51:46 +0530
commit88c9a0d487cae916477ad733cea6786d442cfa5e (patch)
tree9d82f927325a7cc21a186973b90b22565ab93158 /app/src/main/res
parentf8ad1c97fdcc850c8bc592e17b80108a3fc661e8 (diff)
app: refactor M3 themes and styles
Diffstat (limited to 'app/src/main/res')
-rw-r--r--app/src/main/res/values-night/themes_material3.xml5
-rw-r--r--app/src/main/res/values/styles_material3.xml12
-rw-r--r--app/src/main/res/values/themes_material3.xml47
3 files changed, 50 insertions, 14 deletions
diff --git a/app/src/main/res/values-night/themes_material3.xml b/app/src/main/res/values-night/themes_material3.xml
index 6f56863a..a06aefe8 100644
--- a/app/src/main/res/values-night/themes_material3.xml
+++ b/app/src/main/res/values-night/themes_material3.xml
@@ -32,10 +32,5 @@
<item name="colorOnSurfaceInverse">@color/md_theme_dark_inverseOnSurface</item>
<item name="colorSurfaceInverse">@color/md_theme_dark_inverseSurface</item>
<item name="colorPrimaryInverse">@color/md_theme_dark_primaryInverse</item>
- <item name="fontFamily">@font/manrope</item>
- <item name="android:windowLightStatusBar">@bool/light_status_bar</item>
- <item name="android:statusBarColor">?android:colorBackground</item>
- <item name="android:navigationBarColor">?android:colorBackground</item>
- <item name="toolbarStyle">@style/APSThemeM3.Toolbar</item>
</style>
</resources>
diff --git a/app/src/main/res/values/styles_material3.xml b/app/src/main/res/values/styles_material3.xml
new file mode 100644
index 00000000..f855b826
--- /dev/null
+++ b/app/src/main/res/values/styles_material3.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?><!--
+ ~ Copyright © 2014-2021 The Android Password Store Authors. All Rights Reserved.
+ ~ SPDX-License-Identifier: GPL-3.0-only
+ -->
+
+<resources>
+
+ <style name="APSThemeM3.Toolbar" parent="Widget.Material3.Toolbar">
+ <item name="android:background">?android:colorBackground</item>
+ </style>
+
+</resources>
diff --git a/app/src/main/res/values/themes_material3.xml b/app/src/main/res/values/themes_material3.xml
index 19ee0fc1..428a4699 100644
--- a/app/src/main/res/values/themes_material3.xml
+++ b/app/src/main/res/values/themes_material3.xml
@@ -5,6 +5,44 @@
<resources>
+ <style name="AppThemeM3" parent="APSThemeM3">
+ <item name="fontFamily">@font/manrope</item>
+ <item name="android:windowLightStatusBar">@bool/light_status_bar</item>
+ <item name="android:statusBarColor">?android:colorBackground</item>
+ <item name="android:navigationBarColor">?android:colorBackground</item>
+ <item name="toolbarStyle">@style/APSThemeM3.Toolbar</item>
+ <item name="bottomSheetDialogTheme">@style/APSThemeM3.BottomSheetDialog</item>
+ </style>
+
+ <style name="NoBackgroundThemeM3" parent="@style/AppThemeM3">
+ <item name="android:background">@android:color/transparent</item>
+ <item name="android:backgroundDimEnabled">true</item>
+ <item name="android:navigationBarColor">@android:color/transparent</item>
+ <item name="android:statusBarColor">@android:color/transparent</item>
+ <item name="android:windowIsTranslucent">true</item>
+ <item name="android:windowContentOverlay">@null</item>
+ <item name="android:windowActionBar">false</item>
+ <item name="android:windowBackground">@android:color/transparent</item>
+ <item name="android:windowEnterAnimation">@android:anim/fade_in</item>
+ <item name="android:windowExitAnimation">@android:anim/fade_out</item>
+ <item name="colorPrimaryDark">@android:color/transparent</item>
+ <item name="windowNoTitle">true</item>
+ </style>
+
+ <style name="DialogLikeThemeM3" parent="AppThemeM3">
+ <item name="android:windowActionBar">false</item>
+ <item name="android:windowIsFloating">true</item>
+ <item name="android:backgroundDimEnabled">true</item>
+ <!-- Needs to be set without android: prefix as per https://stackoverflow.com/a/33417456 -->
+ <item name="windowNoTitle">true</item>
+ </style>
+
+ <style name="APSThemeM3.BottomSheetDialog" parent="ThemeOverlay.Material3.BottomSheetDialog">
+ <item name="android:windowIsFloating">false</item>
+ <item name="android:statusBarColor">@android:color/transparent</item>
+ <item name="android:navigationBarColor">@android:color/transparent</item>
+ </style>
+
<style name="APSThemeM3" parent="Theme.Material3.DayNight">
<item name="colorPrimary">@color/md_theme_light_primary</item>
<item name="colorOnPrimary">@color/md_theme_light_onPrimary</item>
@@ -32,14 +70,5 @@
<item name="colorOnSurfaceInverse">@color/md_theme_light_inverseOnSurface</item>
<item name="colorSurfaceInverse">@color/md_theme_light_inverseSurface</item>
<item name="colorPrimaryInverse">@color/md_theme_light_primaryInverse</item>
- <item name="fontFamily">@font/manrope</item>
- <item name="android:windowLightStatusBar">@bool/light_status_bar</item>
- <item name="android:statusBarColor">?android:colorBackground</item>
- <item name="android:navigationBarColor">?android:colorBackground</item>
- <item name="toolbarStyle">@style/APSThemeM3.Toolbar</item>
- </style>
-
- <style name="APSThemeM3.Toolbar" parent="Widget.Material3.Toolbar">
- <item name="android:background">?android:colorBackground</item>
</style>
</resources>