Sdílet prostřednictvím


Activity.OnCreateView Method

Definition

Overloads

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.

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

Tag name to be inflated.

context
Context

The context the view is being created in.

attrs
IAttributeSet

Inflation attributes as specified in XML file.

Returns

Implements

Attributes

Remarks

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

Java documentation for android.app.Activity.onCreateView(java.lang.String, android.content.Context, android.util.AttributeSet).

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

  • <xref:Android.Views.LayoutInflater.CreateView(System.String%2c+System.String%2c+System.String)>
  • LayoutInflater

Applies to

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 that the created view will be placed in; note that this may be null.

name
String

Tag name to be inflated.

context
Context

The context the view is being created in.

attrs
IAttributeSet

Inflation attributes as specified in XML file.

Returns

Implements

Attributes

Remarks

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

Java documentation for android.app.Activity.onCreateView(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet).

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

  • <xref:Android.Views.LayoutInflater.CreateView(System.String%2c+System.String%2c+System.String)>
  • LayoutInflater

Applies to