小编Pra*_*mar的帖子

如何在TextView中显示格式化文本?

我想在TextView应用程序中添加大量的格式化文本,但不知道如何...我尝试将它添加到我的字符串资源文件但id没有工作.. ii做了这个 -

    <string name="some_text">Create stickers for Gboard on Google Play
01 September 2017
Posted by Alan Ni, Associate Product Manager, Gboard
Messaging is getting more and more expressive -- today you can say I love you 
    </string>
Run Code Online (Sandbox Code Playgroud)

然后在活动......

TextView textView=(TextView) findViewById(R.id.some);
textView.setText(getString(R.string.some_text));
Run Code Online (Sandbox Code Playgroud)

但它只是以相同的格式显示所有内容..我希望它以粗体标题并为事物添加颜色..基本上我想显示我们如何在MS Office中编写

android textview

2
推荐指数
1
解决办法
9982
查看次数

标签 统计

android ×1

textview ×1