I have a Column with a border like this
Column(
modifier = Modifier
.weight(1f)
.fillMaxWidth()
.border(
width = 2.dp,
color = colorResource(R.color.appGreen)
)
)
That adds border to every side but I don’t want to have border on the top, only want it on bottom, left and right.
Something like this:
Hoe can I do this?? Thanks
2
Answers
The
border
modifier doesn’t offer the flexibility to exclude specific sides. Instead, you can usedrawBehind
to draw lines on all sides except the top.Here’s the code for your scenario:
Also you can try this, less code: