Object

ViewCompositionStrategy.DisposeOnViewTreeLifecycleDestroyed

ViewCompositionStrategy that disposes the composition when the LifecycleOwner returned by findViewTreeLifecycleOwner of the next window the view is attached to is [destroyed]Lifecycle.Event.ON_DESTROY.

Source set: Android
public object DisposeOnViewTreeLifecycleDestroyed : ViewCompositionStrategy

ViewCompositionStrategy that disposes the composition when the LifecycleOwner returned by findViewTreeLifecycleOwner of the next window the view is attached to is destroyed. This strategy is appropriate for Compose UI views that share a 1-1 relationship with their closest LifecycleOwner, such as a Fragment view.

Functions

installFor

Source set: Android
override fun installFor(view: AbstractComposeView): () -> Unit
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: