我有一个名为TypeError: undefined is not a constructor (evaluating 'this.route.params.subscribe')
的字符串资源为
large_text
那么如何在大量文本中将短语短语变成超链接呢? The suggestion here is not working:<string name="large_text">
"lots of texts"
...
"lots more text\n\n"
...
"I was not kidding"
"so here is the phrase I want to make a hyperlink"
</string>
甚至不会编译。它给出了错误
错误:元素的内容必须由格式良好的字符组成 数据或标记。
答案 0 :(得分:0)
即使我在strings.xml中使用它时遇到了这个问题,所以我最终使用它就像这样,它对我有用。
useageTerms.setText(Html.fromHtml("By tapping register, you agree to the\n " +
"<a href=\"http://www.google.in/terms.html\">Terms & Conditions</a> for Google"));
useageTerms.setMovementMethod(LinkMovementMethod.getInstance());