diff --git a/app/src/main/java/com/orgzly/android/widgets/WidgetColors.kt b/app/src/main/java/com/orgzly/android/widgets/WidgetColors.kt index 741721f32..1a034d752 100644 --- a/app/src/main/java/com/orgzly/android/widgets/WidgetColors.kt +++ b/app/src/main/java/com/orgzly/android/widgets/WidgetColors.kt @@ -94,8 +94,7 @@ object WidgetColors { ) ) - // TODO: - val colorDayNight = mapOf( + val dataDependentColors = mapOf( "dynamic-day" to mapOf( "todo" to R.color.widget_light_state_todo_color, "done" to R.color.widget_light_state_done_color, diff --git a/app/src/main/java/com/orgzly/android/widgets/WidgetStyle.kt b/app/src/main/java/com/orgzly/android/widgets/WidgetStyle.kt index 3ad62675d..06023d292 100644 --- a/app/src/main/java/com/orgzly/android/widgets/WidgetStyle.kt +++ b/app/src/main/java/com/orgzly/android/widgets/WidgetStyle.kt @@ -41,7 +41,7 @@ object WidgetStyle { @ColorInt private fun getColor(context: Context, scheme: String, name: String): Int { - val s = WidgetColors.colorDayNight[scheme]?.get(name).let { value -> + val s = WidgetColors.dataDependentColors[scheme]?.get(name).let { value -> if (BuildConfig.LOG_DEBUG) LogUtils.d(TAG, "$scheme/$name: $value") value ?: throw Exception("Not defined: $scheme/$name") } diff --git a/app/src/main/res/layout/item_list_widget.xml b/app/src/main/res/layout/item_list_widget.xml index b8a9c1640..f60949932 100644 --- a/app/src/main/res/layout/item_list_widget.xml +++ b/app/src/main/res/layout/item_list_widget.xml @@ -4,7 +4,7 @@ xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/item_list_widget_layout" - android:theme="@style/Theme.Material3.DynamicColors.DayNight" + android:theme="@style/ListWidgetTheme" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" diff --git a/app/src/main/res/layout/item_list_widget_divider.xml b/app/src/main/res/layout/item_list_widget_divider.xml index c9d24bfd8..22bc08a81 100644 --- a/app/src/main/res/layout/item_list_widget_divider.xml +++ b/app/src/main/res/layout/item_list_widget_divider.xml @@ -4,7 +4,7 @@ xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/widget_list_item_divider_value" - android:theme="@style/Theme.Material3.DynamicColors.DayNight" + android:theme="@style/ListWidgetTheme" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center_vertical" diff --git a/app/src/main/res/layout/list_widget.xml b/app/src/main/res/layout/list_widget.xml index c9b1e29b3..b5f5b94dd 100644 --- a/app/src/main/res/layout/list_widget.xml +++ b/app/src/main/res/layout/list_widget.xml @@ -2,7 +2,7 @@ diff --git a/app/src/main/res/values-v31/prefs_keys.xml b/app/src/main/res/values-v31/prefs_keys.xml new file mode 100644 index 000000000..256624ddf --- /dev/null +++ b/app/src/main/res/values-v31/prefs_keys.xml @@ -0,0 +1,16 @@ + + + + + @string/color_scheme_dynamic + @string/color_scheme_light + @string/color_scheme_dark + @string/color_scheme_black + + + dynamic + light + dark + black + + \ No newline at end of file diff --git a/app/src/main/res/values-v31/styles.xml b/app/src/main/res/values-v31/styles.xml new file mode 100644 index 000000000..8d68bf990 --- /dev/null +++ b/app/src/main/res/values-v31/styles.xml @@ -0,0 +1,5 @@ + + + + @@ -225,6 +224,8 @@ +