Språk

Activity.OnCreateView Method

Definition

Overloads

Name Description
OnCreateView(View, String, Context, IAttributeSet)

Standard implementation of android.view.LayoutInflater.Factory2#onCreateView(View, String, Context, AttributeSet) used when inflating with the LayoutInflater returned by #getSystemService.

OnCreateView(String, Context, IAttributeSet)

Standard implementation of android.view.LayoutInflater.Factory#onCreateView used when inflating with the LayoutInflater returned by #getSystemService.

OnCreateView(View, String, Context, IAttributeSet)

Standard implementation of android.view.LayoutInflater.Factory2#onCreateView(View, String, Context, AttributeSet) used when inflating with the LayoutInflater returned by #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

Parameters

parent
View

The parent in which the created view will be placed. This value may be null.

name
String

The tag name to inflate. This value cannot be null.

context
Context

The context in which the view is created. This value cannot be null.

attrs
IAttributeSet

The inflation attributes specified in the XML file. This value cannot be null.

Returns

This value may be null.

Implements

Attributes

Remarks

Standard implementation of android.view.LayoutInflater.Factory2.onCreateView(View,String,Context,AttributeSet) used when inflating with the LayoutInflater returned by Context.getSystemService(Class). This implementation handles <fragment> tags to embed fragments inside of the activity.

Android reference for android.app.Activity.onCreateView.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

See also

Applies to

OnCreateView(String, Context, IAttributeSet)

Standard implementation of android.view.LayoutInflater.Factory#onCreateView used when inflating with the LayoutInflater returned by #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

Parameters

name
String

The tag name to inflate. This value cannot be null.

context
Context

The context in which the view is created. This value cannot be null.

attrs
IAttributeSet

The inflation attributes specified in the XML file. This value cannot be null.

Returns

This value may be null.

Implements

Attributes

Remarks

Standard implementation of LayoutInflater.Factory.onCreateView(String, Context, AttributeSet) used when inflating with the LayoutInflater returned by Context.getSystemService(Class). This implementation does nothing and is for pre-Build.VERSION_CODES.HONEYCOMB apps. Newer apps should use onCreateView(View,String,Context,AttributeSet).

Android reference for android.app.Activity.onCreateView.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

See also

Applies to