Hey I'm having some difficulties using ConstraintL...
# compose
c
Hey I'm having some difficulties using ConstraintLayout. I expect this blue box to be at the bottom, am I doing it wrong somehow?
g
Trying to sort out some issues with ConstraintLayout too, but tested something similar to what you wrote, it's working
c
Oh, of course, it can't position its children inside itself if its the same size of the children! good spot thanks 😄
What issue are you having?
g
Constraints weren't being applied... Just found out I mispelled the tag on the modifier lol
c
haha I was doing that a few times too
What do you think about having the ConstraintLayout body inside of the body where constraint sets are defined so that the tags can be referenced as variables?
g
I don't think we'd need to mix those two, but I agree we should be defining the tag names in a common scope, to avoid these mistakes
I wish there was some overlap between
ConstraintSetBuilderScope.tag
and
Modifier.tag
though, so that we declare it once and just use it on the ConstraintSet and on the children
c
hmm but I guess it could be confusing if the common scope were common to more than one constraint layout?
g
It definitely could
But then again, if there are two ConstraintLayouts in the same scope, one of them (or both) should probably be extracted to a separate function
c
what sort of overlap do you have in mind? Like AS just looking at the strings or?
maybe that is the only way to bring safety without having people write not so elegant code
g
Thinking of a common type, which implements both
Modifier
and
ConstrainedLayoutReference
But I'm getting ahead of myself here, don't know much of the internals, that's probably not the best design choice
c
Oh so that you wouldn't need to wrap with Modifier.tag() ? I like the Modifier.x().y(), it indents nicer than +s
but yeah, we can hold off any prs for now 😛 just interesting to talk about
g
It is 🙃 I look forward to contributing, I'm trying to get up to speed
😄 1