🌈 Create new beautiful Compose Gradients with our new wesite ->
Class

ViewCompositionStrategy.DisposeOnLifecycleDestroyed

ViewCompositionStrategy that disposes the composition when lifecycle is [destroyed]Lifecycle.Event.ON_DESTROY.

Source set: Android
public class DisposeOnLifecycleDestroyed(private val lifecycle: Lifecycle) :
        ViewCompositionStrategy

ViewCompositionStrategy that disposes the composition when lifecycle is destroyed. This strategy is appropriate for Compose UI views that share a 1-1 relationship with a known LifecycleOwner.

Functions

installFor

Source set: Android
override fun installFor(view: AbstractComposeView): () -> Unit