首页 > 代码库 > TextView

TextView

1.下划线

textView.getPaint().setFlags(Paint. UNDERLINE_TEXT_FLAG ); //下划线

2.单独做第一步,文字会出现锯齿,要加下面抗锯齿

textView.getPaint().setFlags(Paint. UNDERLINE_TEXT_FLAG|Paint.ANTI_ALIAS_FLAG );

或者textView.getPaint().setAntiAlias(true);//抗锯齿

3.中划线

textview.getPaint().setFlags(Paint. STRIKE_THRU_TEXT_FLAG);