이제 두 번째 Android 11 개발자 프리뷰를 사용할 수 있습니다. 테스트해 보고 의견을 공유하세요.

LifecycleOwner

public interface LifecycleOwner

androidx.lifecycle.LifecycleOwner


A class that has an Android lifecycle. These events can be used by custom components to handle lifecycle changes without implementing any code inside the Activity or the Fragment.

Summary

Public methods

abstract Lifecycle getLifecycle()

Returns the Lifecycle of the provider.

Public methods

getLifecycle

public abstract Lifecycle getLifecycle ()

Returns the Lifecycle of the provider.

Returns
Lifecycle The lifecycle of the provider.