Improve notification theming (#47)

* Make notification themes more dynamic to adapt to day/night/system themes.

* Fix broken style references
This commit is contained in:
Matthias Urhahn
2022-11-05 12:11:33 +01:00
committed by GitHub
parent 6340f73d61
commit 1ef09124af
4 changed files with 15 additions and 0 deletions
@@ -3,6 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/Notification.Container"
android:layout_marginHorizontal="8dp"
android:orientation="horizontal">
@@ -2,6 +2,7 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
style="@style/Notification.Container"
android:layout_height="wrap_content"
android:gravity="center_horizontal">
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
style="@style/Notification.Container"
android:layout_width="match_parent"
android:layout_height="wrap_content">
+12
View File
@@ -7,14 +7,26 @@
<item name="android:layout_marginEnd">8dp</item>
</style>
<style name="Notification">
</style>
<style name="Notification.Container">
<!-- <item name="android:background">?android:attr/colorBackground</item>-->
<item name="android:theme">@style/Theme.Material3.DynamicColors.DayNight</item>
</style>
<style name="PodInfoItemIcon.Notification" parent="TextAppearance.Compat.Notification.Title">
<item name="android:layout_height">20dp</item>
<item name="android:layout_width">20dp</item>
<item name="android:tint">?android:attr/colorAccent</item>
<item name="tint">?android:attr/colorAccent</item>
</style>
<style name="PodInfoItemText.Notification" parent="TextAppearance.Compat.Notification.Title">
<item name="android:singleLine">true</item>
<item name="android:ellipsize">end</item>
<item name="android:textColor">?android:attr/textColorPrimary</item>
</style>
<style name="PodInfoItemIcon" parent="TextAppearance.MaterialComponents.Body2">