[英]String Underline modification in Android
I have a problem with the underlining the textfield used for showing it as the link. 我有一个问题,下划线用于显示它作为链接的文本字段。
I am using the following code: 我使用以下代码:
final String Email1 = new String("http://myURL/");
Email.setText("W : "+Email1);
Email.setPaintFlags(Email.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG);
I am getting the output as below : 我得到如下输出:
I am getting the underline for W: also... Please help with the code to omit the underline to W: 我也在W:下划线,也... 请帮助代码以省略W的下划线:
你有没有尝试过???
Html.fromHtml("W:"+"<u>" +Email1+ "</u>);
You need to use two TextViews alongside each other. 您需要同时使用两个TextView。 One containing the "W : ", the other with the email address.
一个包含“ W:”,另一个包含电子邮件地址。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.