語言

Notification 建構函式

定義

多載

名稱 Description
Notification()

以預設值建構一個通知物件。

Notification(Parcel)

解除包裹通知的扁平化。

Notification(Int32, ICharSequence)

建立 Notification 一個物件,具備狀態列圖示所需的資訊,但不使用標準的展開視圖。

Notification(Int32, String)

建立 Notification 一個物件,具備狀態列圖示所需的資訊,但不使用標準的展開視圖。

Notification(IntPtr, JniHandleOwnership)

初始化現有 Java 原生介面物件的受管理表示。

Notification(Int32, ICharSequence, Int64)
已淘汰.

此構造器已被棄用。

Notification(Int32, String, Int64)

此構造器已被棄用。

Notification()

以預設值建構一個通知物件。

[Android.Runtime.Register(".ctor", "()V", "")]
public Notification();
屬性

備註

以預設值建構一個通知物件。 你應該改用 Builder。

Android 參考資料。android.app.Notification.Notification

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於

Notification(Parcel)

解除包裹通知的扁平化。

[Android.Runtime.Register(".ctor", "(Landroid/os/Parcel;)V", "")]
public Notification(Android.OS.Parcel? parcel);
[<Android.Runtime.Register(".ctor", "(Landroid/os/Parcel;)V", "")>]
new Android.App.Notification : Android.OS.Parcel -> Android.App.Notification

參數

parcel
Parcel

包裹

屬性

備註

解除包裹通知的扁平化。

Android 參考資料。android.app.Notification.Notification

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於

Notification(Int32, ICharSequence)

建立 Notification 一個物件,具備狀態列圖示所需的資訊,但不使用標準的展開視圖。

public Notification(int icon, Java.Lang.ICharSequence tickerText);
new Android.App.Notification : int * Java.Lang.ICharSequence -> Android.App.Notification

參數

icon
Int32
tickerText
ICharSequence

備註

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於

Notification(Int32, String)

建立 Notification 一個物件,具備狀態列圖示所需的資訊,但不使用標準的展開視圖。

public Notification(int icon, string tickerText);
new Android.App.Notification : int * string -> Android.App.Notification

參數

icon
Int32
tickerText
String

備註

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於

Notification(IntPtr, JniHandleOwnership)

初始化現有 Java 原生介面物件的受管理表示。

protected Notification(IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Android.App.Notification : nativeint * Android.Runtime.JniHandleOwnership -> Android.App.Notification

參數

javaReference
IntPtr

nativeint

Java 原生介面物件參考。

transfer
JniHandleOwnership

所有權轉移應用於 Java 原生介面物件參考。

備註

當 .NET 為 Android 綁定執行時建立一個受管理的 Java 物件時,會呼叫這個建構子。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於

Notification(Int32, ICharSequence, Int64)

警告

deprecated

此構造器已被棄用。

[Android.Runtime.Register(".ctor", "(ILjava/lang/CharSequence;J)V", "")]
[System.Obsolete("deprecated")]
public Notification(int icon, Java.Lang.ICharSequence? tickerText, long when);
[<Android.Runtime.Register(".ctor", "(ILjava/lang/CharSequence;J)V", "")>]
[<System.Obsolete("deprecated")>]
new Android.App.Notification : int * Java.Lang.ICharSequence * int64 -> Android.App.Notification

參數

icon
Int32

int:要放在狀態列的圖示資源 ID

tickerText
ICharSequence

CharSequence:通知首次啟動時,狀態列中流過的文字

when
Int64

long:在 System.currentTimeMillis 時間基底中顯示的時間

屬性

備註

此構造器已被棄用。 還是用建構者吧。

建構一個通知物件,包含在沒有標準展開視圖的情況下,擁有狀態列圖示所需的資訊。

Android 參考資料。android.app.Notification.Notification

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於

Notification(Int32, String, Int64)

此構造器已被棄用。

[Android.Runtime.Register(".ctor", "(ILjava/lang/CharSequence;J)V", "")]
public Notification(int icon, string? tickerText, long when);
[<Android.Runtime.Register(".ctor", "(ILjava/lang/CharSequence;J)V", "")>]
new Android.App.Notification : int * string * int64 -> Android.App.Notification

參數

icon
Int32

int:要放在狀態列的圖示資源 ID

tickerText
String

CharSequence:通知首次啟動時,狀態列中流過的文字

when
Int64

long:在 System.currentTimeMillis 時間基底中顯示的時間

屬性

備註

此構造器已被棄用。 還是用建構者吧。

建構一個通知物件,包含在沒有標準展開視圖的情況下,擁有狀態列圖示所需的資訊。

Android 參考資料。android.app.Notification.Notification

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於