第二个 Android 11 开发者预览版现已推出,快来测试并分享您的反馈吧

LifecycleObserver

public interface LifecycleObserver

androidx.lifecycle.LifecycleObserver


Marks a class as a LifecycleObserver. It does not have any methods, instead, relies on OnLifecycleEvent annotated methods.