语言

Notification.Builder.SetSmallIcon 方法

定义

重载

名称 说明
SetSmallIcon(Icon)

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

SetSmallIcon(Int32)

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

SetSmallIcon(Int32, Int32)

setSmallIcon(int)的变体,在图标为 LevelListDrawable 时采用其他级别参数。

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

图标:要使用的 Icon 对象

返回

此 Android.App.Notification.Builder 实例允许链接调用。

特性

注解

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

Android 参考。android.app.Notification.Builder.setSmallIcon

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于

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

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

返回

此 Android.App.Notification.Builder 实例允许链接调用。

特性

注解

设置小图标资源,该资源将用于表示状态栏中的通知。 展开视图的平台模板将在左侧绘制此图标,除非还指定了大型图标,在这种情况下,小图标将移动到右侧。

Android 参考。android.app.Notification.Builder.setSmallIcon

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

另请参阅

适用于

SetSmallIcon(Int32, Int32)

setSmallIcon(int)的变体,在图标为 LevelListDrawable 时采用其他级别参数。

[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

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

level
Int32

int:用于图标的级别

返回

此 Android.App.Notification.Builder 实例允许链接调用。

特性

注解

setSmallIcon(int)的变体,在图标为 LevelListDrawable 时采用其他级别参数。

Android 参考。android.app.Notification.Builder.setSmallIcon

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

另请参阅

适用于