語言

LayoutInflater 建構函式

定義

多載

名稱 Description
LayoutInflater(Context)

建立一個新的 LayoutInflater 實例,與特定上下文相關聯。

LayoutInflater(LayoutInflater, Context)

建立一個新的 LayoutInflater 實例,該實例是現有 LayoutInflater 的複製品,並可選擇更改其上下文。

LayoutInflater(IntPtr, JniHandleOwnership)

用於建立 JNI 物件受管理表示的建構器;由執行時呼叫。

LayoutInflater(Context)

建立一個新的 LayoutInflater 實例,與特定上下文相關聯。

[Android.Runtime.Register(".ctor", "(Landroid/content/Context;)V", "")]
protected LayoutInflater(Android.Content.Context? context);
[<Android.Runtime.Register(".ctor", "(Landroid/content/Context;)V", "")>]
new Android.Views.LayoutInflater : Android.Content.Context -> Android.Views.LayoutInflater

參數

context
Context

LayoutInflater 將建立其檢視的上下文;最重要的是,這提供了主題,從中取得屬性的預設值。

屬性

備註

建立一個新的 LayoutInflater 實例,與特定上下文相關聯。 應用程式幾乎總是會想要使用 來 Context#getSystemService Context.getSystemService() 取得標準 Context#LAYOUT_INFLATER_SERVICE Context.INFLATER_SERVICE。

的 android.view.LayoutInflater.LayoutInflater(android.content.Context)Java 檔。

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

適用於

LayoutInflater(LayoutInflater, Context)

建立一個新的 LayoutInflater 實例,該實例是現有 LayoutInflater 的複製品,並可選擇更改其上下文。

[Android.Runtime.Register(".ctor", "(Landroid/view/LayoutInflater;Landroid/content/Context;)V", "")]
protected LayoutInflater(Android.Views.LayoutInflater? original, Android.Content.Context? newContext);
[<Android.Runtime.Register(".ctor", "(Landroid/view/LayoutInflater;Landroid/content/Context;)V", "")>]
new Android.Views.LayoutInflater : Android.Views.LayoutInflater * Android.Content.Context -> Android.Views.LayoutInflater

參數

original
LayoutInflater

複製原版 LayoutInflater 的版本。

newContext
Context

新的情境。

屬性

備註

建立一個新的 LayoutInflater 實例,該實例是現有 LayoutInflater 的複製品,並可選擇更改其上下文。 用於實作 #cloneInContext。

的 android.view.LayoutInflater.LayoutInflater(android.view.LayoutInflater, android.content.Context)Java 檔。

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

適用於

LayoutInflater(IntPtr, JniHandleOwnership)

用於建立 JNI 物件受管理表示的建構器;由執行時呼叫。

protected LayoutInflater(IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Android.Views.LayoutInflater : nativeint * Android.Runtime.JniHandleOwnership -> Android.Views.LayoutInflater

參數

javaReference
IntPtr

nativeint

IntPtrA 包含一個 Java 原生介面(JNI)物件參考。

transfer
JniHandleOwnership

JniHandleOwnershipA 指示如何處理javaReference

備註

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

適用於