Notification 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
| 名称 | 说明 |
|---|---|
| Notification() |
构造具有默认值的 Notification 对象。 |
| Notification(Parcel) |
取消包裹中的通知。 |
| Notification(Int32, ICharSequence) |
|
| Notification(Int32, String) |
|
| Notification(IntPtr, JniHandleOwnership) |
初始化现有 Java Native Interface 对象的托管表示形式。 |
| Notification(Int32, ICharSequence, Int64) |
已过时.
此构造函数已弃用。 |
| Notification(Int32, String, Int64) |
此构造函数已弃用。 |
Notification()
构造具有默认值的 Notification 对象。
[Android.Runtime.Register(".ctor", "()V", "")]
public Notification();
- 特性
注解
构造具有默认值的 Notification 对象。 应改用 Builder。
Android 参考。android.app.Notification.Notification
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。
适用于
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
Parcel
- 特性
注解
取消包裹中的通知。
Android 参考。android.app.Notification.Notification
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。
适用于
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
注解
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。
适用于
Notification(IntPtr, JniHandleOwnership)
初始化现有 Java Native Interface 对象的托管表示形式。
protected Notification(IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Android.App.Notification : nativeint * Android.Runtime.JniHandleOwnership -> Android.App.Notification
参数
- javaReference
-
IntPtr
nativeint
Java Native Interface 对象引用。
- transfer
- JniHandleOwnership
要应用于 Java Native Interface 对象引用的所有权转让。
注解
当为现有Java对象创建托管对等时,此构造函数由 Android 绑定运行时的 .NET 调用。
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。
适用于
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 时间库中显示的时间
- 特性
注解
此构造函数已弃用。 请改用 Builder。
构造一个通知对象,其中包含在没有标准展开视图的情况下具有状态栏图标所需的信息。
Android 参考。android.app.Notification.Notification
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。
适用于
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 时间库中显示的时间
- 特性
注解
此构造函数已弃用。 请改用 Builder。
构造一个通知对象,其中包含在没有标准展开视图的情况下具有状态栏图标所需的信息。
Android 参考。android.app.Notification.Notification
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。