widgets: port responsiveness back to <31

Post widget responsive behavior back to Android 11 and below. This is
not the nicest solution [mostly since the UI flickers when resizing],
but it seems to work well enough.
This commit is contained in:
OxygenCobalt
2021-08-05 15:22:22 -06:00
parent 6f8f333b72
commit b4d9a197af
6 changed files with 122 additions and 84 deletions
+1
View File
@@ -21,6 +21,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:elevation="@dimen/elevation_normal"
android:background="?attr/colorSurface"
android:orientation="vertical"
android:padding="@dimen/spacing_medium">
@@ -1,16 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.Widget" parent="@android:style/Theme.DeviceDefault.DayNight">
<!-- I really don't care enough to make Auxio's theming correspond to widget theming.
It doesn't happen on Android 12 anyway, so why bother backporting it when its so
useless. -->
<item name="colorPrimary">?android:attr/colorAccent</item>
<item name="colorSecondary">?android:attr/colorAccent</item>
<item name="colorControlNormal">@color/control_color</item>
<item name="colorControlHighlight">?android:attr/colorControlHighlight</item>
<item name="colorSurface">@color/surface_color</item>
<item name="android:windowBackground">?attr/colorSurface</item>
<item name="android:colorBackground">?attr/colorSurface</item>
</style>
</resources>
+2 -2
View File
@@ -44,8 +44,8 @@
</style>
<!--
Theming widgets is technically possible below Android 10, but its too much of a hassle.
Default to a light blue theme.
Theming widgets is technically possible below Android 12, but I *really* don't care enough
to bother with it.
-->
<style name="Theme.Widget" parent="@style/Theme.Blue" />
</resources>