AndroidWindowVisibility

class AndroidWindowVisibility(lifecycleOwner: LifecycleOwner = ProcessLifecycleOwner.get()) : WindowVisibility

Implementation of WindowVisibility for Android.

In the Android system, ProcessLifecycleOwner is used to monitor window visibility states. It notifies the window visibility state based on the lifecycle state of ProcessLifecycleOwner.

Constructors

Link copied to clipboard
constructor(lifecycleOwner: LifecycleOwner = ProcessLifecycleOwner.get())

Types

Link copied to clipboard

Implementation of DefaultLifecycleObserver for observing window visibility.

Functions

Link copied to clipboard
open override fun addObserver(observer: WindowVisibility.Observer)

Adds an observer to receive events.

Link copied to clipboard
open fun asFlow(): Flow<WindowVisibilityEvent>

Provides a Flow to receive events of window visibility.

Link copied to clipboard
open override fun removeObserver(observer: WindowVisibility.Observer)

Removes an observer that receives events.