I'm trying to create something like this in the Manifest:
B4X:
CreateResource(values, strings.xml,
<resources>
<string name="accessibility_description">Some Text, Some more text</string>
</resources>
)
The problem is the "," in the text. I think the CreateResource function thinks that there starts another parameter.
How can I create such strings? Is there something like an escape character?
Thanks. Replacing the comma with , works. But I guess this is somehow a workaround for a CreateResource limitation. I'm sure you won't have to do it in an XML file.
If you have an apostrophe (') in your string, you must either escape it with a backslash (\') or enclose the string in double-quotes (""). For example, here are some strings that do and don't work:
<string name="good_example">This\'ll work</string>
<string name="good_example_2">"This'll also work"</string>
<string name="bad_example">This doesn't work</string>
<!-- Causes a compile error -->
Did you tried to enclose the String (including comma) with quotes (")?
B4X:
CreateResource(values, strings.xml,
<resources>
<string name="accessibility_description">"Some Text, Some more text"</string>
</resources>
)