widgets: rework tiny widget
Rework the tiny widget to cram even more information into it. The tiny widget is nominally meant for edge cases like exceptionally small screens or landscape mode, but apparently it's triggered on some devices in normal use because of platform fragmentation and OEM insanity. Update the tiny widget layout with some new buttons in order to make it more usable in mnormal use. This is still nowehre near ideal. For example, when triggering the layout on my device, it ends up squishing the buttons. But it should probably work better outside of those edge cases.
This commit is contained in:
@@ -8,14 +8,7 @@
|
||||
android:theme="@style/Theme.Widget">
|
||||
|
||||
<!--
|
||||
For this widget form to work, we need to scale the ImageView across a 1:1 aspect ratio.
|
||||
However, since we are working with a RemoteViews instance, we can't just use ConstraintLayout
|
||||
to achieve this. We can use RelativeLayout, but there's no way to force an aspect ratio with
|
||||
that layout. However, if we create an invisible ImageView that contains a massive fixed-size
|
||||
drawable and then clamp our main ImageView to it, we can make the view scale on a 1:1 aspect
|
||||
ratio.
|
||||
|
||||
This is easily one of the worst layout hacks I've done, but it seems to work.
|
||||
See widget_small.xml for an explanation for the ImageView setup
|
||||
-->
|
||||
|
||||
<android.widget.ImageView
|
||||
|
||||
Reference in New Issue
Block a user