android TextView加下划线的方法
时间:2023-09-11 01:12:36
如果是在资源文件里,可以这样写.
< resources >
< string name = "hello" > < u > phone: 1390123456 </ u > </ string >
< string name = "app_name" > MyLink </ string >
</ resources >
<resources>
<string name="hello"><u>phone: 1390123456</u></string>
<string name="app_name">MyLink</string>
</resources>
如果是代码这样写
TextView textView = (TextView)findViewById(R.id.testView);
textView.setText(Html.fromHtml("<u>" + "hahaha" + "</u>" ));
标签:TextView,下划线
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
C#和SQL实现的字符串相似度计算代码分享
2021-06-10 14:23:20
android选项卡TabHost功能用法详解
2021-09-24 01:41:27
![](https://img.aspxhome.com/file/2023/2/138432_0s.jpg)
java中的HashMap多层嵌套
2023-11-27 07:34:52
![](https://img.aspxhome.com/file/2023/4/60344_0s.jpg)
浅析Java线程的中断机制
2023-11-19 20:11:50
Java开发SpringBoot集成接口文档实现示例
2022-07-14 05:43:50
![](https://img.aspxhome.com/file/2023/6/69326_0s.jpg)
Android实现根据评分添加星级条
2021-10-30 13:19:57
![](https://img.aspxhome.com/file/2023/7/137417_0s.jpg)
Java 实战项目锤炼之网上花店商城的实现流程
2021-09-14 04:51:45
![](https://img.aspxhome.com/file/2023/4/108404_0s.png)
史上最全图文讲解Java泛型
2022-08-23 20:27:47
![](https://img.aspxhome.com/file/2023/4/62834_0s.png)
OpenTelemetry初识及调用链Trace详解
2021-08-03 12:37:14
![](https://img.aspxhome.com/file/2023/9/85549_0s.png)
使用JPA主键@Id,@IdClass,@Embeddable,@EmbeddedId问题
2022-07-07 18:35:41
Java编写迷宫小游戏
2021-08-06 12:53:33
![](https://img.aspxhome.com/file/2023/5/62975_0s.jpg)
浅析Spring Boot中的spring-boot-load模块
2023-11-23 02:39:31
![](https://img.aspxhome.com/file/2023/6/58756_0s.png)
Android开发之DrawerLayout实现抽屉效果
2023-09-30 03:40:59
![](https://img.aspxhome.com/file/2023/5/85975_0s.png)
Android 仿今日头条评论时键盘自动弹出的效果(推荐)
2022-07-24 15:00:45
![](https://img.aspxhome.com/file/2023/7/139547_0s.png)
Java实现分页查询功能
2023-03-03 14:30:19
![](https://img.aspxhome.com/file/2023/3/72403_0s.jpg)
java实现KFC点餐小程序
2022-12-11 21:06:51
![](https://img.aspxhome.com/file/2023/7/87137_0s.png)
JDBC+GUI实现简单学生管理系统
2022-08-21 02:52:00
![](https://img.aspxhome.com/file/2023/5/76605_0s.jpg)
Android自定义View实现五子棋游戏
2021-10-16 23:39:27
![](https://img.aspxhome.com/file/2023/4/126684_0s.gif)
深入了解java NIO之Selector(选择器)
2022-02-01 16:39:17
Struts2中接收表单数据的三种驱动方式
2022-04-21 09:23:11