0

I want to set the ellipsis in the start of the text compose when the text is overflow like this picture below:

enter image description here

However, I did created with the ellipsis property of the compose. The result was not correct:

enter image description here

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,**
            )
        }

0 Answers0