Does anybody know how can I design a layout like t...
# compose
m
Does anybody know how can I design a layout like this?
😶 4
c
There won’t be a layout out-of-the-box that can achieve this, but it’s very possible to do this with a custom layout in Compose. It depends also on what further needs you have, e.g. is there always going to be 9 avatars, do they move/animate, are they dynamic, etc.
👍 2
I’d suggest reading this guide first: https://developer.android.com/jetpack/compose/layouts/custom, then watching the recent deep dive video:

https://www.youtube.com/watch?v=zMKMwh9gZuI

👍 1
You can also still use ConstraintLayout in Compose, though I’m not sure it supports circular constraints like it does in XML
🤕 1
k
Would also depend on what kind of user interaction these avatars have. What happens when you tap one of them? Does it transition to the details page, or maybe a popup with actions, or maybe a pivot to display a similar arrangement, but centered around the tapped avatar?
1
m
@Kirill Grouchnikov actually I want to display nearby users like this, each item is clickable and when it clicked something must happen
k
Well, there's going to be a lot of custom layout logic, canvas drawing and animations, depending on what that "something" is
Also probably accessibility nightmare to figure out how this whole graph is made accessible to touch-impaired users