Compartilhar via


Configuration.Locales Property

Definition

Get the locale list. -or- Set the locale list.

public Android.OS.LocaleList Locales { [Android.Runtime.Register("getLocales", "()Landroid/os/LocaleList;", "", ApiSince=24)] get; [Android.Runtime.Register("setLocales", "(Landroid/os/LocaleList;)V", "", ApiSince=24)] set; }
[<get: Android.Runtime.Register("getLocales", "()Landroid/os/LocaleList;", "", ApiSince=24)>]
[<set: Android.Runtime.Register("setLocales", "(Landroid/os/LocaleList;)V", "", ApiSince=24)>]
member this.Locales : Android.OS.LocaleList with get, set

Property Value

The locale list.

Attributes

Remarks

Property getter documentation:

Get the locale list. This is the preferred way for getting the locales (instead of using the direct accessor to #locale, which would only provide the primary locale).

Java documentation for android.content.res.Configuration.getLocales().

Property setter documentation:

Set the locale list. This is the preferred way for setting up the locales (instead of using the direct accessor or #setLocale(Locale)). This will also set the layout direction according to the first locale in the list.

Note that the layout direction will always come from the first locale in the locale list, even if the locale is not supported by the resources (the resources may only support another locale further down the list which has a different direction).

Java documentation for android.content.res.Configuration.setLocales(android.os.LocaleList).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to