Is there a way to make a variable compile time constant from an XML file?
<p>I have strings stored in an XML file for my app (for easier changes and translations, etc). My question is if there is anyway to take a value from the table and set it in a compile time constant variable.</p>

<p>For example:</p>

<pre><code>public static final String foo = /*grab string from resources*/    
</code></pre>

<p>Right now I have this:</p>

<pre><code>public static final String PROTO = Resources.getSystem().getString(R.string.stage_proto);    
</code></pre>

<p>which when I later try to use it for a case label in a switch-case statement, I get an error saying it's not a constant expression.</p>

<p>Is there anyway to set a value from Resources to a compile time constant variable?</p>