Fragment.OnCreateView(LayoutInflater, ViewGroup, Bundle) Method

Definition

Caution

deprecated

Called to have the fragment instantiate its user interface view.

[Android.Runtime.Register("onCreateView", "(Landroid/view/LayoutInflater;Landroid/view/ViewGroup;Landroid/os/Bundle;)Landroid/view/View;", "GetOnCreateView_Landroid_view_LayoutInflater_Landroid_view_ViewGroup_Landroid_os_Bundle_Handler")]
[System.Obsolete("deprecated")]
public virtual Android.Views.View? OnCreateView (Android.Views.LayoutInflater? inflater, Android.Views.ViewGroup? container, Android.OS.Bundle? savedInstanceState);
[<Android.Runtime.Register("onCreateView", "(Landroid/view/LayoutInflater;Landroid/view/ViewGroup;Landroid/os/Bundle;)Landroid/view/View;", "GetOnCreateView_Landroid_view_LayoutInflater_Landroid_view_ViewGroup_Landroid_os_Bundle_Handler")>]
[<System.Obsolete("deprecated")>]
abstract member OnCreateView : Android.Views.LayoutInflater * Android.Views.ViewGroup * Android.OS.Bundle -> Android.Views.View
override this.OnCreateView : Android.Views.LayoutInflater * Android.Views.ViewGroup * Android.OS.Bundle -> Android.Views.View

Parameters

inflater
LayoutInflater

The LayoutInflater object that can be used to inflate any views in the fragment,

container
ViewGroup

If non-null, this is the parent view that the fragment's UI should be attached to. The fragment should not add the view itself, but this can be used to generate the LayoutParams of the view.

savedInstanceState
Bundle

If non-null, this fragment is being re-constructed from a previous saved state as given here.

Returns

View

Return the View for the fragment's UI, or null.

Attributes

Remarks

Java documentation for android.app.Fragment.onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle).

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.

Applies to