如何文本字符串的Andr​​oid大胆的一部分 [英] how to bold a part of text Android String

查看:139
本文介绍了如何文本字符串的Andr​​oid大胆的一部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想大胆的一文中的一部分,但我不知道这是如何我的文字:

i want to bold a part of "" a text but i dont know how this my text:

<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". 

推荐答案

您可以使用 SpannableStringBuilder 新StyleSpan(android.graphics.Typeface。 BOLD)来格式化字符串的一部分是粗体即可。你可以得到帮助,<一个href=\"http://stackoverflow.com/questions/10828182/spannablestringbuilder-to-create-string-with-multiple-fonts-text-sizes-etc-examp\">here

You can use SpannableStringBuilder and new StyleSpan(android.graphics.Typeface.BOLD) to format a part of the string to be Bold. You can get help here

这篇关于如何文本字符串的Andr​​oid大胆的一部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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