Fragment.OnActivityCreated(Bundle) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Called after the fragment's activity is created and the fragment's view, if any, is created.
[Android.Runtime.Register("onActivityCreated", "(Landroid/os/Bundle;)V", "GetOnActivityCreated_Landroid_os_Bundle_Handler")]
public virtual void OnActivityCreated(Android.OS.Bundle? savedInstanceState);
[<Android.Runtime.Register("onActivityCreated", "(Landroid/os/Bundle;)V", "GetOnActivityCreated_Landroid_os_Bundle_Handler")>]
abstract member OnActivityCreated : Android.OS.Bundle -> unit
override this.OnActivityCreated : Android.OS.Bundle -> unit
Parameters
- savedInstanceState
- Bundle
If the fragment is being re-created from a previous saved state, this is the state.
- Attributes
Remarks
Called after the fragment's activity is created and the fragment's view, if any, is created. It can be used to do final initialization once these pieces are in place, such as retrieving views or restoring state. It is also useful for fragments that use RetainInstance to retain their instance, as this callback tells the fragment when it is fully associated with the new activity instance. This is called after OnCreateView(LayoutInflater, ViewGroup, Bundle) and, if there is a view, before OnViewStateRestored(Bundle). If you override this method you must call through to the superclass implementation.
Android reference for android.app.Fragment.onActivityCreated.
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.