In my app I have translated everything. This includes my dialogs also. As of yesterday, everything worked perfectly. Today I’ve added a String, for a new dialog. When I run my app, it provides me wrong Strings which is very weird.
For example, I call String x and y and he shows me String w and z. Not only in my new dialog, also in my existing dialogs! As for lables, he puts everything right. Have I done something wrong?
In my String.xml file I’ve declarated many Strings, here’s an example of one he mixes up.
<string name="EvenGeduld">Even geduld...</string>
<string name="TweetProgress">De Tweets worden ingeladen</string>
<string name="Voornaam">Voornaam</string>
<string name="Geboortedatum">Geboortedatum</string>
This is my code for my dialog (it’s set in AsyncTask class, dialog is declarated on top of my class, initialized in onCreate()):
dialog.setTitle(R.string.EvenGeduld);
Resources res = getResources();
String test = (res.getString(R.string.TweetProgress));
dialog.setMessage(test);
dialog.show();
try this.
and clean your project