Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's annoying and easy to forget, but you have to enable the high-quality line break algorithm per Text component in Compose. Or you have to set two flags (maxLines=1 and overflow=TextOverflow.Ellipsis). I usually end up with a TitleText and BodyText component in my codebases that set these flags internally so I don't have to remember.
 help



I wasn't sure if this was a joke about Android being unintuitive so I was sad to see that enabling high quality line breaks is indeed something you have to configure:

https://developer.android.com/develop/ui/compose/text/style-...


That document literally says that high quality option is the default.

No, it doesn't. It says:

> Should be a default

Meaning the developer should opt-in to this explicitly but choose it as the default option. The actual default is no strategy at all.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: