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

LifecycleEventObserver

public interface LifecycleEventObserver
implements LifecycleObserver

androidx.lifecycle.LifecycleEventObserver


Class that can receive any lifecycle change and dispatch it to the receiver.

If a class implements both this interface and DefaultLifecycleObserver, then methods of DefaultLifecycleObserver will be called first, and then followed by the call of onStateChanged(LifecycleOwner, Lifecycle.Event)

If a class implements this interface and in the same time uses OnLifecycleEvent, then annotations will be ignored.

Summary

Public methods

abstract void onStateChanged(LifecycleOwner source, Lifecycle.Event event)

Called when a state transition event happens.

Public methods

onStateChanged

public abstract void onStateChanged (LifecycleOwner source, 
                Lifecycle.Event event)

Called when a state transition event happens.

Parameters
source LifecycleOwner: The source of the event

event Lifecycle.Event: The event