When you have a string array in strings.xml, you can check whether your new string matches an entry in that array:
String[] temp_array = getResources().getStringArray(R.array.your_array); if (Arrays.asList(temp_array).contains(myString)) return true;