creating a strikethrough text?

前端 未结 11 918
借酒劲吻你
借酒劲吻你 2020-11-30 17:36

Can I create a strikethrough text in Android, I mean adding a special value in the TextView tag that can make this possible?



        
11条回答
  •  伪装坚强ぢ
    2020-11-30 18:29

    If you are using Kotlin:

    your_text_view.apply {
        paintFlags = paintFlags or Paint.STRIKE_THRU_TEXT_FLAG
        text = "Striked thru text"
    }
    

提交回复
热议问题