getResources() or create own static class?
<p>I noticed myself constantly typing:</p>

<pre><code>someVar = getResources().getString(R.string.someString);
</code></pre>

<p>I have several XML files that I am parsing and building and in order to make sure that the files stay consistent, I have placed the tag names in the res/values/strings.xml file. The same handles are used throughout several activities, and some of those activities extend ListActivity while others do not so creating a simple super class which houses these variables ( ex:</p>

<pre><code>public class thisClass extends thatClass 
{...}

public class thatClass 
{
    package String someTag = "this";
    package String otherTag = "that"; 
}
</code></pre>

<p>I would assume that all of these calls to getResources() could get pretty taxing and was wondering if it is beneficial to instead create an R-type file where I can store these types of commonly used variables statically ex:</p>

<pre><code>public final class globalVars 
{
    public static final class XML_TAGS 
    {
        static final String someTag = "this";
        static final String otherTag = "that";
    }
}
</code></pre>

<p>and to reference these variables like such:</p>

<pre><code>serializer.startTag("", globalVars.XML_TAGS.someTag);
</code></pre>

<p>instead of </p>

<pre><code>serializer.startTag("", getResources().getString(R.string.someTag));
</code></pre>

<p>Thanks for the input!</p>
