Closed hadrienbecle closed 9 months ago
Hi @hadrienbecle, thank you for your contribution! This looks really sleek. :sunglasses:
While testing I found out that on API level 21 (Android 5 is the minimum version for TWT) through 28 the widget background is white now, with no possibility to change it as the dark mode does not exist in the system yet. I think that the background should stay the same color for those old Android versions - could you please add that to the PR?
(BTW: The preview has the dark background, but the resulting widget does not.)
So, this is weird, but the DayNight theme works as expected on my Android 8 device (API level 26). I can choose a light or dark mode, and the widget respects that.
I suspect Galaxy Themes sort of sets a dark mode system variable that was only made generally available on Android 10+, but I wasn't able to find any info on that...
I've updated to use the Material 3 Dark theme on devices below API level 28. I can't switch anymore between light or dark on my Samsung device, but at least it defaults to dark mode on other older devices (tested with the Android emulator).
@hadrienbecle Thanks for your work! (And sorry that it took me so long to find the time for having a look at it.)
Hi :)
I've updated the widget to the new design guidelines (see https://developer.android.com/guide/topics/appwidgets). This includes:
Some screenshots:
Before/after on Android 8:
Before/after on Android 12 with light mode:
Before/after on Android 12 with dark mode:
Image preview of the widget (< Android 12):
Layout preview of the widget (Android 12):