Thursday, March 20, 2014

hardcoded string should use @string resource

Even though you can proceed without any major problem the principle of clean code recall us to get rid of all warnings at every steps. Now , suppose you have the following snippet:

Due to the following line :

[I18Nhardcoded string "Country" should use @string resource

Solution:

You have to go to your res folder and there will be a strings.xml file under values, then add the line below:


Then now under your main.xml  replace the existing textView with

Done !

1 comment: