Hello! Is there any way to give extra custom space...
# compose
n
Hello! Is there any way to give extra custom space between paragraphs in
Compose
? My long text is separated by
n\
and and would like to give extra little space too but couldn’t find any way to do so. Tried
paragraphStyle
but there is only
lineHeight
there.
n
ohh ma God 😞
sad panda 1
a
I did this by building an annotated string in which I add a
\n
with
SpanStyle(fontSize = 0.4f.em)
between paragraphs.
n
do you have the full code pls? 🙏
a
Something like
Copy code
buildAnnotatedString {
    append(paragraph1)
    withStyle(SpanStyle(fontSize = 0.4f.em)) {
        append('\n')
    }
    append(paragraph2)
}
🙏 1
n
thanks trying it out!
For me this worked better
withStyle(style = ParagraphStyle(lineHeight = 8.sp)) { append() }