Home > Back-end >  How to strikethrough Text in android Jetpack Compose?
How to strikethrough Text in android Jetpack Compose?

Time:10-19

I want to strikethrough a Text in Android Jetpack Compose. I have checked some documentation but I still don't find something that looks to what I want to achieve.

enter image description here

Can any one please help me or give me any idea?

CodePudding user response:

Add style for text

@Composable
fun TextWithLineThroughExample(){
    Text(
        text = "Text with LineThrough",
        style = TextStyle(textDecoration = TextDecoration.LineThrough)
    )
}

enter image description here

  • Related