rib3ye
rib3ye

Reputation: 2923

How do I properly store encoded characters in strings.xml?

I am trying to store two carriage returns in in strings.xml but can't figure out why they are ignored. However, if I put them directly into the layout, the carriage returns work fine.

Outputs carriage returns
android:text="

Sent from my wonderful Android device"

Does not output carriage returns
<string name="sent_from">&#xA;&#xA;Sent from my wonderful Android device</string>

Upvotes: 1

Views: 188

Answers (1)

TronicZomB
TronicZomB

Reputation: 8747

Try the following:

<string name="sent_from">\n\nSent from my wonderful Android device</string>

I think that is what you are looking for.

Upvotes: 1

Related Questions