How do I insert special characters as text in XML editor for Android?

前端 未结 7 811
南笙
南笙 2021-02-06 03:50

So, I\'m writing an app that involves using some mathematical symbols. I\'m doing this in the visual XML editor. Is there any way I can get, say, an integral symbol, or a \"less

相关标签:
7条回答
  • 2021-02-06 04:31

    I once had to do something similar to that, putting in foreign language characters in an XML file. The best, and as far as I know, and only way is to put the text you want to show in the strings.xml file and refer to them in the XML as @string/your_text_declaration_here. It's also generally good practice to put all text in the string.xml file regardless of special characters or not.

    0 讨论(0)
提交回复
热议问题