ShortcutInfo.Builder.SetIcon(Icon) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
設定一個捷徑圖示。
[Android.Runtime.Register("setIcon", "(Landroid/graphics/drawable/Icon;)Landroid/content/pm/ShortcutInfo$Builder;", "GetSetIcon_Landroid_graphics_drawable_Icon_Handler", ApiSince=25)]
public virtual Android.Content.PM.ShortcutInfo.Builder SetIcon(Android.Graphics.Drawables.Icon? icon);
[<Android.Runtime.Register("setIcon", "(Landroid/graphics/drawable/Icon;)Landroid/content/pm/ShortcutInfo$Builder;", "GetSetIcon_Landroid_graphics_drawable_Icon_Handler", ApiSince=25)>]
abstract member SetIcon : Android.Graphics.Drawables.Icon -> Android.Content.PM.ShortcutInfo.Builder
override this.SetIcon : Android.Graphics.Drawables.Icon -> Android.Content.PM.ShortcutInfo.Builder
參數
- icon
- Icon
傳回
- 屬性
備註
設定一個捷徑圖示。 ShortcutManager 或 LauncherApps 回傳的 ShortcutInfo 實例中無法使用圖示。 預設啟動器應用程式可以使用 LauncherApps.getShortcutIconDrawable(ShortcutInfo,int)或 LauncherApps.getShortcutBadgedIconDrawable(ShortcutInfo,int)來取得捷徑圖示。 使用 Icon.setTint 或 Icon.setTintList 設定的色調不被支援,將被忽略。 僅支援使用 Icon.createWithBitmap(Bitmap)、Icon.createWithAdaptiveBitmap(Bitmap) 及 Icon.createWithResource 所建立的圖示。 其他類型,如基於 URI 的圖示,則不被支援。
Android 參考資料。android.content.pm.ShortcutInfo.Builder.setIcon
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。