I want to set the ellipsis in the start of the text compose when the text is overflow like this picture below:
However, I did created with the ellipsis property of the compose. The result was not correct:
Here the code I tried:
// current week text
Box(
modifier = Modifier
.weight(1f)
.clip(RoundedCornerShape(dimensionResource(id = R.dimen.dp_6)))
.background(Color.White)
.padding(
vertical = dimensionResource(id = R.dimen.dp_8),
horizontal = dimensionResource(id = R.dimen.dp_10)
)
.singleClick(isShowClickEffect = false) {
onCurrentWeekTextTapped()
}
) {
Text(
text = currentWeekText,
style = LGAppTypography.mobileBodyMedium,
color = colorResource(id = R.color.Color_11161D),
fontWeight = FontWeight.W400,
maxLines = 1,
**overflow = TextOverflow.Ellipsis,**
)
}