다음을 통해 공유


FragmentManager.FragmentLifecycleCallbacks.OnFragmentPreAttached Method

Definition

Called right before the fragment's Fragment#onAttach(Context) method is called.

[Android.Runtime.Register("onFragmentPreAttached", "(Landroid/app/FragmentManager;Landroid/app/Fragment;Landroid/content/Context;)V", "GetOnFragmentPreAttached_Landroid_app_FragmentManager_Landroid_app_Fragment_Landroid_content_Context_Handler", ApiSince=26)]
public virtual void OnFragmentPreAttached (Android.App.FragmentManager fm, Android.App.Fragment f, Android.Content.Context context);
[<Android.Runtime.Register("onFragmentPreAttached", "(Landroid/app/FragmentManager;Landroid/app/Fragment;Landroid/content/Context;)V", "GetOnFragmentPreAttached_Landroid_app_FragmentManager_Landroid_app_Fragment_Landroid_content_Context_Handler", ApiSince=26)>]
abstract member OnFragmentPreAttached : Android.App.FragmentManager * Android.App.Fragment * Android.Content.Context -> unit
override this.OnFragmentPreAttached : Android.App.FragmentManager * Android.App.Fragment * Android.Content.Context -> unit

Parameters

fm
FragmentManager

Host FragmentManager

f
Fragment

Fragment changing state

context
Context

Context that the Fragment is being attached to

Attributes

Remarks

Called right before the fragment's Fragment#onAttach(Context) method is called. This is a good time to inject any required dependencies for the fragment before any of the fragment's lifecycle methods are invoked.

Java documentation for android.app.FragmentManager.FragmentLifecycleCallbacks.onFragmentPreAttached(android.app.FragmentManager, android.app.Fragment, android.content.Context).

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