如何在字符串 Android 中嵌入 html link?

How to embed html link in a String Android?

你好,我知道如何在 xml 中的字符串中嵌入 html。

<string name="our_policy">Our app 
    <a href="www.google.com">Policy</a> and 
    <a href="www.google.com">Terms</a>
</string>

但我必须在 运行 time.How 期间向其中添加更多内容,以便在 运行 期间将 html link 嵌入字符串并发送它通过 gmail.Any 的意图提供帮助,我们将不胜感激并提前致谢。

你可以使用

intent.putExtra(Intent.EXTRA_TEXT,Html.fromHtml("<a href=http://www.google.com >Google</a>")); 

这是更好的方法。