PackageManager.GetActivityBanner 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
GetActivityBanner(ComponentName) |
Retrieve the banner associated with an activity. |
GetActivityBanner(Intent) |
Retrieve the banner associated with an Intent. |
GetActivityBanner(ComponentName)
Retrieve the banner associated with an activity.
[Android.Runtime.Register("getActivityBanner", "(Landroid/content/ComponentName;)Landroid/graphics/drawable/Drawable;", "GetGetActivityBanner_Landroid_content_ComponentName_Handler")]
public abstract Android.Graphics.Drawables.Drawable? GetActivityBanner (Android.Content.ComponentName activityName);
[<Android.Runtime.Register("getActivityBanner", "(Landroid/content/ComponentName;)Landroid/graphics/drawable/Drawable;", "GetGetActivityBanner_Landroid_content_ComponentName_Handler")>]
abstract member GetActivityBanner : Android.Content.ComponentName -> Android.Graphics.Drawables.Drawable
Parameters
- activityName
- ComponentName
Name of the activity whose banner is to be retrieved.
Returns
Returns the image of the banner, or null if the activity has no banner specified.
- Attributes
Exceptions
Thrown if the resources for the given activity could not be loaded.
Remarks
Retrieve the banner associated with an activity. Given the full name of an activity, retrieves the information about it and calls ComponentInfo#loadIcon ComponentInfo.loadIcon()
to return its banner. If the activity cannot be found, NameNotFoundException is thrown.
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
GetActivityBanner(Intent)
Retrieve the banner associated with an Intent.
[Android.Runtime.Register("getActivityBanner", "(Landroid/content/Intent;)Landroid/graphics/drawable/Drawable;", "GetGetActivityBanner_Landroid_content_Intent_Handler")]
public abstract Android.Graphics.Drawables.Drawable? GetActivityBanner (Android.Content.Intent intent);
[<Android.Runtime.Register("getActivityBanner", "(Landroid/content/Intent;)Landroid/graphics/drawable/Drawable;", "GetGetActivityBanner_Landroid_content_Intent_Handler")>]
abstract member GetActivityBanner : Android.Content.Intent -> Android.Graphics.Drawables.Drawable
Parameters
- intent
- Intent
The intent for which you would like to retrieve a banner.
Returns
Returns the image of the banner, or null if the activity has no banner specified.
- Attributes
Exceptions
Thrown if the resources for application matching the given intent could not be loaded.
Remarks
Retrieve the banner associated with an Intent. If intent.getClassName() is set, this simply returns the result of getActivityBanner(intent.getClassName()). Otherwise it resolves the intent's component and returns the banner associated with the resolved component. If intent.getClassName() cannot be found or the Intent cannot be resolved to a component, NameNotFoundException is thrown.
Java documentation for android.content.pm.PackageManager.getActivityBanner(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.