Repository navigation
How do I change the widget without breaking its twelve sizes? #619
|
I want to change what the home-screen widget shows at some sizes, and maybe add a size class. The ladder in |
Replies: 1 comment
|
Check #113 and the README's "Honest status" section. The ladder is What to keep:
How to check:
More: https://github.com/lumenpearson/lessons/blob/main/docs/widget.md#sizes |
Check #113 and the README's "Honest status" section.
The ladder is
WidgetSizeClassin:widget: twelve breakpoints underSizeMode.Responsive. The count is load-bearing. The launcher (API 31+) and Glance'sfindBestSizedo not pick the largest breakpoint that fits. They pick the breakpoint nearest by squared distance. Without the intermediate rungs (SMALL_TALL,MEDIUM_TALL,LARGE_TALL,TALL), a tall widget four cells wide would draw the 110×300 single column, for example.What to keep:
WidgetSizeClassTestreproduces the launcher's rule and checks that: