语言

Resources.RegisterResourcePaths(String, ApplicationInfo) 方法

定义

注册包的资源路径(例如共享库)。

[Android.Runtime.Register("registerResourcePaths", "(Ljava/lang/String;Landroid/content/pm/ApplicationInfo;)V", "", ApiSince=35)]
public static void RegisterResourcePaths(string uniqueId, Android.Content.PM.ApplicationInfo appInfo);
[<Android.Runtime.Register("registerResourcePaths", "(Ljava/lang/String;Landroid/content/pm/ApplicationInfo;)V", "", ApiSince=35)>]
static member RegisterResourcePaths : string * Android.Content.PM.ApplicationInfo -> unit

参数

uniqueId
String

ApplicationInfo 对象的唯一 ID,用于检测和忽略重复的 API 调用。

appInfo
ApplicationInfo

包含包的资源路径的 ApplicationInfo。

特性

注解

注册包的资源路径(例如共享库)。 这将从其 ApplicationInfo 收集包资源的路径,并在应用程序运行时将它们添加到所有现有和将来的上下文。 具有相同 uniqueId 的第二次调用是 no-op。 在应用程序重启期间,路径不会持久保存。 如果发生这种情况,应用程序将负责再次调用 API。

Java文档android.content.res.Resources.registerResourcePaths(java.lang.String, android.content.pm.ApplicationInfo)。

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

适用于