Resources 建構函式

定義

多載

Resources(IntPtr, JniHandleOwnership)

建立 JNI 物件的 Managed 表示法時使用的建構函式;由運行時間呼叫。

Resources(AssetManager, DisplayMetrics, Configuration)

在 AssetManager 中現有資產集之上建立新的 Resources 物件。

Resources(IntPtr, JniHandleOwnership)

建立 JNI 物件的 Managed 表示法時使用的建構函式;由運行時間呼叫。

protected Resources (IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Android.Content.Res.Resources : nativeint * Android.Runtime.JniHandleOwnership -> Android.Content.Res.Resources

參數

javaReference
IntPtr

nativeint

IntPtr,包含 Java Native Interface (JNI) 對象參考。

transfer
JniHandleOwnership

JniHandleOwnership,指出如何處理javaReference

備註

此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。

適用於

Resources(AssetManager, DisplayMetrics, Configuration)

在 AssetManager 中現有資產集之上建立新的 Resources 物件。

[Android.Runtime.Register(".ctor", "(Landroid/content/res/AssetManager;Landroid/util/DisplayMetrics;Landroid/content/res/Configuration;)V", "")]
public Resources (Android.Content.Res.AssetManager? assets, Android.Util.DisplayMetrics? metrics, Android.Content.Res.Configuration? config);
[<Android.Runtime.Register(".ctor", "(Landroid/content/res/AssetManager;Landroid/util/DisplayMetrics;Landroid/content/res/Configuration;)V", "")>]
new Android.Content.Res.Resources : Android.Content.Res.AssetManager * Android.Util.DisplayMetrics * Android.Content.Res.Configuration -> Android.Content.Res.Resources

參數

assets
AssetManager

先前建立的 AssetManager。

metrics
DisplayMetrics

選取/計算資源值時要考慮的目前顯示計量。

config
Configuration

選取/計算資源值時要考慮的所需裝置組態(選擇性)。

屬性

備註

在 AssetManager 中現有資產集之上建立新的 Resources 物件。

已取代這個成員。 應用程式不應該建構資源。 請參閱 android.content.Context#createConfigurationContext(Configuration)

android.content.res.Resources.Resources(android.content.res.AssetManager, android.util.DisplayMetrics, android.content.res.Configuration)Java 檔。

此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。

適用於