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.
For example:
public static final String foo = /*grab string from resources*/
Right now I have this:
public static final String PROTO = Resources.getSystem().getString(R.string.stage_proto);
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.
Is there anyway to set a value from Resources to a compile time constant variable?