Hi Composers So I was using ConstraintLayout in C...
# compose
a
Hi Composers So I was using ConstraintLayout in Compose. I created a vertical chain like this:
Copy code
createVerticalChain(
    toolbar, text1, text2,
    chainStyle = ChainStyle.Packed
)
Now it works all fine but the issue is I don't know how to set margins in this scenario. How do I set top and bottom margin to text1? Also, text1 has following constraints
Copy code
constrain(text1) {
    height = Dimension.preferredWrapContent
    width = Dimension.preferredWrapContent
}
What I am trying to do here is to set text1 height as wrap content but not bigger than the layout. But if the text is large then the whole text is shown. How do I keep it as wrap content and fill constraint layout but not increase size of constraint layout and ellipsize the remaining text?
🧵 1
@Shakil Karim what does your reaction emoji mean.?? 🧵
c
It's asking if you edit your post to put the code in this thread. Please and thank you! https://kotlinlang.slack.com/archives/CJLTWPH7S/p1616265877303000
a
Okay, got it. Thanks, will keep it in mind next time.