chris
03/09/2021, 3:07 AMNader Jawad
03/09/2021, 3:39 AMModifier.clip
with a rect shape that is half of the size of the text composable. Do you have a screenshot or a mock of what you are trying to build?Albert Chang
03/09/2021, 4:02 AMText(text = "Text", modifier = Modifier.clipToBounds().layout { measurable, _ ->
val placeable = measurable.measure(Constraints())
val halfHeight = placeable.height / 2
layout(placeable.width, halfHeight) {
placeable.place(0, -halfHeight)
}
})
chris
03/09/2021, 4:26 PM