我想加粗“”文本的一部分,但我不知道我的文本是这样的:
<string name="apropos"> Le projet Marocherche : Bâtir au cœur d un portail professionnel, destiné aux entreprises marocaines, une création conçue par des "professionnels pour des professionnels".
最佳答案
就这样使用——
String sourceString = "<b>" + id + "</b> " + name;
mytextview.setText(Html.fromHtml(sourceString));
如果你想在 strings.xml 中编辑字符串,你可以这样做 -
<resource>
<string name="styled_welcome_message">We are <b>so</b> glad to see you.</string>
</resources>
关于java - 如何加粗文本Android String的一部分,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30460469/