AndroidWindowVisibility

class AndroidWindowVisibility(lifecycleOwner: LifecycleOwner = ProcessLifecycleOwner.get()) : WindowVisibilityProvider(source)

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())

Functions

Link copied to clipboard
open override fun addListener(listener: Listener<WindowVisibilityEvent>)

Registers a listener to receive events.

Link copied to clipboard
fun <E> Listenable<E>.asFlow(): Flow<E>

Converts this Listenable into a Flow that emits events.

Link copied to clipboard

Checks if there are any registered listeners.

Link copied to clipboard
open override fun notify(event: WindowVisibilityEvent)

Notifies all registered listeners about an event.

Link copied to clipboard
open override fun removeListener(listener: Listener<WindowVisibilityEvent>)

Unregisters a listener from receiving events.