Search code examples
androidandroid-resources

Confusion when using String Resources


There is one confusion in my mind, that why we are using String Resources? Instead of Hardcoded Text? To write a text in Android


Solution

  • The main reason is to be able to traduce your app to other languages.

    You can have different value folders (each with their strings.xml file) for different languages so you don't have to modify a single line of your code.

    Here you can find how: https://developer.android.com/training/basics/supporting-devices/languages