This is in reference to some comments regarding performance (@PankajKumar, @TechEnd, @Ken Y-N):
According to the Google documentation, "String is compiled resource datatype: Resource pointer to a String."
(Link: http://developer.android.com/guide/topics/resources/string-resource.html#String)
So, i think this will increase performance by decreasing the memory footprint, although the difference might not be noticeable.
This is because, when we declare a string in the XML file, a pointer to that resource is maintained. Whenever we need to reuse that resource again somewhere else, we just get a pointer to the existing String , thereby saving memory in allocating a new memory for the same String.
This is in contrast to using hard coded strings, for which memory will allocated every-time for the same String resource.
Hope this helps. Comments are welcome.
Regards,
MM.