widgets: add minimal widget [#8]

Add the first widget implementation, the minimal widget. This took a
good 2 days of hacking and frustration to get the first prototype
working. And even then, its currently scoped to android 12 until I'm
able to port them. The implementation is still quite rough, but should
become manageable over time. More widgets will come.
This commit is contained in:
OxygenCobalt
2021-08-01 17:32:38 -06:00
parent 58bea1dda5
commit 66be3da7e3
22 changed files with 404 additions and 19 deletions
+4
View File
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<bool name="widgets_supported">false</bool>
</resources>
+14 -7
View File
@@ -1,13 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="surface_color">#fafafa</color>
<color name="divider_color">#cbcbcb</color>
<color name="selection_color">#cbcbcb</color>
<color name="inactive_color">#c4c4c4</color>
<color name="control_color">#202020</color>
<color name="nav_color">#01fafafa</color>
<color name="surface_day">#fffafafa</color>
<color name="surface_night">#ff151515</color>
<color name="surface_black">#ff000000</color>
<color name="surface_color_black">#000000</color>
<color name="text_primary_day">#ff000000</color>
<color name="text_secondary_day">#ff323232</color>
<color name="text_primary_night">#ffffffff</color>
<color name="text_secondary_night">#ffbebebe</color>
<color name="surface_color">@color/surface_day</color>
<color name="selection_color">#cbcbcb</color>
<color name="control_color">#202020</color>
<color name="divider_color">#cbcbcb</color>
<color name="inactive_color">#c4c4c4</color>
<color name="nav_color">#01fafafa</color>
<!--
Base color set derived from Music Player GO.
+1
View File
@@ -134,6 +134,7 @@
<string name="placeholder_artist">Unknown Artist</string>
<string name="placeholder_album">Unknown Album</string>
<string name="placeholder_no_date">No Date</string>
<string name="placeholder_playback">No music playing</string>
<!-- Color Label namespace | Accent names -->
<string name="color_label_red">Red</string>
+1 -1
View File
@@ -36,7 +36,7 @@
<!-- Black theme dialog theme -->
<style name="Theme.CustomDialog.Black" parent="Theme.CustomDialog.Base">
<item name="colorSurface">@color/surface_color_black</item>
<item name="colorSurface">@color/surface_black</item>
</style>
<!-- Material-specific dialog style -->
@@ -157,8 +157,6 @@
<item name="android:thumbTint">?attr/colorPrimary</item>
</style>
<!-- Base style for the material buttons -->
<style name="Widget.MaterialComponents.Button.Base" parent="@style/Widget.MaterialComponents.Button.TextButton">
<item name="android:layout_width">0dp</item>
+1 -1
View File
@@ -39,7 +39,7 @@
<!-- The basic black theme derived in all black accents. -->
<style name="Theme.Base.Black" parent="Theme.Base">
<item name="colorSurface">@color/surface_color_black</item>
<item name="colorSurface">@color/surface_black</item>
<item name="materialAlertDialogTheme">@style/Theme.CustomDialog.Black</item>
</style>
</resources>