[I18N] Hardcoded string "Happy Birthday Debashish", should use @string resource less... (Ctrl+F1)
Hardcoding text attributes directly in layout files is bad for several reasons: * When creating configuration variations (for example for landscape or portrait)you have to repeat the actual text (and keep it up to date when making changes) * The application cannot be translated to other languages by just adding new translations for existing string resources. In Android Studio and Eclipse there are quickfixes to automatically extract this hardcoded string into a resource lookup.
Ths is not an error but a warning. As a general rule, you should never use hardcoded strings in your layout but always use string resources (which means the all strings are stored in one separate file where they are easily changeable for different languages and so on).
To convert a hard coded String to a string ressource:
After you've done that the warning will be gone. Good luck...
This is just a warning.
Define your string in string.xml file
Happy Birthday Debashish
and in textView use this string as
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/string_name"
/>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With