语言

MockPackageManager.GetDrawable(String, Int32, ApplicationInfo) 方法

定义

从包中检索映像。

[Android.Runtime.Register("getDrawable", "(Ljava/lang/String;ILandroid/content/pm/ApplicationInfo;)Landroid/graphics/drawable/Drawable;", "GetGetDrawable_Ljava_lang_String_ILandroid_content_pm_ApplicationInfo_Handler")]
public override Android.Graphics.Drawables.Drawable? GetDrawable(string? packageName, int resid, Android.Content.PM.ApplicationInfo? appInfo);
[<Android.Runtime.Register("getDrawable", "(Ljava/lang/String;ILandroid/content/pm/ApplicationInfo;)Landroid/graphics/drawable/Drawable;", "GetGetDrawable_Ljava_lang_String_ILandroid_content_pm_ApplicationInfo_Handler")>]
override this.GetDrawable : string * int * Android.Content.PM.ApplicationInfo -> Android.Graphics.Drawables.Drawable

参数

packageName
String

此图标来自的包的名称。 不能为 null。

resid
Int32

所需映像的资源标识符。 不能为 0。

appInfo
ApplicationInfo

有关 <var>packageName</var> 的总体信息。 这可能为 null,在这种情况下,将根据需要检索应用程序信息;如果已经有此信息,可以更高效地在此处提供这些信息。

返回

不返回任何值。 默认模拟实现引发 UnsupportedOperationException;重写此方法以提供测试结果。

特性

注解

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

适用于