语言

Activity.OnCreateView 方法

定义

重载

名称 说明
OnCreateView(View, String, Context, IAttributeSet)

标准实现 android.view.LayoutInflater.Factory2#onCreateView(View, String, Context, AttributeSet) 与 LayoutInflater 返回的 LayoutInflater 一起膨胀时使用 #getSystemService

OnCreateView(String, Context, IAttributeSet)

与 LayoutInflater 返回的 android.view.LayoutInflater.Factory#onCreateViewLayoutInflater 一起膨胀时所使用的标准实现#getSystemService

OnCreateView(View, String, Context, IAttributeSet)

标准实现 android.view.LayoutInflater.Factory2#onCreateView(View, String, Context, AttributeSet) 与 LayoutInflater 返回的 LayoutInflater 一起膨胀时使用 #getSystemService

[Android.Runtime.Register("onCreateView", "(Landroid/view/View;Ljava/lang/String;Landroid/content/Context;Landroid/util/AttributeSet;)Landroid/view/View;", "GetOnCreateView_Landroid_view_View_Ljava_lang_String_Landroid_content_Context_Landroid_util_AttributeSet_Handler")]
public virtual Android.Views.View? OnCreateView(Android.Views.View? parent, string name, Android.Content.Context context, Android.Util.IAttributeSet attrs);
[<Android.Runtime.Register("onCreateView", "(Landroid/view/View;Ljava/lang/String;Landroid/content/Context;Landroid/util/AttributeSet;)Landroid/view/View;", "GetOnCreateView_Landroid_view_View_Ljava_lang_String_Landroid_content_Context_Landroid_util_AttributeSet_Handler")>]
abstract member OnCreateView : Android.Views.View * string * Android.Content.Context * Android.Util.IAttributeSet -> Android.Views.View
override this.OnCreateView : Android.Views.View * string * Android.Content.Context * Android.Util.IAttributeSet -> Android.Views.View

参数

parent
View

视图:此值可能为 null。

name
String

字符串:此值不能为 null。

context
Context

上下文:此值不能为 null。

attrs
IAttributeSet

AttributeSet:此值不能为 null。

返回

此值可能为 null。

实现

属性

注解

android.view.LayoutInflater.Factory2.onCreateView(View,String,Context,AttributeSet)在与 Context.getSystemService(类返回的 LayoutInflater 一起膨胀时使用)的标准实现。 此实现处理标记以在活动内嵌入片段。

另请参阅:

Android 参考。android.app.Activity.onCreateView

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

适用于

OnCreateView(String, Context, IAttributeSet)

与 LayoutInflater 返回的 android.view.LayoutInflater.Factory#onCreateViewLayoutInflater 一起膨胀时所使用的标准实现#getSystemService

[Android.Runtime.Register("onCreateView", "(Ljava/lang/String;Landroid/content/Context;Landroid/util/AttributeSet;)Landroid/view/View;", "GetOnCreateView_Ljava_lang_String_Landroid_content_Context_Landroid_util_AttributeSet_Handler")]
public virtual Android.Views.View? OnCreateView(string name, Android.Content.Context context, Android.Util.IAttributeSet attrs);
[<Android.Runtime.Register("onCreateView", "(Ljava/lang/String;Landroid/content/Context;Landroid/util/AttributeSet;)Landroid/view/View;", "GetOnCreateView_Ljava_lang_String_Landroid_content_Context_Landroid_util_AttributeSet_Handler")>]
abstract member OnCreateView : string * Android.Content.Context * Android.Util.IAttributeSet -> Android.Views.View
override this.OnCreateView : string * Android.Content.Context * Android.Util.IAttributeSet -> Android.Views.View

参数

name
String

字符串:此值不能为 null。

context
Context

上下文:此值不能为 null。

attrs
IAttributeSet

AttributeSet:此值不能为 null。

返回

此值可能为 null。

实现

属性

注解

LayoutInflater.Factory.onCreateView(String, Context, AttributeSet) 的标准实现,与 Context.getSystemService(类返回的 LayoutInflater 一起膨胀时使用)。 此实现不执行任何操作,适用于预Build.VERSION_CODES。HONEYCOMB 应用。 较新的应用应使用 onCreateView(视图、字符串、上下文、AttributeSet)。

另请参阅:

Android 参考。android.app.Activity.onCreateView

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

适用于