android - Underlined TextView is not anti-aliased -


when trying make text underlined:

setpaintflags(paint.underline_text_flag); 

textview becomes non anti-aliased. if enable anti-aliasing:

getpaint().setantialias(true) 

then becomes anti-aliased.

is there connection between anti-aliasing , paint.underline_text_flag?

enter image description here

there no connection betwenn anti-aliasing , paint.underline_text_flag .

but difference setpaintflags(paint.underline_text_flag) remove default existing flags & set current flag paint.underline_text_flag only. try below code keep existing flags & add new flag

yourtextview.setpaintflags(yourtextview.getpaintflags() | paint.underline_text_flag); 

Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -