android TextView加下划线的方法
摘要:如果是在资源文件里,可以这样写.复制代码代码如下:phone:1390123456MyLink复制代码代码如下:phone:13901234...
如果是在资源文件里,可以这样写.
复制代码 代码如下:
< 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>" ));
【android TextView加下划线的方法】相关文章:
★ android中ListView多次刷新重复执行getView的解决方法
★ 用Android MenuInflater创建菜单项的方法步骤