app直播源代码,带下划线的TextVeiw

app直播源代码,带下划线的TextVeiw

 

1
/**<br> * 带有下划线的TextView。<br> */<br>public class UnderlineTextView extends TextView {<br>    public UnderlineTextView(Context context, AttributeSet attrs, int defStyle) {<br>        super(context, attrs, defStyle);<br>    }<br>    public UnderlineTextView(Context context, AttributeSet attrs) {<br>        super(context, attrs);<br>    }<br>    public UnderlineTextView(Context context) {<br>        super(context);<br>    }<br>    @Override<br>    protected void onDraw(Canvas canvas) {<br>        this.getPaint().setFlags(Paint.UNDERLINE_TEXT_FLAG);<br>        this.getPaint().setAntiAlias(true); //必须加上这句代码,否则添加下划线的代码不起作用,不知道什么原因?<br>        super.onDraw(canvas);<br>    }<br>}

以上就是 app直播源代码,带下划线的TextVeiw,更多内容欢迎关注之后的文章

 

posted @   云豹科技-苏凌霄  阅读(16)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· ollama系列01:轻松3步本地部署deepseek,普通电脑可用
· 25岁的心里话
· 按钮权限的设计及实现
历史上的今天:
2022-05-31 短视频软件开发,flutter 输入框限制输入 数字、小数
2022-05-31 在线直播源码,完整登陆页面的全部信息(包括用户名、输入密码等)
2022-05-31 直播软件搭建,Android studio设计两个界面间的切换
点击右上角即可分享
微信分享提示