Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/400.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/210.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 在共享意图android中设置字体_Java_Android_Fonts - Fatal编程技术网

Java 在共享意图android中设置字体

Java 在共享意图android中设置字体,java,android,fonts,Java,Android,Fonts,我一直在寻找解决方案,因为现在已经有一段时间了。我想设置从我的应用程序共享到其他应用程序的文本的字体 我不知道如何才能做到这一点,字体在.ttf文件中。下面的代码我正在使用,但它是纯文本 Intent intent = new Intent(Intent.ACTION_SEND); intent.setType("text/plain"); intent.putExtra(Intent.EXTRA_TEXT, "<b>This is a message

我一直在寻找解决方案,因为现在已经有一段时间了。我想设置从我的应用程序共享到其他应用程序的文本的字体

我不知道如何才能做到这一点,字体在.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);
Intent Intent=新意图(Intent.ACTION\u SEND);
intent.setType(“文本/普通”);
intent.putExtra(intent.EXTRA_TEXT,“这是给你的消息
你好”); mShareActionProvider.setShareContent(意图);
请告诉我可能的选择

谢谢, 阿曼迪普

我想设置从我的应用程序共享到其他应用程序的文本的字体

那是不可能的,对不起

下面的代码我正在使用,但它是纯文本

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);
如果要传递html标记,您可能希望使用
text/html
,而不是
text/plain