Janne Mareike Koschinski
02/12/2021, 6:19 PMmonospace
like im Slack web and desktop (although Slack Android also can't handle that correctly)Zach Klippenstein (he/him) [MOD]
02/12/2021, 6:34 PMAnnotatedString
, but you could use the TextLayoutResult
to calculate the bounds of the text you want to draw the background around and then just use another composable to draw itVipulyaara
02/14/2021, 4:15 AMPlaceholder
in TextLayoutResult
to include any composable in textA placeholder is a rectangle box inserted into text, which tells the text processor to leave an empty space. It is typically used to insert inline image, custom emoji, etc into the text paragraph.
Zach Klippenstein (he/him) [MOD]
02/14/2021, 4:08 PMJanne Mareike Koschinski
02/14/2021, 4:12 PMJanne Mareike Koschinski
02/14/2021, 4:12 PMZach Klippenstein (he/him) [MOD]
02/14/2021, 4:17 PMJanne Mareike Koschinski
02/14/2021, 4:18 PMJanne Mareike Koschinski
02/14/2021, 4:21 PMZach Klippenstein (he/him) [MOD]
02/14/2021, 4:23 PMClickableText
composable in the foundation library uses the same trick: https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/[…]compose/foundation/text/ClickableText.kt;l=70?q=ClickableText