List of usage examples for android.os LocaleList get
public Locale get(int index)
From source file:ru.dublgis.androidhelpers.DesktopUtils.java
public static String getUserLocaleNames(final Context context) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { // API 24 / Android 7.0 try {/* w w w . jav a 2 s . c om*/ final LocaleList list = context.getResources().getConfiguration().getLocales(); if (list.size() > 0) { String result = ""; for (int i = 0; i < list.size(); ++i) result += list.get(i).toString() + "\n"; return result; } } catch (final Throwable e) { Log.e(TAG, "getUserLocaleNames exception: ", e); } } return getDefaultLocaleName(context); }