Partager via


DateIntervalFormat.SetContext(DisplayContext) Method

Definition

<strong>[icu]</strong> Set a particular DisplayContext value in the formatter, such as CAPITALIZATION_FOR_STANDALONE.

[Android.Runtime.Register("setContext", "(Landroid/icu/text/DisplayContext;)V", "GetSetContext_Landroid_icu_text_DisplayContext_Handler", ApiSince=33)]
public virtual void SetContext (Android.Icu.Text.DisplayContext? context);
[<Android.Runtime.Register("setContext", "(Landroid/icu/text/DisplayContext;)V", "GetSetContext_Landroid_icu_text_DisplayContext_Handler", ApiSince=33)>]
abstract member SetContext : Android.Icu.Text.DisplayContext -> unit
override this.SetContext : Android.Icu.Text.DisplayContext -> unit

Parameters

context
DisplayContext

The DisplayContext value to set.

Attributes

Remarks

<strong>[icu]</strong> Set a particular DisplayContext value in the formatter, such as CAPITALIZATION_FOR_STANDALONE. This causes the formatted result to be capitalized appropriately for the context in which it is intended to be used, considering both the locale and the type of field at the beginning of the formatted result.

Java documentation for android.icu.text.DateIntervalFormat.setContext(android.icu.text.DisplayContext).

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