PackageManager.GetResourcesForActivity(ComponentName) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
检索与活动关联的资源。
[Android.Runtime.Register("getResourcesForActivity", "(Landroid/content/ComponentName;)Landroid/content/res/Resources;", "GetGetResourcesForActivity_Landroid_content_ComponentName_Handler")]
public abstract Android.Content.Res.Resources GetResourcesForActivity(Android.Content.ComponentName activityName);
[<Android.Runtime.Register("getResourcesForActivity", "(Landroid/content/ComponentName;)Landroid/content/res/Resources;", "GetGetResourcesForActivity_Landroid_content_ComponentName_Handler")>]
abstract member GetResourcesForActivity : Android.Content.ComponentName -> Android.Content.Res.Resources
参数
- activityName
- ComponentName
要检索其资源的活动的名称。
返回
返回应用程序的资源。
- 特性
例外
如果无法加载给定应用程序的资源,则引发。
注解
检索与活动关联的资源。 给定活动的全名,检索其相关信息,并调用 getResources()以返回其应用程序的资源。 如果找不到活动,将引发 NameNotFoundException。
Java文档android.content.pm.PackageManager.getResourcesForActivity(android.content.ComponentName)。
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。