Android学习——TextView 设置中划线 下划线
16lz
2022-01-16
android:textAppearance 设置文字外观。如“?android:attr/textAppearanceLargeInverse ”这里引用的是系统自带的一个外观,?表示系统是否有这种外观,否则使用默认的外观。可设置的值如下:textAppearanceButton/textAppearanceInverse/textAppearanceLarge/textAppearanceLargeInverse/textAppearanceMedium/textAppearanceMediumInverse/textAppearanceSmall/textAppearanceSmallInverse
textView.getPaint().setFlags(Paint. UNDERLINE_TEXT_FLAG ); //下划线
textView.getPaint().setAntiAlias(true);//抗锯齿
textview.getPaint().setFlags(Paint. STRIKE_THRU_TEXT_FLAG); //中划线
setFlags(Paint. STRIKE_THRU_TEXT_FLAG|Paint.ANTI_ALIAS_FLAG); // 设置中划线并加清晰
textView.getPaint().setFlags(0); // 取消设置的的划线
如题:
更多相关文章
- Android中RecyclerView Adapter的骚操作
- Android(安卓)开发中找不到 “gen”目录的问题
- 解决Android(安卓)自定义RatingBar 不能显示半星问题
- Android(安卓)启动分析 init进程 init.rc
- Android(安卓)Studio 解决方法No JVM installation found. Pleas
- [Android] ImageView.ScaleType设置图解
- Android配置----Eclipse+BlueStacks调试Android应用
- android dialog
- EditText 属性