Hardcoded string should use @string resource
Android Development Solution - use @String Resource
Android development Solution |
Code :
And, I noticed :
1) yellow line under android:text="Yellow"
2) yellow line under android:text="row four"
the Triangle warn says [I18N] Hardcoded string "Yellow", should use @string resource " and same for the rest of the warnings.Any suggestion?
Solution :
It is not good practice to hard code strings into your layout files. You should add them to a string resource file and then reference them from your layout.
This allows you to update every occurrence of the word "Yellow" in all layouts at the same time by just editing your strings.xml file.
It is also extremely useful for supporting multiple languages as a separate strings.xml file can be used for each supported language.
Hey! I recommend exploring the possibilities of https://poeditor.com as internationalization tool for Android. It is very useful and open source-friendly. It has github integration, automatic translation and many other useful features.
ReplyDeleteIf you are going for most excellent contents like myself, just pay a visit this web page everyday for the reason that it offers feature contents, thanks
ReplyDeleteHere is my web-site: sillas de forja en sevilla (http://grotesquecrease78.webgarden.com/sections/blog/muebles-de-hierro-forjado-en)
Hey there! This post could not be written any better! Reading
ReplyDeletethrough this post reminds me of my old room mate!
He always kept talking about this. I will forward this post to him.
Fairly certain he will have a good read. Thanks for sharing!
Here is my web blog: diy projects for home improvements (homeimprovementdaily.com)
I am genuinely happy to read this web site posts which consists of lots of helpful facts, thanks for providing such data.
ReplyDeleteMy site ... diy home improvement; ,
Vοus écrivez toujours des postes attractifs
ReplyDeletemy webpage films porno amateurs
yolo
ReplyDelete