From ee5e444165423fe3cea528a2e3bd29137c473b74 Mon Sep 17 00:00:00 2001 From: Suhas Dissanayake Date: Wed, 17 Apr 2024 18:36:39 +0530 Subject: [PATCH] fix: widget color issues (closes #91) --- app/src/main/res/drawable/widget_shape.xml | 13 ++++--------- app/src/main/res/layout-v31/analog_clock.xml | 16 ++++++++++++++++ app/src/main/res/layout/analog_clock.xml | 13 +++++++------ app/src/main/res/layout/digital_clock.xml | 6 +++--- app/src/main/res/layout/vertical_clock.xml | 6 +++--- app/src/main/res/values-night-v31/colors.xml | 5 ----- app/src/main/res/values-v31/colors.xml | 5 ----- app/src/main/res/values/colors.xml | 2 -- 8 files changed, 33 insertions(+), 33 deletions(-) create mode 100644 app/src/main/res/layout-v31/analog_clock.xml delete mode 100644 app/src/main/res/values-night-v31/colors.xml delete mode 100644 app/src/main/res/values-v31/colors.xml diff --git a/app/src/main/res/drawable/widget_shape.xml b/app/src/main/res/drawable/widget_shape.xml index f0431566..03e85bf2 100644 --- a/app/src/main/res/drawable/widget_shape.xml +++ b/app/src/main/res/drawable/widget_shape.xml @@ -1,13 +1,8 @@ - + - - + - - + diff --git a/app/src/main/res/layout-v31/analog_clock.xml b/app/src/main/res/layout-v31/analog_clock.xml new file mode 100644 index 00000000..3e7938a6 --- /dev/null +++ b/app/src/main/res/layout-v31/analog_clock.xml @@ -0,0 +1,16 @@ + + + + + + diff --git a/app/src/main/res/layout/analog_clock.xml b/app/src/main/res/layout/analog_clock.xml index 18a4e2fd..949853b6 100644 --- a/app/src/main/res/layout/analog_clock.xml +++ b/app/src/main/res/layout/analog_clock.xml @@ -1,12 +1,13 @@ + android:layout_width="match_parent" + android:layout_height="match_parent" + android:theme="@style/Theme.Material3.DynamicColors.DayNight"> + android:id="@+id/analog_clock" + android:layout_gravity="center" + android:layout_width="wrap_content" + android:layout_height="wrap_content" /> diff --git a/app/src/main/res/layout/digital_clock.xml b/app/src/main/res/layout/digital_clock.xml index f4f66508..6e5b31c3 100644 --- a/app/src/main/res/layout/digital_clock.xml +++ b/app/src/main/res/layout/digital_clock.xml @@ -19,7 +19,7 @@ @@ -41,7 +41,7 @@ android:layout_marginTop="@dimen/_minus2sdp" android:format12Hour="hh:mm" android:format24Hour="kk:mm" - android:textColor="@color/widgetPrimaryTextColor" + android:textColor="?attr/colorPrimary" android:textSize="@dimen/_40sdp" android:textStyle="bold" android:text="12:34" diff --git a/app/src/main/res/layout/vertical_clock.xml b/app/src/main/res/layout/vertical_clock.xml index fc50c237..e2cb7083 100644 --- a/app/src/main/res/layout/vertical_clock.xml +++ b/app/src/main/res/layout/vertical_clock.xml @@ -22,7 +22,7 @@ android:format24Hour="EE, MMM dd" android:text="Today" android:textSize="@dimen/_8sdp" - android:textColor="@color/widgetSecondaryTextColor" /> + android:textColor="?attr/colorSecondary" /> diff --git a/app/src/main/res/values-night-v31/colors.xml b/app/src/main/res/values-night-v31/colors.xml deleted file mode 100644 index 6ad2e04e..00000000 --- a/app/src/main/res/values-night-v31/colors.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - @android:color/system_accent1_200 - @android:color/system_accent2_200 - \ No newline at end of file diff --git a/app/src/main/res/values-v31/colors.xml b/app/src/main/res/values-v31/colors.xml deleted file mode 100644 index 5a5abfe7..00000000 --- a/app/src/main/res/values-v31/colors.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - @android:color/system_accent1_600 - @android:color/system_accent2_600 - \ No newline at end of file diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 1922f10e..914afe37 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -1,6 +1,4 @@ #FFFFFFFF - ?attr/colorOnSecondaryContainer - ?attr/colorOnSecondaryContainer \ No newline at end of file