語言

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)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於