draw line through text in textview

后端 未结 2 682
鱼传尺愫
鱼传尺愫 2021-02-07 04:09

I have started to make an application similar to concept of \"To do task manager\", in which i need to make a textview cancelable, like, when user clicks on done image, whole te

2条回答
  •  醉梦人生
    2021-02-07 04:31

    This can help you.

        TextView tv = (TextView) findViewById(R.id.mytext);
        tv.setText("This is strike-thru");
        tv.setPaintFlags(tv.getPaintFlags() | Paint.STRIKE_THRU_TEXT_FLAG);
    

    You can use it in your code,however necessary.

提交回复
热议问题