---
title: "WindowRecomposerFactory"
description: "A factory for creating an Android window-scoped [Recomposer]."
type: "interface"
---
## API Reference

> Source set: Android

```kotlin
public interface WindowRecomposerFactory
```

A factory for creating an Android window-scoped `Recomposer`. See `createRecomposer`.

## Functions

### createRecomposer

> Source set: Android

```kotlin
public fun createRecomposer(windowRootView: View): Recomposer
```

Get a `Recomposer` for the window where `windowRootView` is at the root of the window's
`View` hierarchy. The factory is responsible for establishing a policy for
`shutting down` the returned `Recomposer`. `windowRootView` will hold a
hard reference to the returned `Recomposer` until it `joins` after shutting
down.

## Members

### Companion

> Source set: Android

```kotlin
public companion object
```

## Properties

### LifecycleAware

> Source set: Android

```kotlin
public val LifecycleAware: WindowRecomposerFactory = WindowRecomposerFactory { rootView ->
            rootView.createLifecycleAwareWindowRecomposer()
        }
```

A [WindowRecomposerFactory](/jetpack-compose/androidx.compose.ui/ui/interfaces/WindowRecomposerFactory/api) that creates **lifecycle-aware** `Recomposer`s.

Returned `Recomposer`s will be bound to the `LifecycleOwner` returned by
`findViewTreeLifecycleOwner` registered at the `root` of the view
hierarchy and run `recomposition` and composition
effects on the `AndroidUiDispatcher.CurrentThread` for the window's UI thread. The
associated `MonotonicFrameClock` will only produce frames when the `Lifecycle` is at
least `Lifecycle.State.STARTED`, causing animations and other uses of
`MonotonicFrameClock` APIs to suspend until a **visible** frame will be produced.
