Notification.Builder.SetSmallIcon 方法

定义

重载

SetSmallIcon(Int32, Int32)

为指定级别设置小图标资源。

SetSmallIcon(Icon)
SetSmallIcon(Int32)

设置小图标资源,该资源将用于表示状态栏中的通知。

SetSmallIcon(Int32, Int32)

为指定级别设置小图标资源。

[Android.Runtime.Register("setSmallIcon", "(II)Landroid/app/Notification$Builder;", "GetSetSmallIcon_IIHandler")]
public virtual Android.App.Notification.Builder SetSmallIcon (int icon, int level);
[<Android.Runtime.Register("setSmallIcon", "(II)Landroid/app/Notification$Builder;", "GetSetSmallIcon_IIHandler")>]
abstract member SetSmallIcon : int * int -> Android.App.Notification.Builder
override this.SetSmallIcon : int * int -> Android.App.Notification.Builder

参数

icon
Int32

应用程序包中要使用的可绘制资源 ID。

level
Int32

要用于图标的图像级别。

返回

属性

注解

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

另请参阅

适用于

SetSmallIcon(Icon)

[Android.Runtime.Register("setSmallIcon", "(Landroid/graphics/drawable/Icon;)Landroid/app/Notification$Builder;", "GetSetSmallIcon_Landroid_graphics_drawable_Icon_Handler", ApiSince=23)]
public virtual Android.App.Notification.Builder SetSmallIcon (Android.Graphics.Drawables.Icon? icon);
[<Android.Runtime.Register("setSmallIcon", "(Landroid/graphics/drawable/Icon;)Landroid/app/Notification$Builder;", "GetSetSmallIcon_Landroid_graphics_drawable_Icon_Handler", ApiSince=23)>]
abstract member SetSmallIcon : Android.Graphics.Drawables.Icon -> Android.App.Notification.Builder
override this.SetSmallIcon : Android.Graphics.Drawables.Icon -> Android.App.Notification.Builder

参数

icon
Icon

返回

属性

注解

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

适用于

SetSmallIcon(Int32)

设置小图标资源,该资源将用于表示状态栏中的通知。

[Android.Runtime.Register("setSmallIcon", "(I)Landroid/app/Notification$Builder;", "GetSetSmallIcon_IHandler")]
public virtual Android.App.Notification.Builder SetSmallIcon (int icon);
[<Android.Runtime.Register("setSmallIcon", "(I)Landroid/app/Notification$Builder;", "GetSetSmallIcon_IHandler")>]
abstract member SetSmallIcon : int -> Android.App.Notification.Builder
override this.SetSmallIcon : int -> Android.App.Notification.Builder

参数

icon
Int32

应用程序包中要使用的可绘制资源 ID。

返回

属性

注解

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

另请参阅

适用于