Is it a bad idea to create a public class Strings in Android app that only hosts all the strings needed (instead of using the Android built in strings.xml)?
i.e.
public class Strings {
public static final String RESOURCE_ONE = "hello";
public static final String RESOURCE_TWO = "world";
}
so then from anywhere in the Android app I can just do
args.putString(Strings.RESOURCE_ONE, "resource");
instead of the default
args.putString(getString(R.string.resource_one), "resource");
I'm thinking of this approach so then I don't need to use Context all the time, which is useful when I need a string in a static function. However, I'm not sure if declaring an entire class to store every single String will be memory intensive and waste memory in the app.
Any ideas?