public interface ActivityRetainedLifecycle
ActivityRetainedLifecycle
class is associated with the lifecycle of the ActivityRetainedComponent
.Modifier and Type | Interface and Description |
---|---|
static interface |
ActivityRetainedLifecycle.OnClearedListener
Listener for receiving a callback for when the
ActivityRetainedComponent will no longer be used and destroyed. |
Modifier and Type | Method and Description |
---|---|
void |
addOnClearedListener(ActivityRetainedLifecycle.OnClearedListener listener)
Adds a new
ActivityRetainedLifecycle.OnClearedListener for receiving a callback when the activity retained
instances will no longer be needed and destroyed. |
void |
removeOnClearedListener(ActivityRetainedLifecycle.OnClearedListener listener)
Removes a
ActivityRetainedLifecycle.OnClearedListener previously added via addOnClearedListener(OnClearedListener) . |
@MainThread void addOnClearedListener(@NonNull ActivityRetainedLifecycle.OnClearedListener listener)
ActivityRetainedLifecycle.OnClearedListener
for receiving a callback when the activity retained
instances will no longer be needed and destroyed.listener
- The listener that should be added.@MainThread void removeOnClearedListener(@NonNull ActivityRetainedLifecycle.OnClearedListener listener)
ActivityRetainedLifecycle.OnClearedListener
previously added via addOnClearedListener(OnClearedListener)
.listener
- The listener that should be removed.