PackageManager.GetResourcesForActivity(ComponentName) 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.
Retrieve the resources associated with an activity.
[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
Parameters
- activityName
- ComponentName
Name of the activity whose resources are to be retrieved.
Returns
Returns the application's Resources.
- Attributes
Exceptions
Thrown if the resources for the given application could not be loaded.
Remarks
Retrieve the resources associated with an activity. Given the full name of an activity, retrieves the information about it and calls getResources() to return its application's resources. 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.