LayoutInflater 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
| 名称 | 说明 |
|---|---|
| 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 开放源代码项目创建和共享的工作进行的修改,并根据 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
参数
- transfer
- JniHandleOwnership
指示 JniHandleOwnership如何处理 javaReference
注解
本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。