I have always tried to use the resource in Android to declare my strings in Android, ever since I had a translation issue. But there are times I don't need to declare strings, like the strings I use for log messages. But I did a little search and found that nobody has tested what is faster, loading a string from strings.xml in code or hard coding it in line. Here is the normal way I use log messages:
log.d(TAG, "This is My Hard Coded String");
Compared to putting "This is My Hard Coded String" in strings.xml and then calling it in code:
log.d(TAG, getResurce().getString(R.string.hardcodedstring));
I've tried running some test times these but not sure I have considered all aspects. So what is faster has anyone else done this?