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
In Kotlin
tv.text = "This is text"
tv.paintFlags = tv.paintFlags or Paint.STRIKE_THRU_TEXT_FLAG
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.