Language

PackageManager.GetActivityIcon メソッド

定義

オーバーロード

Name 説明
GetActivityIcon(ComponentName)

アクティビティに関連付けられているアイコンを取得します。

GetActivityIcon(Intent)

意図に関連付けられているアイコンを取得します。

GetActivityIcon(ComponentName)

アクティビティに関連付けられているアイコンを取得します。

[Android.Runtime.Register("getActivityIcon", "(Landroid/content/ComponentName;)Landroid/graphics/drawable/Drawable;", "GetGetActivityIcon_Landroid_content_ComponentName_Handler")]
public abstract Android.Graphics.Drawables.Drawable GetActivityIcon(Android.Content.ComponentName activityName);
[<Android.Runtime.Register("getActivityIcon", "(Landroid/content/ComponentName;)Landroid/graphics/drawable/Drawable;", "GetGetActivityIcon_Landroid_content_ComponentName_Handler")>]
abstract member GetActivityIcon : Android.Content.ComponentName -> Android.Graphics.Drawables.Drawable

パラメーター

activityName
ComponentName

アイコンを取得するアクティビティの名前。

返品

アイコンの画像を返します。見つからなかった場合は既定のアクティビティ アイコンを返します。 null を返しません。

属性

例外

指定されたアクティビティのリソースを読み込めなかった場合にスローされます。

注釈

アクティビティに関連付けられているアイコンを取得します。 アクティビティの完全な名前を指定すると、アクティビティに関する情報を取得し、 ComponentInfo#loadIcon ComponentInfo.loadIcon() を呼び出してアイコンを返します。 アクティビティが見つからない場合は、NameNotFoundException がスローされます。

Javaドキュメント。

このページの一部は、によって作成および共有され、に記載されている条件に従って使用される作業に基づく変更です。

関連項目

適用対象

GetActivityIcon(Intent)

意図に関連付けられているアイコンを取得します。

[Android.Runtime.Register("getActivityIcon", "(Landroid/content/Intent;)Landroid/graphics/drawable/Drawable;", "GetGetActivityIcon_Landroid_content_Intent_Handler")]
public abstract Android.Graphics.Drawables.Drawable GetActivityIcon(Android.Content.Intent intent);
[<Android.Runtime.Register("getActivityIcon", "(Landroid/content/Intent;)Landroid/graphics/drawable/Drawable;", "GetGetActivityIcon_Landroid_content_Intent_Handler")>]
abstract member GetActivityIcon : Android.Content.Intent -> Android.Graphics.Drawables.Drawable

パラメーター

intent
Intent

アイコンを取得する意図。

返品

アイコンの画像を返します。見つからなかった場合は既定のアクティビティ アイコンを返します。 null を返しません。

属性

例外

特定の意図に一致するアプリケーションのリソースを読み込めなかった場合にスローされます。

注釈

意図に関連付けられているアイコンを取得します。 intent.getClassName() が設定されている場合、これは単に getActivityIcon(intent.getClassName()) の結果を返します。 それ以外の場合は、意図のコンポーネントが解決され、解決されたコンポーネントに関連付けられているアイコンが返されます。 intent.getClassName() が見つからないか、意図をコンポーネントに解決できない場合は、NameNotFoundException がスローされます。

Javaドキュメント。

このページの一部は、によって作成および共有され、に記載されている条件に従って使用される作業に基づく変更です。

関連項目

適用対象