LocaleConfig Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| LocaleConfig(Context) |
Returns an override LocaleConfig if it has been set via LocaleManager.setOverrideLocaleConfig(LocaleConfig). |
| LocaleConfig(LocaleList) |
Return the LocaleConfig with any sequence of locales combined into a LocaleList. |
| LocaleConfig(IntPtr, JniHandleOwnership) |
Initializes a managed representation of an existing Java Native Interface object. |
LocaleConfig(Context)
Returns an override LocaleConfig if it has been set via LocaleManager.setOverrideLocaleConfig(LocaleConfig).
[Android.Runtime.Register(".ctor", "(Landroid/content/Context;)V", "", ApiSince=33)]
public LocaleConfig(Android.Content.Context context);
[<Android.Runtime.Register(".ctor", "(Landroid/content/Context;)V", "", ApiSince=33)>]
new Android.App.LocaleConfig : Android.Content.Context -> Android.App.LocaleConfig
Parameters
- context
- Context
Context: the context of the application. This value cannot be null.
- Attributes
Remarks
Returns an override LocaleConfig if it has been set via LocaleManager.setOverrideLocaleConfig(LocaleConfig). Otherwise, returns the LocaleConfig from the application resources.
See also:
Android reference for android.app.LocaleConfig.LocaleConfig.
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
LocaleConfig(LocaleList)
Return the LocaleConfig with any sequence of locales combined into a LocaleList.
[Android.Runtime.Register(".ctor", "(Landroid/os/LocaleList;)V", "", ApiSince=34)]
public LocaleConfig(Android.OS.LocaleList locales);
[<Android.Runtime.Register(".ctor", "(Landroid/os/LocaleList;)V", "", ApiSince=34)>]
new Android.App.LocaleConfig : Android.OS.LocaleList -> Android.App.LocaleConfig
Parameters
- locales
- LocaleList
LocaleList: the desired locales for a specified application. This value cannot be null.
- Attributes
Remarks
Return the LocaleConfig with any sequence of locales combined into a LocaleList. Note: Applications seeking to create an override LocaleConfig via LocaleManager.setOverrideLocaleConfig(LocaleConfig) should use this constructor to first create the LocaleConfig they intend the system to see as the override. Note: The creation of this LocaleConfig does not automatically mean it will become the override config for an application. Any LocaleConfig desired to be the override must be passed into the LocaleManager.setOverrideLocaleConfig(LocaleConfig), otherwise it will not persist or affect the system's understanding of app-supported resources.
Android reference for android.app.LocaleConfig.LocaleConfig.
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
LocaleConfig(IntPtr, JniHandleOwnership)
Initializes a managed representation of an existing Java Native Interface object.
protected LocaleConfig(IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Android.App.LocaleConfig : nativeint * Android.Runtime.JniHandleOwnership -> Android.App.LocaleConfig
Parameters
- javaReference
-
IntPtr
nativeint
The Java Native Interface object reference.
- transfer
- JniHandleOwnership
The ownership transfer to apply to the Java Native Interface object reference.
Remarks
This constructor is called by the .NET for Android binding runtime when it creates a managed peer for an existing Java object.
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.