Skip to content

Commit

Permalink
fix: widget color issues (closes #91)
Browse files Browse the repository at this point in the history
  • Loading branch information
SuhasDissa committed Apr 17, 2024
1 parent 539193e commit ee5e444
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 33 deletions.
13 changes: 4 additions & 9 deletions app/src/main/res/drawable/widget_shape.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">

<solid
android:color="?attr/colorSecondaryContainer" >
</solid>
<solid android:color="?attr/colorSurfaceContainer" />

<corners
android:radius="60dp" >
</corners>
<corners android:radius="60dp" />

</shape>
16 changes: 16 additions & 0 deletions app/src/main/res/layout-v31/analog_clock.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:theme="@style/Theme.Material3.DynamicColors.DayNight">

<AnalogClock
android:id="@+id/analog_clock"
android:layout_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:hand_hourTint="?attr/colorSecondary"
android:hand_minuteTint="?attr/colorPrimary"
android:dialTint="?attr/colorSurfaceContainer" />

</FrameLayout>
13 changes: 7 additions & 6 deletions app/src/main/res/layout/analog_clock.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
android:layout_width="match_parent"
android:layout_height="match_parent"
android:theme="@style/Theme.Material3.DynamicColors.DayNight">

<AnalogClock
android:id="@+id/analog_clock"
android:layout_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
android:id="@+id/analog_clock"
android:layout_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />

</FrameLayout>
6 changes: 3 additions & 3 deletions app/src/main/res/layout/digital_clock.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/widgetSecondaryTextColor"
android:textColor="?attr/colorSecondary"
android:text="America"
android:visibility="gone"
android:textSize="@dimen/_8sdp"
Expand All @@ -30,7 +30,7 @@
android:layout_height="wrap_content"
android:format12Hour="EE, MMM dd"
android:format24Hour="EE, MMM dd"
android:textColor="@color/widgetSecondaryTextColor"
android:textColor="?attr/colorSecondary"
android:text="Today"
android:textSize="@dimen/_8sdp"
android:id="@+id/textClock" />
Expand All @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/res/layout/vertical_clock.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
android:format24Hour="EE, MMM dd"
android:text="Today"
android:textSize="@dimen/_8sdp"
android:textColor="@color/widgetSecondaryTextColor" />
android:textColor="?attr/colorSecondary" />

<TextClock
android:layout_width="wrap_content"
Expand All @@ -33,7 +33,7 @@
android:format24Hour="kk"
android:text="12"
android:textStyle="bold"
android:textColor="@color/widgetPrimaryTextColor"
android:textColor="?attr/colorPrimary"
android:textSize="@dimen/_60sdp" />

<TextClock
Expand All @@ -43,7 +43,7 @@
android:format12Hour="mm"
android:format24Hour="mm"
android:text="34"
android:textColor="@color/widgetPrimaryTextColor"
android:textColor="?attr/colorPrimary"
android:textSize="@dimen/_60sdp"
android:textStyle="bold"
android:layout_marginTop="@dimen/_minus25sdp" />
Expand Down
5 changes: 0 additions & 5 deletions app/src/main/res/values-night-v31/colors.xml

This file was deleted.

5 changes: 0 additions & 5 deletions app/src/main/res/values-v31/colors.xml

This file was deleted.

2 changes: 0 additions & 2 deletions app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="windowBackground">#FFFFFFFF</color>
<color name="widgetPrimaryTextColor">?attr/colorOnSecondaryContainer</color>
<color name="widgetSecondaryTextColor">?attr/colorOnSecondaryContainer</color>
</resources>

0 comments on commit ee5e444

Please sign in to comment.