added sort languages for wikivoyage popupMenu

This commit is contained in:
Chumva 2018-05-04 11:26:07 +03:00
parent 7ebce6878e
commit 2e55393c4f

View file

@ -253,7 +253,8 @@ public class WikivoyageArticleDialogFragment extends WikiArticleBaseDialogFragme
for (String n : langs) {
names.put(n, FileNameTranslationHelper.getVoiceName(getContext(), n));
}
for (final Map.Entry<String, String> e : names.entrySet()) {
Map<String, String> sortedNames = AndroidUtils.sortByValue(names);
for (final Map.Entry<String, String> e : sortedNames.entrySet()) {
final String lang = e.getValue();
final String langKey = e.getKey();
MenuItem item = popup.getMenu().add(lang);