I'm getting started with an Android project and I encountered this issue.
I'm trying to create a switch where the cases are string got with
case getString(R.string.myString): ...
but I'm getting a
Constant expression required
error.
I didn't want to create a cascade of if statements (this wouldn't require constant values, but it's less readable) so, is there a way to have a switch with strings taken from the strings.xml file?
Thank you for your help!