Hey #fedihelp,
I'm struggling with an #Android #widget issue, and I was wondering if anyone had any clue.
Basically: I have a widget with a grid of items. I want the items in the grid to stick to a certain aspect ratio, regardless of the widget width. The height should dynamically adjust so it always stays that aspect ratio. Normally I would use a ConstraintLayout, but that doesn't seem supported on widgets and I cannot find any good alternative.
Code here: github.com/CatimaLoyalty/Andro…
Thank you!
Widget with all cards by realwk · Pull Request #2566 · CatimaLoyalty/Android
Added grid-style widget for all cards Changed card view background to fill it with color even if there is pictureGitHub
Peter Vágner reshared this.
Sylvia
in reply to Sylvia • • •I ended up settling on just hardcoding an exact size for each grid entry in "dp", then scaling it up until it "felt right" and going with that. It should work. I'm still annoyed Android widgets are so limiting but well, this will be good enough to ship I think.
github.com/CatimaLoyalty/Andro…
Now for a good night's rest and then some final cleanups after work. Then this can probably be shipped with the next release :)
Widget with all cards by realwk · Pull Request #2566 · CatimaLoyalty/Android
GitHubBodo
in reply to Sylvia • • •Hi Sylvia,
thanks for your hard work of coding Catima and to make it better and better step by step.
You are the best! 👍