String resource with the character "%"

I have String.xml and localization is in progress.

when writing content in a String tag, I notice that the extra text after the second "%" character throws an error.

<string name="result_unlikely">Improbable 20% to 50%</string>//working

<string name="result_unlikely">Improbable 20% to 50% required</string>//not working

any idea?

Note . I know that I can write this runtime, but as already mentioned, I implement localization, so using string.xml is much better

+5
source share
1 answer

solvable.

By adding formatting problem = "false".

<string name="result_unlikely" formatted="false">Improbable 20% to 50% required</string>
+9
source

All Articles