android里TextView加下划线的几种方式
2014-07-10 17:34
337 查看
如果是在资源文件里:
如果是代码里:
代码也可以这样:
<resources> <string name="hello"><u>phone:0123456</u></string> <string name="app_name">MyLink</string> </resources>
如果是代码里:
TextView textView = (TextView)findViewById(R.id.tv_test); textView.setText(Html.fromHtml("<u>"+"0123456"+"</u>"));
代码也可以这样:
tvTest.getPaint().setFlags(Paint. UNDERLINE_TEXT_FLAG ); //下划线 tvTest.getPaint().setAntiAlias(true);//抗锯齿
相关文章推荐
- android里TextView加下划线的几种方式
- Android TextView 添加下划线的几种方式
- Android TextView 添加下划线的几种方式
- Android TextView 添加下划线的几种方式
- android里TextView加下划线的几种方式 以及 为TextView添加边框 4000
- Android TextView 添加下划线的几种方式
- Android TextView 添加下划线的几种方式
- Android TextView 添加下划线的几种方式
- Android TextView加下划线的几种方式
- Android TextView 添加下划线的几种方式
- android里TextView加下划线的几种方式
- Android TextView 添加下划线的几种方式
- Android里TextView加下划线的几种方式
- android:TextView中的文本链接之--链接的几种方式
- android里TextView加下划线的三种方式
- android:TextView中的文本链接之--链接的几种方式
- (android实战)实现【关于我们】功能(textview的文本样式几种实现方式)
- [Android 小知识点] textview 设置下划线的两种方式
- Android 开发之旅:view的几种布局方式及实践
- Android 开发之旅:view的几种布局方式及实践