語言

Notification.Builder.SetSmallIcon 方法

定義

多載

名稱 Description
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

圖示:一個可使用的圖示物件

傳回

這個 Android.App.Notification.Builder 實例,允許通話串接。

屬性

備註

設定小圖示,該圖示將代表狀態列中的通知。

另請參閱:

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

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

適用於

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

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

適用於

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

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

適用於