Hello, how can I create rectangle shape with `widt...
# compose
r
Hello, how can I create rectangle shape with
width=4dp
and
height=match_parent
in compose?
Copy code
Container(width = 4.dp, expanded = true) {
      DrawShape(shape = RectangleShape, color = Color.Black)
}
this doesn’t seem to work
m
Well
Container
will expand to fill it's parent if possible so it will depend what layout wraps the container.
r
this is my layout
m
I'm not sure what behaviour you expect.
r
actually, a simple vertical line that expands with the title width
m
There seems to be a bug with the
Container
and
DrawShape
because this works
And this does not
In the second example the width is taken by the
container
but my guess is that the
height
is set to 0. I need to check if is indeed the case.
a
could you please try to wrap your Row in MinIntrinsicHeight component and add this param for Row: crossAxisAlignment = CrossAxisAlignment.Stretch
👍 2
p
@Rafal You could instead set border left if possible. That would be much simple
r
@Andrey Kulikov your solution worked, thanks!