如何使用HTML格式的标题显示字符串的值 [英] How to display the value of string with its title using html format

查看:100
本文介绍了如何使用HTML格式的标题显示字符串的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有相同的信息串像...
串INFO1 =YYY;
字符串INFO2 =MMM;

现在我想DISPLY它以HTML格式和大胆..

我们的第一个信息:YYY
我们的第二个信息:MMM


解决方案

 字符串INFO1 =YYY;字符串INFO2 =MMM
etmsg.setText(Html.fromHtml(第一信息< B>中+ INFO1 +< / B>中+< BR />第二个信息< B>中+ INFO2 +< / B>中) );

I have same info String like... String info1 ="yyy"; String info2 ="mmm";

Now I want to disply it in Html Format and bold As..

Our First Information:yyy Our Second Information:mmm

解决方案

String info1 ="yyy"; String info2 ="mmm"; 
etmsg.setText(Html.fromHtml("First Info <b>"+info1+"</b>"+"<br/>Second Info <b>"+info2+"</b>")); 

这篇关于如何使用HTML格式的标题显示字符串的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆