Sdílet prostřednictvím


LocaleList.Default Property

Definition

The result is guaranteed to include the default Locale returned by Locale. -or- Also sets the default locale by calling Locale.

public static Android.OS.LocaleList Default { [Android.Runtime.Register("getDefault", "()Landroid/os/LocaleList;", "", ApiSince=24)] get; [Android.Runtime.Register("setDefault", "(Landroid/os/LocaleList;)V", "", ApiSince=24)] set; }
[<get: Android.Runtime.Register("getDefault", "()Landroid/os/LocaleList;", "", ApiSince=24)>]
[<set: Android.Runtime.Register("setDefault", "(Landroid/os/LocaleList;)V", "", ApiSince=24)>]
static member Default : Android.OS.LocaleList with get, set

Property Value

Attributes

Remarks

Property getter documentation:

The result is guaranteed to include the default Locale returned by Locale.getDefault(), but not necessarily at the top of the list. The default locale not being at the top of the list is an indication that the system has set the default locale to one of the user's other preferred locales, having concluded that the primary preference is not supported but a secondary preference is.

Note that the default LocaleList would change if Locale.setDefault() is called. This method takes that into account by always checking the output of Locale.getDefault() and recalculating the default LocaleList if needed.

Java documentation for android.os.LocaleList.getDefault().

Property setter documentation:

Also sets the default locale by calling Locale.setDefault() with the first locale in the list.

Java documentation for android.os.LocaleList.setDefault(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