我已经寻找解决方案有一段时间了。我想设置从我的应用程序共享到其他应用程序的文本的字体。
我不知道如何实现这一点,字体位于 .ttf 文件中。我正在使用以下代码,但它用于纯文本。
Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_TEXT, "<b>This is a message for you</b><br/>Hello");
mShareActionProvider.setShareIntent(intent);
请让我知道我有可能的选择。
谢谢, 阿曼迪普
最佳答案
I want to set the font of the text shared from my app to other apps.
抱歉,这是不可能的。
The below code I am using but it is for the plain text.
鉴于您要传递 HTML 标记,您可能希望使用 text/html
,而不是 text/plain
。
关于java - 在分享 Intent android中设置字体,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19066315/