PackageManager.GetActivityIcon Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| GetActivityIcon(ComponentName) |
Retrieve the icon associated with an activity. |
| GetActivityIcon(Intent) |
Retrieve the icon associated with an Intent. |
GetActivityIcon(ComponentName)
Retrieve the icon associated with an activity.
[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
Parameters
- activityName
- ComponentName
Name of the activity whose icon is to be retrieved.
Returns
Returns the image of the icon, or the default activity icon if it could not be found. Does not return null.
- Attributes
Exceptions
Thrown if the resources for the given activity could not be loaded.
Remarks
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
See also
Applies to
GetActivityIcon(Intent)
Retrieve the icon associated with an 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
Parameters
- intent
- Intent
The intent for which you would like to retrieve an icon.
Returns
Returns the image of the icon, or the default activity icon if it could not be found. Does not return null.
- Attributes
Exceptions
Thrown if the resources for application matching the given intent could not be loaded.
Remarks
Java documentation for android.content.pm.PackageManager.getActivityIcon(android.content.Intent).
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.