다음을 통해 공유


Activity.OnAttachFragment(Fragment) Method

Definition

Called when a Fragment is being attached to this activity, immediately after the call to its Fragment#onAttach Fragment.onAttach() method and before Fragment#onCreate Fragment.onCreate().

[Android.Runtime.Register("onAttachFragment", "(Landroid/app/Fragment;)V", "GetOnAttachFragment_Landroid_app_Fragment_Handler")]
public virtual void OnAttachFragment (Android.App.Fragment? fragment);
[<Android.Runtime.Register("onAttachFragment", "(Landroid/app/Fragment;)V", "GetOnAttachFragment_Landroid_app_Fragment_Handler")>]
abstract member OnAttachFragment : Android.App.Fragment -> unit
override this.OnAttachFragment : Android.App.Fragment -> unit

Parameters

fragment
Fragment
Attributes

Remarks

Called when a Fragment is being attached to this activity, immediately after the call to its Fragment#onAttach Fragment.onAttach() method and before Fragment#onCreate Fragment.onCreate().

This member is deprecated. Use androidx.fragment.app.FragmentActivity#onAttachFragment(androidx.fragment.app.Fragment)

Java documentation for android.app.Activity.onAttachFragment(android.app.Fragment).

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