use of io.github.lonamiwebs.stringlate.classes.locales.LocaleString in project Stringlate by LonamiWebs.
the class TranslateActivity method loadLocalesSpinner.
// endregion
// region Spinner loading
private void loadLocalesSpinner() {
ArrayList<LocaleString> spinnerArray = new ArrayList<>();
for (String locale : mRepo.getLocales()) if (!locale.equals(RepoHandler.DEFAULT_LOCALE))
spinnerArray.add(new LocaleString(locale));
ArrayAdapter<LocaleString> adapter = new ArrayAdapter<>(this, android.R.layout.simple_spinner_item, spinnerArray);
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
mLocaleSpinner.setAdapter(adapter);
setCurrentLocale(mRepo.settings.getLastLocale());
}
Aggregations