Google 致力于为黑人社区推动种族平等。查看具体举措

FragmentOnAttachListener

public interface FragmentOnAttachListener

androidx.fragment.app.FragmentOnAttachListener


Listener for receiving a callback immediately following Fragment.onAttach(Context). This can be used to perform any additional setup / provide any dependencies that the Fragment may need prior to child fragments being attached or the Fragment going through Fragment.onCreate(Bundle).

Summary

Public methods

abstract void onAttachFragment(FragmentManager fragmentManager, Fragment fragment)

Called after the fragment has been attached to its host.

Public methods

onAttachFragment

public abstract void onAttachFragment (FragmentManager fragmentManager, 
                Fragment fragment)

Called after the fragment has been attached to its host. This is called immediately after Fragment.onAttach(Context) and before Fragment.onAttach(Context) has been called on any child fragments.

Parameters
fragmentManager FragmentManager: FragmentManager the fragment is now attached to. This will be the same FragmentManager that is returned by Fragment.getParentFragmentManager().

fragment Fragment: Fragment that just received a callback to Fragment.onAttach(Context)