源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

android TextView加下划线的方法

  • 时间:2020-08-05 16:10 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:android TextView加下划线的方法
[b]如果是在资源文件里,可以这样写. [/b]
[u]复制代码[/u] 代码如下:
< resources >       < string   name = "hello" > < u > phone: 1390123456 </ u > </ string >       < string   name = "app_name" > MyLink </ string >   </ resources >
[u]复制代码[/u] 代码如下:
 <resources>     <string name="hello"><u>phone: 1390123456</u></string>     <string name="app_name">MyLink</string> </resources>
如果是代码这样写
[u]复制代码[/u] 代码如下:
TextView textView = (TextView)findViewById(R.id.testView);   textView.setText(Html.fromHtml("<u>" + "hahaha" + "</u>" ));
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部