In recent versions of the Android Settings app, gr...
# compose-android
a
In recent versions of the Android Settings app, groups of items appear to be on another surface with rounded corners. What is the most straightforward way to achieve that using LazyColumn etc? Are those items inside Cards or do individual ListItem(s) just have the corners clipped, etc?
t
I usually do it via a card/surface in each
itemsIndexed
with a bit of math to figure out what corner shape to use. similar thing for drawing the divider. Otherwise do some pre-calc in your view model so the data classes feeding the lazy column have the info they need to pick the shape/divider correctly
👍 1
c
If it were me. I probably wouldn't even use a lazyColumn 😅 Seems like a fairly finite list and Id just hardcode the column with those rounded corners
👍 5
s
If the groups aren't that big either, you could get away with a lazy column but have the network & internet and connected devices be one item actually. So each "card" is one self-contained card. It's just an option though, the two previous replies are also perfectly valid
👍 2