Is it possible to write a code that does this kind...
# compose
j
Is it possible to write a code that does this kind of "ellipsis" in the middle of AnnotatedString, or to be more precise, at a specific position? E.g., I want to append a "year" to a "title," but only the title should be ellipsized. I see a middle "ellipsis" is supported in Compose 1.8, but, not on android for two lines, but I need "almost" at the end. Thx.
a
Combining some of the ideas from both https://gist.github.com/alexvanyo/0bfb9ceded87136cc89f9ed7ca2216e0 and https://gist.github.com/alexvanyo/0166c437a867cdd9760bae59a296b341 should be able to help get you there. With a custom layout, and determining how the text is laid out, you can do a bit of math to get the logic that you want.
j
AWESOME, this is it, thank you very much ❤️