This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void initializePhrases() { | |
Field[] fields = R.string.class.getFields(); | |
loadingPhrasesList = new ArrayList<>(); | |
String requiredIdStart = "loading_window_message_"; // Required string ID. In strings.xml file, the ID of the string must be "loading_window_message_" plus a number from 0 to inifinite (not so long :) | |
for (int i = 0; i < fields.length; i++) { | |
try { | |
String stringIdStart = fields[i].getName().substring(0, idStartText.length()); | |
if (stringIdStart.equals(requiredIdStart)) { | |
loadingPhrasesList.add(fields[i].getName()); | |
} |
NewerOlder