Skip to content

QUERY - How to align it in centre #4

@md0092651

Description

@md0092651

First of all thanks for the awesome library.

I am creating a sample app with annotated string like this

 val text = buildAnnotatedString {
        withStyle(
            style = SpanStyle(
                fontSize = 90.sp
            )
        ){
            append(subjectText)
        }

        withStyle(SpanStyle(background = MaterialTheme.colorScheme.primaryContainer)) {
            append(tag)
        }
    }
    

the issue is the tag is not centre aligned.

is there any additional config to do so ? I played around the params of RoundedCornerSpanPainter but nothing works

2nd issue which I am facing it I have to give the topMargin = 45 SP manually else the background is full height

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions