次の方法で共有


LauncherApps.GetShortcutIconDrawable(ShortcutInfo, Int32) メソッド

定義

プロファイルを悪くすることなく、このショートカットのアイコンを返します。

[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()されているように、ショートカット情報へのアクセスを許可する必要があります。

の Java ドキュメントandroid.content.pm.LauncherApps.getShortcutIconDrawable(android.content.pm.ShortcutInfo, int)

このページの一部は、Android オープンソース プロジェクトによって作成および共有され、クリエイティブ コモンズ 2.5 属性ライセンスに記載されている条件に従って使用される作業に基づく変更です。

適用対象