語言

Fragment.OnViewCreated(View, Bundle) 方法

定義

在 Calling 立即回來後 #onCreateView(LayoutInflater, ViewGroup, Bundle) ,但尚未恢復任何儲存狀態進入檢視。

[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

參數

view
View

《觀點報》回覆。#onCreateView(LayoutInflater, ViewGroup, Bundle)

savedInstanceState
Bundle

若非空,該片段將從先前儲存的狀態重建,如此所示。

屬性

備註

在 onCreateView(LayoutInflater, ViewGroup, Bundle) 返回後立即呼叫,但尚未將任何儲存狀態還原到檢視中。 這讓子類別在確定視圖階層完全建立後,有機會初始化自己。 然而,片段的視圖階層此時並未與其父節點連結。

Android 參考資料。android.app.Fragment.onViewCreated

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於