Notification 构造函数

定义

重载

Notification()

构造具有默认值的 Notification 对象。

Notification(Parcel)

取消包裹中的通知。

Notification(Int32, ICharSequence)

Notification使用没有标准展开视图的状态栏图标所需的信息构造对象。

Notification(Int32, String)

Notification使用没有标准展开视图的状态栏图标所需的信息构造对象。

Notification(IntPtr, JniHandleOwnership)

创建 JNI 对象的托管表示形式时使用的构造函数;由运行时调用。

Notification(Int32, ICharSequence, Int64)
已过时.

构造一个通知对象,其中包含在没有标准展开视图的情况下具有状态栏图标所需的信息。

Notification(Int32, String, Int64)

构造一个通知对象,其中包含在没有标准展开视图的情况下具有状态栏图标所需的信息。

Notification()

构造具有默认值的 Notification 对象。

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

注解

构造具有默认值的 Notification 对象。 你可能想要考虑改用 Builder

适用于 . 的 android.app.Notification.Notification()Java 文档

本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。

适用于

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.app.Notification.Notification(android.os.Parcel)Java 文档

本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。

适用于

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

要放入状态栏中的图标的资源 ID。

tickerText
ICharSequence

通知首次激活时,在状态栏中流动的文本。

注解

本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。

适用于

Notification(Int32, String)

Notification使用没有标准展开视图的状态栏图标所需的信息构造对象。

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

参数

icon
Int32

要放入状态栏中的图标的资源 ID。

tickerText
String

通知首次激活时,在状态栏中流动的文本。

注解

本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。

适用于

Notification(IntPtr, JniHandleOwnership)

创建 JNI 对象的托管表示形式时使用的构造函数;由运行时调用。

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

参数

javaReference
IntPtr

nativeint

IntPtr一个包含 Java 本机接口 (JNI) 对象引用。

transfer
JniHandleOwnership

指示 JniHandleOwnership如何处理 javaReference

注解

本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。

适用于

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

要放入状态栏中的图标的资源 ID。

tickerText
ICharSequence

通知首次激活时,在状态栏中流动的文本。

when
Int64

在时间字段中显示的时间。 在 System.currentTimeMillis 时间库中。

属性

注解

构造一个通知对象,其中包含在没有标准展开视图的情况下具有状态栏图标所需的信息。

此成员已弃用。 请改用 Builder

适用于 . 的 android.app.Notification.Notification(int, java.lang.CharSequence, long)Java 文档

本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。

适用于

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

要放入状态栏中的图标的资源 ID。

tickerText
String

通知首次激活时,在状态栏中流动的文本。

when
Int64

在时间字段中的时间, System.currentTimeMillis 在时间库中显示的时间。

属性

注解

本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。

适用于