Kristi Kristi - 11 days ago 6
Android Question

Could you tell me how can I fix it?

I am a beginner... How can I fix it?

http://i.stack.imgur.com/xaNm6.png

Answer

Go to your strings.xml file, add a new key:

<string name="happy_birthday">Happy Birthday</string>

And go back to the file you showed in the image, change "Happy Birthday" to "@string/happy_birthday"

You should always keep your strings in the layout as key value pairs in the strings.xml file. This is will help you localize your app. When you want to translate your app to French or something, you just need to add a new strings.xml file and put it in a folder called values-fr. No need to change your code in other places. Android will automatically detect the device language and change your app's language to match that.