Sometimes I want the `Text` to have the ellipsis a...
# compose
s
Sometimes I want the
Text
to have the ellipsis at the front. My use case is showing a file path, where the end is more important than the beginning. The Text does not have a parameter for that and this default config will have the ellipsis at the end.
Copy code
Text(
    text = text,
    maxLines = 1,
    overflow = TextOverflow.Ellipsis
)
My font is Roboto. Monospace would make this easy as I could cut after a certain amount of characters. But this is not possible here. I would like to measure the font size and determine which part fits into the width or somehow. Did someone find a solution for this?
1
z
In the new compose 1.8.0 - alpha(I guess), it supports ellipsis with start, end and middle.
s
So great! Thanks for letting me know 🙂