List of usage examples for android.os LocaleList size
@IntRange(from = 0) public int size()
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 {/*from ww w . j ava 2 s .c o m*/ 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); }