1. Android Textview显示下划线的两种方法

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/mbh12333/article/details/81535408

1.在资源文件里的写法

<string name="key"><u>content</u></string>

2.在代码中的写法

TextView textView = (TextView)findViewById(R.id.testView);   
textView.setText(Html.fromHtml("<u>"+"content"+"</u>"));  

猜你喜欢

转载自blog.csdn.net/mbh12333/article/details/81535408