# OnRemeasuredModifier

Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/layout/OnRemeasuredModifier.kt+class:androidx.compose.ui.layout.OnRemeasuredModifier) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0) Common/AllAndroid/JVM
- Cmn

  ```
  interface OnRemeasuredModifier : Modifier.Element
  ```

*** ** * ** ***

A modifier whose `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/OnRemeasuredModifier#onRemeasured(androidx.compose.ui.unit.IntSize)` is called when the layout content is remeasured. The most common usage is `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/onSizeChanged.modifier#(androidx.compose.ui.Modifier).onSizeChanged(kotlin.Function1)`.

Example usage:

```kotlin
import androidx.compose.material3.Text
import androidx.compose.ui.Modifier
import androidx.compose.ui.layout.onSizeChanged

// Use onSizeChanged() for diagnostics. Use Layout or SubcomposeLayout if you want
// to use the size of one component to affect the size of another component.
Text(
    "Hello $name",
    Modifier.onSizeChanged { size -> println("The size of the Text in pixels is $size") },
)
```

## Summary

| ### Public functions |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/OnRemeasuredModifier#onRemeasured(androidx.compose.ui.unit.IntSize)(size: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/IntSize)` Called after a layout's contents have been remeasured. | Cmn |

### Inherited functions

From [androidx.compose.ui.Modifier](https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier) `open infix https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier` `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier#then(androidx.compose.ui.Modifier)(other: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier)`

Concatenates this modifier with another.
Cmn From [androidx.compose.ui.Modifier.Element](https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Element) `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Element#all(kotlin.Function1)(predicate: (https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Element) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`

Returns `true` if `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier#all(kotlin.Function1)` returns true for all `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Element`s in this `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier` or if this `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier` contains no `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Element`s.
Cmn `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Element#any(kotlin.Function1)(predicate: (https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Element) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`

Returns `true` if `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier#any(kotlin.Function1)` returns true for any `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Element` in this `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier`.
Cmn `open R` `<R : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?> https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Element#foldIn(kotlin.Any,kotlin.Function2)(initial: R, operation: (https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Element, R) -> R)`

Accumulates a value starting with `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier#foldIn(kotlin.Any,kotlin.Function2)` and applying `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier#foldIn(kotlin.Any,kotlin.Function2)` to the current value and each element from outside in.
Cmn `open R` `<R : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?> https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Element#foldOut(kotlin.Any,kotlin.Function2)(initial: R, operation: (https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Element, R) -> R)`

Accumulates a value starting with `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier#foldOut(kotlin.Any,kotlin.Function2)` and applying `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier#foldOut(kotlin.Any,kotlin.Function2)` to the current value and each element from inside out.
Cmn

## Public functions

### onRemeasured

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
fun onRemeasured(size: IntSize): Unit
```

Called after a layout's contents have been remeasured.