Compartir a través de


Fragment.OnViewCreated(View, Bundle) Method

Definition

Called immediately after #onCreateView(LayoutInflater, ViewGroup, Bundle) has returned, but before any saved state has been restored in to the view.

[Android.Runtime.Register("onViewCreated", "(Landroid/view/View;Landroid/os/Bundle;)V", "GetOnViewCreated_Landroid_view_View_Landroid_os_Bundle_Handler")]
public virtual void OnViewCreated (Android.Views.View? view, Android.OS.Bundle? savedInstanceState);
[<Android.Runtime.Register("onViewCreated", "(Landroid/view/View;Landroid/os/Bundle;)V", "GetOnViewCreated_Landroid_view_View_Landroid_os_Bundle_Handler")>]
abstract member OnViewCreated : Android.Views.View * Android.OS.Bundle -> unit
override this.OnViewCreated : Android.Views.View * Android.OS.Bundle -> unit

Parameters

view
View

The View returned by #onCreateView(LayoutInflater, ViewGroup, Bundle).

savedInstanceState
Bundle

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

Attributes

Remarks

Called immediately after #onCreateView(LayoutInflater, ViewGroup, Bundle) has returned, but before any saved state has been restored in to the view. This gives subclasses a chance to initialize themselves once they know their view hierarchy has been completely created. The fragment's view hierarchy is not however attached to its parent at this point.

Java documentation for android.app.Fragment.onViewCreated(android.view.View, 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