NullPointerException
NullPointerException

Reputation: 37731

How to put this symbol: " ' " (simple Quotation mark) in a XMLfile of android?

i am translating some text into Italian, an i got an error on this line of the XML of the strings.xml because the ' symbol on L'utente:

<string name="usernotexist">L'utente non esiste</string> 

how to solve that error?

Upvotes: 5

Views: 3468

Answers (2)

Cristian
Cristian

Reputation: 200170

<string name="good_example">"This'll work"</string>
<string name="good_example_2">This\'ll also work</string>

Taken from the official documentation: http://developer.android.com/guide/topics/resources/string-resource.html

Upvotes: 7

Pinki
Pinki

Reputation: 21939

Try this

<string name="dialog">L\'tutente non esiste </string>

Upvotes: 4

Related Questions