can I define middle-lined text in an Android layout xml file

后端 未结 6 1901
借酒劲吻你
借酒劲吻你 2021-02-05 07:13

How can I define middle-lined(strikethrough) text in an Android layout xml file?

6条回答
  •  逝去的感伤
    2021-02-05 07:56

    textview.setPaintFlags(textview.getPaintFlags() | Paint.STRIKE_THRU_TEXT_FLAG);
    

    you can use the above code in activity to have strike over the text.

    And to set through xml refer this

提交回复
热议问题