Hi, I'm trying to create this effect with a `LazyV...
# compose
s
Hi, I'm trying to create this effect with a
LazyVerticalStaggeredGrid
but I'm struggling to not have the green items going below the blue one… I'm basically looking for a "rowspan" equivalent. In case anyone here has an idea, thanks! Posted on SO: https://stackoverflow.com/questions/77976254/compose-grid-layout-span-rows-cols
k
here's an idea. Use ConstraintLayout's barriers at the right side of the blue one. A vertical barrier. Right at the horizontal end of blue, starting from vertical top of the blue, to the vertical end of the parent
you just need to constrain them all starting from the end of your barrier after that. Problem solved, easy peasy
s
Thanks for the idea. I have to test this, but I'm not sure how it can works as the blue item is within an
item{}
, can I reference the parent anyway?
k
hmmm not sure, I'm still not very experienced with compose's constraintlayout, I was imagining the solution in traditional constraintlayout 😁
s
Yeah, me too, but in traditional constraintlayout you cannot reference views which are outside of your constraintlayout, as those items are within a list it cannot be part of the constraintlayout.