My code looks like this:
TextView task_text = (TextView) view.findViewById(R.id.task_text);
task_text.setPaintFlags( task_text.getPaintFlags() | Pain
In my opinion, just set its default flag is a better choice. Otherwise, the text will be looked jagged. The default flag in TextView (EditText extends TextView) is
Paint.ANTI_ALIAS_FLAG
And set a new paintflag will replace the previous one. I have made a test to verify it. So, just like this:
task_text.setPaintFlags(Paint.ANTI_ALIAS_FLAG);