Skip to content

Resource Tips

Efra Espada edited this page May 27, 2019 · 4 revisions

New Line

Use \n char for adding new lines. Android converts enter keys to a simple white space.

<resources>
    <string name="obfuscated" hidden="true">Hello there. 
        General Kenobi!
    </string>
    <string name="normal">Hello there. 
        General Kenobi!
    </string>
</resources>
  • After the reveal process, the obfuscated string key will return Hello there.[original tab space]General Kenobi![original tab space].

  • The normal string key will return Hello there. General Kenobi!.

With the new-line char, obfuscated and normal string keys return the same:

<resources>
    <string name="obfuscated" hidden="true">Hello there.\nGeneral Kenobi!</string>
    <string name="normal">Hello there.\nGeneral Kenobi!</string>
</resources>

Multiple Attributes [issue]

The hidden attribute must be placed in the last position of the string definition.

<resources>
    <string name="obfuscated_not_working" hidden="true" translatable="true">Hello there. General Kenobi!</string>
    <string name="obfuscated_working" translatable="true" hidden="true">Hello there. General Kenobi!</string>
</resources>

When the plugin obfuscates string values, all the hidden attributes are removed.

This issue will be fixed asap