added in version 26.1.0
belongs to Maven artifact com.android.support:support-compat:28.0.0-alpha1

LocaleListCompat

public final class LocaleListCompat
extends Object

java.lang.Object
   ↳ android.support.v4.os.LocaleListCompat


Helper for accessing features in LocaleList.

Summary

Public methods

static LocaleListCompat create(Locale... localeList)

Creates a new instance of LocaleListCompat from the Locale array.

boolean equals(Object other)
static LocaleListCompat forLanguageTags(String list)

Generates a new LocaleList with the given language tags.

Locale get(int index)

Retrieves the Locale at the specified index.

static LocaleListCompat getAdjustedDefault()

Returns the default locale list, adjusted by moving the default locale to its first position.

static LocaleListCompat getDefault()

The result is guaranteed to include the default Locale returned by Locale.getDefault(), but not necessarily at the top of the list.

static LocaleListCompat getEmptyLocaleList()

Retrieve an empty instance of LocaleList.

Locale getFirstMatch(String[] supportedLocales)

Returns the first match in the locale list given an unordered array of supported locales in BCP 47 format.

int hashCode()
int indexOf(Locale locale)

Searches this LocaleListCompat for the specified Locale and returns the index of the first occurrence.

boolean isEmpty()

Returns whether the LocaleListCompat contains no Locale items.

int size()

Returns the number of Locale items in this LocaleListCompat.

String toLanguageTags()

Retrieves a String representation of the language tags in this list.

String toString()
Object unwrap()

Gets the underlying framework object.

static LocaleListCompat wrap(Object object)

Creates a new instance of LocaleListCompat from the Locale list.

Inherited methods

From class java.lang.Object