TextView underline, Underline
Down:
Medium Dash
Textview.getpaint (). SetFlags (Paint.strike_thru_text_flag | Paint.anti_alias_flag); Set the underline and add clarity
Underline
Textview.getpaint (). SetFlags (Paint.underline_text_flag);
De-Set line
Textview.getpaint (). SetFlags (0); Set the dash to cancel
I encapsulated a few methods to call directly
/** * Underline * * @param textView */private void Addbuttomline (TextView textView) {textview.getpaint (). SetFlags ( Paint.underline_text_flag);} /** * Remove Line * * @param textView */private void Removeline (TextView textView) {textview.getpaint (). SetFlags (0);//de-set the Dash}/** * Set the underline and add clarity * * @param textView */private void AddLine (TextView textView) {textview.getpaint (). SetFlags (Paint . Strike_thru_text_flag | Paint.anti_alias_flag); Set the underline and add clarity}/** * Underline * * @param textView */private void Addcenterline (TextView textView) {textview.getpaint (). SETFL AGS (Paint.strike_thru_text_flag); Underline}/** * Anti-aliasing * * @param textView */private void Addjuchiline (TextView textView) {textview.getpaint (). Setantialias (true);//anti-aliasing}