TextView划线 android
来源:互联网 发布:淘宝上买的刀怎么开刃 编辑:程序博客网 时间:2024/04/27 15:48
TextView 加下划线 、 中划线
下过如图:
// 中划线
textView.getPaint().setFlags(Paint.STRIKE_THRU_TEXT_FLAG | Paint.ANTI_ALIAS_FLAG); // 设置中划线并加清晰
// 下划线
textView.getPaint().setFlags(Paint.UNDERLINE_TEXT_FLAG);
//取消设置的线
textView.getPaint().setFlags(0); // 取消设置的的划线
我封装了几个方法 直接调用
/** * 下划线 * * @param textView */private void addButtomLine(TextView textView) {textView.getPaint().setFlags(Paint.UNDERLINE_TEXT_FLAG);}/** * 移除线 * * @param textView */private void removeLine(TextView textView) {textView.getPaint().setFlags(0); // 取消设置的的划线}/** * 设置中划线并加清晰 * * @param textView */private void addLine(TextView textView) {textView.getPaint().setFlags(Paint.STRIKE_THRU_TEXT_FLAG | Paint.ANTI_ALIAS_FLAG); // 设置中划线并加清晰}/** * 中划线 * * @param textView */private void addCenterLine(TextView textView) {textView.getPaint().setFlags(Paint.STRIKE_THRU_TEXT_FLAG); // 中划线}/** * 抗锯齿 * * @param textView */private void addjuchiLine(TextView textView) {textView.getPaint().setAntiAlias(true);// 抗锯齿}
3 0
- TextView划线 android
- TextView划线android
- TextView划线 android
- TextView划线 android
- Android TextView 添加中划线
- android textview中划线,下划线
- Android带下划线的TextView
- android 设置textview划线效果
- android textview 添加上划线 中划线 删除线
- android 设置textview中划线效果
- android 设置textview中划线效果
- android自定义View(一)之下划线TextView
- Android TextView 设置中划线 下划线
- android 设置textview中划线效果
- android 动态设置textview 中划线 下划线
- Android自定义带下划线的TextView
- Android TextView加中划线,下划线
- Android TextView添加下划线和中划线
- 不要轻易考验人性
- tip of Firefox extention tab mix plus
- uva 11825 状态压缩DP
- XTU 1178A+B
- 速度
- TextView划线 android
- tips of notepad++
- poj2828 Buy Tickets 线段树,单点更新
- 盘点10大O2O创业机会点
- Android中如何搭建一个WebServer
- STM32F103RB, KEIL编译出错:cannot open preprocessing output output file ".\神舟i号\main.d" no such file or
- 将一组随机数写入本地文件,接着读取求和
- ssh原理与运用
- 一位大牛整理的python资源