Notification.Metric 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 |
|---|---|
| Notification.Metric(Notification+Metric+MetricValue, ICharSequence) |
Creates a Metric with the specified value and label. |
| Notification.Metric(Notification+Metric+MetricValue, String) |
Creates a Metric with the specified value and label. |
| Notification.Metric(Notification+Metric+MetricValue, ICharSequence, Int32) |
Creates a Metric with the specified value, label, and semantic style. |
| Notification.Metric(Notification+Metric+MetricValue, String, Int32) |
Creates a Metric with the specified value, label, and semantic style. |
Notification.Metric(Notification+Metric+MetricValue, ICharSequence)
Creates a Metric with the specified value and label.
[Android.Runtime.Register(".ctor", "(Landroid/app/Notification$Metric$MetricValue;Ljava/lang/CharSequence;)V", "", ApiSince=37)]
public Metric(Android.App.Notification.Metric.MetricValue value, Java.Lang.ICharSequence label);
[<Android.Runtime.Register(".ctor", "(Landroid/app/Notification$Metric$MetricValue;Ljava/lang/CharSequence;)V", "", ApiSince=37)>]
new Android.App.Notification.Metric : Android.App.Notification.Metric.MetricValue * Java.Lang.ICharSequence -> Android.App.Notification.Metric
Parameters
one of the subclasses of MetricValue, such as FixedInt This value cannot be null.
- label
- ICharSequence
metric label -- should be 10 characters or fewer. This value cannot be null.
- Attributes
Remarks
Creates a Metric with the specified value and label.
Android reference for android.app.Notification.Metric.Metric.
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
Notification.Metric(Notification+Metric+MetricValue, String)
Creates a Metric with the specified value and label.
[Android.Runtime.Register(".ctor", "(Landroid/app/Notification$Metric$MetricValue;Ljava/lang/CharSequence;)V", "", ApiSince=37)]
public Metric(Android.App.Notification.Metric.MetricValue value, string label);
[<Android.Runtime.Register(".ctor", "(Landroid/app/Notification$Metric$MetricValue;Ljava/lang/CharSequence;)V", "", ApiSince=37)>]
new Android.App.Notification.Metric : Android.App.Notification.Metric.MetricValue * string -> Android.App.Notification.Metric
Parameters
one of the subclasses of MetricValue, such as FixedInt This value cannot be null.
- label
- String
metric label -- should be 10 characters or fewer. This value cannot be null.
- Attributes
Remarks
Creates a Metric with the specified value and label.
Android reference for android.app.Notification.Metric.Metric.
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
Notification.Metric(Notification+Metric+MetricValue, ICharSequence, Int32)
Creates a Metric with the specified value, label, and semantic style.
[Android.Runtime.Register(".ctor", "(Landroid/app/Notification$Metric$MetricValue;Ljava/lang/CharSequence;I)V", "", ApiSince=37)]
public Metric(Android.App.Notification.Metric.MetricValue value, Java.Lang.ICharSequence label, int semanticStyle);
[<Android.Runtime.Register(".ctor", "(Landroid/app/Notification$Metric$MetricValue;Ljava/lang/CharSequence;I)V", "", ApiSince=37)>]
new Android.App.Notification.Metric : Android.App.Notification.Metric.MetricValue * Java.Lang.ICharSequence * int -> Android.App.Notification.Metric
Parameters
one of the subclasses of MetricValue, such as FixedInt This value cannot be null.
- label
- ICharSequence
metric label -- should be 10 characters or fewer. This value cannot be null.
- semanticStyle
- Int32
semantic style applied to the metric. When the notification is promoted the metric value will be displayed (e.g. colored) according to this style. Value is one of the following: Notification.SEMANTIC_STYLE_UNSPECIFIED; Notification.SEMANTIC_STYLE_INFO; Notification.SEMANTIC_STYLE_SAFE; Notification.SEMANTIC_STYLE_CAUTION; Notification.SEMANTIC_STYLE_DANGER
- Attributes
Remarks
Creates a Metric with the specified value, label, and semantic style.
Android reference for android.app.Notification.Metric.Metric.
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
Notification.Metric(Notification+Metric+MetricValue, String, Int32)
Creates a Metric with the specified value, label, and semantic style.
[Android.Runtime.Register(".ctor", "(Landroid/app/Notification$Metric$MetricValue;Ljava/lang/CharSequence;I)V", "", ApiSince=37)]
public Metric(Android.App.Notification.Metric.MetricValue value, string label, int semanticStyle);
[<Android.Runtime.Register(".ctor", "(Landroid/app/Notification$Metric$MetricValue;Ljava/lang/CharSequence;I)V", "", ApiSince=37)>]
new Android.App.Notification.Metric : Android.App.Notification.Metric.MetricValue * string * int -> Android.App.Notification.Metric
Parameters
one of the subclasses of MetricValue, such as FixedInt This value cannot be null.
- label
- String
metric label -- should be 10 characters or fewer. This value cannot be null.
- semanticStyle
- Int32
semantic style applied to the metric. When the notification is promoted the metric value will be displayed (e.g. colored) according to this style. Value is one of the following: Notification.SEMANTIC_STYLE_UNSPECIFIED; Notification.SEMANTIC_STYLE_INFO; Notification.SEMANTIC_STYLE_SAFE; Notification.SEMANTIC_STYLE_CAUTION; Notification.SEMANTIC_STYLE_DANGER
- Attributes
Remarks
Creates a Metric with the specified value, label, and semantic style.
Android reference for android.app.Notification.Metric.Metric.
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.