Activity.OnAttachFragment(Fragment) Method

Definition

This method was deprecated in API level 28.

[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

Fragment

Attributes

Remarks

This method was deprecated in API level 28. Use FragmentActivity.onAttachFragment(androidx.fragment.app.Fragment)

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

Android reference for android.app.Activity.onAttachFragment.

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