Notification.Metric 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| Notification.Metric(Notification+Metric+MetricValue, ICharSequence) |
建立一個具有指定值與標籤的指標。 |
| Notification.Metric(Notification+Metric+MetricValue, String) |
建立一個具有指定值與標籤的指標。 |
| Notification.Metric(Notification+Metric+MetricValue, ICharSequence, Int32) |
建立具有指定值、標籤與語意樣式的度量。 |
| Notification.Metric(Notification+Metric+MetricValue, String, Int32) |
建立具有指定值、標籤與語意樣式的度量。 |
Notification.Metric(Notification+Metric+MetricValue, ICharSequence)
建立一個具有指定值與標籤的指標。
[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
參數
MetricValue 的子類別之一,例如 FixedInt。此值不能為 null。
- label
- ICharSequence
公制標籤——應該不超過10個字元。 這個值不可能為零值。
- 屬性
備註
建立一個具有指定值與標籤的指標。
Android 參考資料。android.app.Notification.Metric.Metric
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。
適用於
Notification.Metric(Notification+Metric+MetricValue, String)
建立一個具有指定值與標籤的指標。
[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
參數
MetricValue 的子類別之一,例如 FixedInt。此值不能為 null。
- label
- String
公制標籤——應該不超過10個字元。 這個值不可能為零值。
- 屬性
備註
建立一個具有指定值與標籤的指標。
Android 參考資料。android.app.Notification.Metric.Metric
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。
適用於
Notification.Metric(Notification+Metric+MetricValue, ICharSequence, Int32)
建立具有指定值、標籤與語意樣式的度量。
[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
參數
MetricValue 的子類別之一,例如 FixedInt。此值不能為 null。
- label
- ICharSequence
公制標籤——應該不超過10個字元。 這個值不可能為零值。
- semanticStyle
- Int32
語意風格應用於度量。 當通知被推廣時,指標值會依照此樣式顯示(例如彩色)。 價值屬於以下之一:Notification.SEMANTIC_STYLE_UNSPECIFIED;Notification.SEMANTIC_STYLE_INFO;Notification.SEMANTIC_STYLE_SAFE;Notification.SEMANTIC_STYLE_CAUTION;Notification.SEMANTIC_STYLE_DANGER
- 屬性
備註
建立具有指定值、標籤與語意樣式的度量。
Android 參考資料。android.app.Notification.Metric.Metric
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。
適用於
Notification.Metric(Notification+Metric+MetricValue, String, Int32)
建立具有指定值、標籤與語意樣式的度量。
[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
參數
MetricValue 的子類別之一,例如 FixedInt。此值不能為 null。
- label
- String
公制標籤——應該不超過10個字元。 這個值不可能為零值。
- semanticStyle
- Int32
語意風格應用於度量。 當通知被推廣時,指標值會依照此樣式顯示(例如彩色)。 價值屬於以下之一:Notification.SEMANTIC_STYLE_UNSPECIFIED;Notification.SEMANTIC_STYLE_INFO;Notification.SEMANTIC_STYLE_SAFE;Notification.SEMANTIC_STYLE_CAUTION;Notification.SEMANTIC_STYLE_DANGER
- 屬性
備註
建立具有指定值、標籤與語意樣式的度量。
Android 參考資料。android.app.Notification.Metric.Metric
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。