Fixed widget colors
This commit is contained in:
parent
9d1018c03c
commit
df21419b8b
13 changed files with 31 additions and 23 deletions
|
@ -5,5 +5,4 @@ appWidgetRadius attribute value
|
|||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="16dp" />
|
||||
<solid android:color="?android:attr/colorBackground" />
|
||||
</shape>
|
|
@ -2,8 +2,7 @@
|
|||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@android:color/black">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image"
|
||||
|
|
|
@ -5,7 +5,9 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/card"
|
||||
android:orientation="horizontal">
|
||||
android:backgroundTint="?attr/colorSurface"
|
||||
android:orientation="horizontal"
|
||||
android:theme="@style/Theme.AppWidget">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image"
|
||||
|
@ -32,7 +34,7 @@
|
|||
android:gravity="center_vertical"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="@style/TextViewBody1"
|
||||
android:textColor="@color/ate_primary_text_light"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
tools:text="Title" />
|
||||
|
||||
<TextView
|
||||
|
@ -43,7 +45,7 @@
|
|||
android:gravity="center_vertical"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="@style/TextViewCaption"
|
||||
android:textColor="@color/ate_secondary_text_light"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
tools:text="Text" />
|
||||
|
||||
</LinearLayout>
|
||||
|
|
|
@ -4,8 +4,9 @@
|
|||
android:id="@+id/content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/app_widget_classic_height"
|
||||
android:background="@color/md_black_1000"
|
||||
android:background="?attr/colorSurface"
|
||||
android:orientation="horizontal"
|
||||
android:theme="@style/Theme.AppWidget"
|
||||
tools:ignore="ContentDescription">
|
||||
|
||||
<ImageView
|
||||
|
@ -77,7 +78,7 @@
|
|||
android:gravity="center_vertical"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="@style/TextViewSubtitle1"
|
||||
android:textColor="@color/ate_primary_text_dark"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
tools:text="Title" />
|
||||
|
||||
<TextView
|
||||
|
@ -88,7 +89,7 @@
|
|||
android:paddingTop="4dp"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="@style/TextViewNormal"
|
||||
android:textColor="@color/ate_secondary_text_dark"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
tools:text="Text" />
|
||||
|
||||
</LinearLayout>
|
||||
|
|
|
@ -5,10 +5,10 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/app_widget_md3_height"
|
||||
android:background="@drawable/app_widget_background"
|
||||
android:backgroundTint="@color/widget_md3_bg_color"
|
||||
android:backgroundTint="?attr/colorSurface"
|
||||
android:orientation="horizontal"
|
||||
tools:ignore="ContentDescription"
|
||||
android:theme="@style/Theme.Material3.DynamicColors.DayNight">
|
||||
android:theme="@style/Theme.AppWidget"
|
||||
tools:ignore="ContentDescription">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image"
|
||||
|
|
|
@ -4,9 +4,11 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/card"
|
||||
android:backgroundTint="?attr/colorSurface"
|
||||
android:columnCount="2"
|
||||
android:gravity="top"
|
||||
android:rowCount="3">
|
||||
android:rowCount="3"
|
||||
android:theme="@style/Theme.AppWidget">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image"
|
||||
|
@ -81,7 +83,7 @@
|
|||
android:gravity="center_vertical"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="@style/TextViewBody2"
|
||||
android:textColor="@color/ate_primary_text_light"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
tools:text="Title" />
|
||||
|
||||
<TextView
|
||||
|
@ -93,7 +95,7 @@
|
|||
android:paddingRight="4dp"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="@style/TextViewBody1"
|
||||
android:textColor="@color/ate_secondary_text_light"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
tools:ignore="HardcodedText"
|
||||
tools:text="•" />
|
||||
|
||||
|
@ -104,7 +106,7 @@
|
|||
android:gravity="center_vertical"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="@style/TextViewBody1"
|
||||
android:textColor="@color/ate_secondary_text_light"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
tools:text="Text" />
|
||||
|
||||
</LinearLayout>
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="widget_md3_bg_color">@android:color/system_accent1_600</color>
|
||||
</resources>
|
5
app/src/main/res/values-night-v31/styles.xml
Normal file
5
app/src/main/res/values-night-v31/styles.xml
Normal file
|
@ -0,0 +1,5 @@
|
|||
<resources>
|
||||
<style name="Theme.AppWidget" parent="@android:style/Theme.DeviceDefault.DayNight">
|
||||
<item name="colorSurface">@android:color/system_accent2_800</item>
|
||||
</style>
|
||||
</resources>
|
|
@ -1,6 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="widget_md3_bg_color">@android:color/system_accent1_50</color>
|
||||
<color name="widget_circle_button_color">@android:color/system_accent1_900</color>
|
||||
<color name="widget_md3_button_bg_color">@android:color/system_accent1_50</color>
|
||||
</resources>
|
|
@ -15,4 +15,8 @@
|
|||
</item>
|
||||
<item name="popupMenuBackground">@drawable/popup_background</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.AppWidget" parent="@android:style/Theme.DeviceDefault.DayNight">
|
||||
<item name="colorSurface">@android:color/system_accent1_50</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="elevationOverlayLight">@color/md_grey_700</color>
|
||||
<color name="elevationOverlayLight">@color/md_grey_500</color>
|
||||
<color name="elevationOverlayDark">@color/md_grey_500</color>
|
||||
<color name="elevationOverlayBlack">@color/md_black_1000</color>
|
||||
<color name="elevationOverlay">@color/elevationOverlayLight</color>
|
||||
|
|
|
@ -249,4 +249,6 @@
|
|||
<item name="fontFamily">@font/manrope</item>
|
||||
<item name="android:fontFamily">@font/manrope</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.AppWidget" parent="Theme.RetroMusic.FollowSystem" />
|
||||
</resources>
|
||||
|
|
|
@ -216,7 +216,6 @@ private constructor(private val mContext: Context) : ThemeStorePrefKeys, ThemeSt
|
|||
return ContextCompat.getColor(context, R.color.m3_accent_color)
|
||||
}
|
||||
val desaturatedColor = prefs(context).getBoolean("desaturated_color", false)
|
||||
println(isWallpaperAccentEnabled(context))
|
||||
val color = if (isWallpaperAccentEnabled(context)) {
|
||||
wallpaperColor(context)
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue