After recently refactoring some screens to compose...
# compose-android
m
After recently refactoring some screens to compose, I received a report from a user using a titan unihertz device that there were several bugs and crashes occurring, but that these were not happening on other devices. After asking him to send screenshots, it was clear that even things like layouts were behaving differently. Without getting into too many specifics, I was just wondering if others had experienced issues with Titan Unihertz regarding compose?
d
Any idea if this user/device has problems with all Compose apps or just yours? Google Play Store is using Compose too I believe so you could ask the user if it works fine
m
He said he had similar experience with some other apps. Most of my compose screens work fine on his device, so I guess there are some edge cases at play here. He said it might be because his screen resolution is quite different to most phones. Then there’s also the fact that it uses hardware keyboard input, which I think is difficult for us to test against?
Update: I managed to reproduce the layout issues by setting the emulator resolution to 1440x1440. So it looks like the issue is something to do with this special case of a square screen (e.g. is it portrait or landscape?). I’ll check through the logic in my layouts to see the precise problem, and will report back.
Interestingly, if I set the emulator’s “Supported devices states” to landscape-only, the portrait XML layouts are still chosen instead of the landscape ones.
So yes, the layout issue was to do with a child of a
Column
using
aspectRatio
such that when the display was square-ish the child would be drawn on top of other items in the column, I always thought a column would enforce the children to be drawn one child after (y-axis-below) another? But it seems certain modifiers circumvent this. Is this intended behavior?
d
Might be better to ask this separately in the main channel as it's not very discoverable here