Escaping Single Quotes In Resource Xml For Android
I have a file with strings in my ../res/values/strings.xml, which I try to source for my project. This works fine with normal texts. Problem : I have single quotes in my texts and
Solution 1:
You can use \'
in your string resources.
Solution 2:
Use double quotes:
<string name="mystring_id">"'Hello'"</string>
Solution 3:
Solution 4:
<stringname="forgot_password_body"tools:ignore="StringEscaping">Mother's name</string>
using {tools:ignore="StringEscaping"}
this tools attribute you can add single quote like you want
Post a Comment for "Escaping Single Quotes In Resource Xml For Android"