LauncherApps.GetShortcutIconDrawable(ShortcutInfo, Int32) メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
プロファイルを悪くすることなく、このショートカットのアイコンを返します。
[Android.Runtime.Register("getShortcutIconDrawable", "(Landroid/content/pm/ShortcutInfo;I)Landroid/graphics/drawable/Drawable;", "GetGetShortcutIconDrawable_Landroid_content_pm_ShortcutInfo_IHandler", ApiSince=25)]
public virtual Android.Graphics.Drawables.Drawable? GetShortcutIconDrawable (Android.Content.PM.ShortcutInfo shortcut, int density);
[<Android.Runtime.Register("getShortcutIconDrawable", "(Landroid/content/pm/ShortcutInfo;I)Landroid/graphics/drawable/Drawable;", "GetGetShortcutIconDrawable_Landroid_content_pm_ShortcutInfo_IHandler", ApiSince=25)>]
abstract member GetShortcutIconDrawable : Android.Content.PM.ShortcutInfo * int -> Android.Graphics.Drawables.Drawable
override this.GetShortcutIconDrawable : Android.Content.PM.ShortcutInfo * int -> Android.Graphics.Drawables.Drawable
パラメーター
- shortcut
- ShortcutInfo
- density
- Int32
アイコンの優先密度。既定の密度の場合は 0 です。 から密度 DPI 値 DisplayMetrics
を使用します。
戻り値
ショートカットに関連付けられている描画可能な値。
- 属性
注釈
プロファイルを悪くすることなく、このショートカットのアイコンを返します。
呼び出し元のランチャー アプリケーションは、で定義 #hasShortcutHostPermission()
されているように、ショートカット情報へのアクセスを許可する必要があります。
このページの一部は、Android オープンソース プロジェクトによって作成および共有され、クリエイティブ コモンズ 2.5 属性ライセンスに記載されている条件に従って使用される作業に基づく変更です。