Google은 흑인 공동체를 위한 인종 간 평등을 진전시키기 위해 노력하고 있습니다. Google에서 어떤 노력을 하고 있는지 확인하세요.

FragmentStateAdapter.FragmentTransactionCallback

public static abstract class FragmentStateAdapter.FragmentTransactionCallback
extends Object

java.lang.Object
   ↳ androidx.viewpager2.adapter.FragmentStateAdapter.FragmentTransactionCallback


Callback interface for listening to fragment lifecycle changes that happen inside the adapter.

Summary

Nested classes

interface FragmentStateAdapter.FragmentTransactionCallback.OnPostEventListener

Callback returned by FragmentStateAdapter.FragmentTransactionCallback.onFragmentPreAdded(Fragment), FragmentStateAdapter.FragmentTransactionCallback.onFragmentPreRemoved(Fragment), FragmentStateAdapter.FragmentTransactionCallback.onFragmentMaxLifecyclePreUpdated(Fragment, Lifecycle.State) called after the operation ends. 

Public constructors

FragmentTransactionCallback()

Public methods

FragmentStateAdapter.FragmentTransactionCallback.OnPostEventListener onFragmentMaxLifecyclePreUpdated(Fragment fragment, Lifecycle.State maxLifecycleState)

Called right before Fragment's maximum state is capped via FragmentTransaction.setMaxLifecycle(Fragment, Lifecycle.State).

FragmentStateAdapter.FragmentTransactionCallback.OnPostEventListener onFragmentPreAdded(Fragment fragment)

Called right before the Fragment is added to adapter's FragmentManager.

FragmentStateAdapter.FragmentTransactionCallback.OnPostEventListener onFragmentPreRemoved(Fragment fragment)

Called right before the Fragment is removed from adapter's FragmentManager.

Inherited methods

Public constructors

FragmentTransactionCallback

public FragmentTransactionCallback ()

Public methods

onFragmentMaxLifecyclePreUpdated

public FragmentStateAdapter.FragmentTransactionCallback.OnPostEventListener onFragmentMaxLifecyclePreUpdated (Fragment fragment, 
                Lifecycle.State maxLifecycleState)

Called right before Fragment's maximum state is capped via FragmentTransaction.setMaxLifecycle(Fragment, Lifecycle.State).

Parameters
fragment Fragment: Fragment to have its state capped

maxLifecycleState Lifecycle.State: Ceiling state for the fragment

Returns
FragmentStateAdapter.FragmentTransactionCallback.OnPostEventListener Listener called after the operation

onFragmentPreAdded

public FragmentStateAdapter.FragmentTransactionCallback.OnPostEventListener onFragmentPreAdded (Fragment fragment)

Called right before the Fragment is added to adapter's FragmentManager.

Parameters
fragment Fragment: Fragment changing state

Returns
FragmentStateAdapter.FragmentTransactionCallback.OnPostEventListener Listener called after the operation

onFragmentPreRemoved

public FragmentStateAdapter.FragmentTransactionCallback.OnPostEventListener onFragmentPreRemoved (Fragment fragment)

Called right before the Fragment is removed from adapter's FragmentManager.

Parameters
fragment Fragment: Fragment changing state

Returns
FragmentStateAdapter.FragmentTransactionCallback.OnPostEventListener Listener called after the operation