我在资源文件中保存了一个字符串,我运行代码a并得到结果a,我希望得到结果b
我的代码有什么问题?
结果
Recommend the app to a friend
代码
val context = LocalContext.current
val temp=context.getString(R.string.myRecommendContent)
<string name="myRecommendContent"><a href="#">Recommend</a> the app to a friend</string>
结果B
<a href="#">Recommend</a> the app to a friend
我知道这是downvoted和所有,但你试过:
<string name="myRecommendContent"><a href="#">Recommend</a> the app to a friend</string>
在我看来,它忽略了你的"其他"。元素,例如anchor
元素,然后继续使用string
元素本身。