Any updated examples with ConstraintLayout? After ...
# compose
m
Any updated examples with ConstraintLayout? After update to v16 cannot resolve `tag`:
Copy code
ConstraintSet {
   val image = tag(HEADER_MESSAGE_IMAGE_TAG)
   ...
}
Was looking for some similar id like
layoutId
but cannot see anything
a
Yes, check their source
Copy code
git clone <https://android.googlesource.com/platform/frameworks/support>
I recently migrated my ConstraintLayout as well
👍 1
m
thanks
a
but for that snippet it becomes
Copy code
val image = createRefs()
Then with a modifier with something like
Copy code
Image(modifier = Modifier.withConstraint(image) {
    left.constrainTo(parent)
}
it’s much more convenient 😄
alternatively there is also ConstraintSet2 if you still prefer the old pattern
m
Yay, finally. Thanks! 🙂