I'm looking to implement a calendar-like application including a day-detail screen in Jetpack Compose.
This screen has a TopAppBar, in which i'd like to show the date like Friday, March 12th 2022
However, some screensizes i'm targeting can't display that completely, so i would like to gradually shorten the text if necessary:
Friday, March 12th 2022
Fr. March 12th 2022
Fr. March 12th '22
Fr. March 12th
March 12th
How can i achieve this?
I already know about Text's onTextLayout: (TextLayoutResult) → Unit, however i don't seem able to change the text from there?
Please note:
- For now, the app is german only, and i tried to "translate" the date formats for this question, so please excuse if i used uncommon ones.
- There are a few similar questions using traditional xml-views, but i'm looking for a compose-solution
