/**
* 下划线
*
* @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);// 抗锯齿
}
TextView划线 android
最新推荐文章于 2024-08-11 18:09:59 发布
本文介绍了如何使用 Android 中 TextView 控件来实现不同文本样式的设置,包括下划线、中划线、抗锯齿等效果,并提供了具体的实现方法。
2008

被折叠的 条评论
为什么被折叠?



