{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

OnLifecycleEvent

@Retention(value = RetentionPolicy.RUNTIME)
@Target(value = ElementType.METHOD)
public annotation OnLifecycleEvent


Annotation that can be used to mark methods on LifecycleObserver implementations that should be invoked to handle lifecycle events.

Summary

Public methods

abstract Lifecycle.Event

Public methods

value

public abstract Lifecycle.Event value()