语言

PackageManager.GetActivityLogo 方法

定义

重载

名称 说明
GetActivityLogo(ComponentName)

检索与活动关联的徽标。

GetActivityLogo(Intent)

检索与意向关联的徽标。

GetActivityLogo(ComponentName)

检索与活动关联的徽标。

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

参数

activityName
ComponentName

要检索其徽标的活动的名称。

返回

如果活动未指定徽标,则返回徽标的图像或 null。

特性

例外

如果无法加载给定活动的资源,则引发。

注解

检索与活动关联的徽标。 给定活动的全名,检索其相关信息并调用 ComponentInfo#loadLogo ComponentInfo.loadLogo() 以返回其徽标。 如果找不到活动,将引发 NameNotFoundException。

Java文档android.content.pm.PackageManager.getActivityLogo(android.content.ComponentName)。

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

另请参阅

适用于

GetActivityLogo(Intent)

检索与意向关联的徽标。

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

参数

intent
Intent

要检索徽标的意向。

返回

返回徽标的图像,如果活动未指定徽标,则返回 null。

特性

例外

如果无法加载与给定意向匹配的应用程序的资源,则引发。

注解

检索与意向关联的徽标。 如果设置了 intent.getClassName(),则只需返回 getActivityLogo(intent.getClassName()的结果。 否则,它将解析意向的组件,并返回与解析的组件关联的徽标。 如果找不到 intent.getClassName(),或者意向无法解析为组件,则会引发 NameNotFoundException。

Java文档android.content.pm.PackageManager.getActivityLogo(android.content.Intent)。

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

另请参阅

适用于