若是是在资源文件里:app
<resources> <string name="hello"><u>phone:0123456</u></string> <string name="app_name">MyLink</string> </resources>
若是是代码里:spa
TextView textView = (TextView)findViewById(R.id.tv_test);
textView.setText(Html.fromHtml("<u>"+"0123456"+"</u>"));
代码也能够这样:code
tvTest.getPaint().setFlags(Paint. UNDERLINE_TEXT_FLAG ); //下划线tvTest.getPaint().setAntiAlias(true);//抗锯齿