FragmentOnAttachListener
interface FragmentOnAttachListener
Listener for receiving a callback immediately following onAttach. 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 onCreate.
| See also | |
|---|---|
addFragmentOnAttachListener |
Summary
Public functions |
|
|---|---|
Unit |
@MainThreadCalled after the fragment has been attached to its host. |
Public functions
onAttachFragment
@MainThread
fun onAttachFragment(fragmentManager: FragmentManager, fragment: Fragment): Unit
Called after the fragment has been attached to its host. This is called immediately after onAttach and before onAttach 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: Fragment |
Fragment that just received a callback to |