# LayoutModifier.Element

Artifact: [androidx.wear.protolayout:protolayout](https://developer.android.com/jetpack/androidx/releases/wear-protolayout) [View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/modifiers/LayoutModifier.kt+class:androidx.wear.protolayout.modifiers.LayoutModifier.Element) Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

*** ** * ** ***

Kotlin \|[Java](https://developer.android.com/reference/androidx/wear/protolayout/modifiers/LayoutModifier.Element "View this page in Java")


```
interface LayoutModifier.Element : LayoutModifier
```

<br />

*** ** * ** ***

A single element contained within a `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/modifiers/LayoutModifier` chain.

## Summary

| ### Public functions |
|---|---|
| `open R` | `<R : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?> https://developer.android.com/reference/kotlin/androidx/wear/protolayout/modifiers/LayoutModifier.Element#foldRight(kotlin.Any,kotlin.Function2)(initial: R, operation: (https://developer.android.com/reference/kotlin/androidx/wear/protolayout/modifiers/LayoutModifier.Element, R) -> R)` Accumulates a value starting with `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/modifiers/LayoutModifier#foldRight(kotlin.Any,kotlin.Function2)` and applying `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/modifiers/LayoutModifier#foldRight(kotlin.Any,kotlin.Function2)` to the current value and each element from left to right. |

| ### Inherited functions |
|---|
| From [androidx.wear.protolayout.modifiers.LayoutModifier](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/modifiers/LayoutModifier) |---|---| | `open infix https://developer.android.com/reference/kotlin/androidx/wear/protolayout/modifiers/LayoutModifier` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/modifiers/LayoutModifier#then(androidx.wear.protolayout.modifiers.LayoutModifier)(other: https://developer.android.com/reference/kotlin/androidx/wear/protolayout/modifiers/LayoutModifier)` Concatenates this modifier with another. | |

## Public functions

### foldRight

```
open fun <R : Any?> foldRight(initial: R, operation: (LayoutModifier.Element, R) -> R): R
```

Accumulates a value starting with `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/modifiers/LayoutModifier#foldRight(kotlin.Any,kotlin.Function2)` and applying `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/modifiers/LayoutModifier#foldRight(kotlin.Any,kotlin.Function2)` to the current value and each element from left to right.

`https://developer.android.com/reference/kotlin/androidx/wear/protolayout/modifiers/LayoutModifier#foldRight(kotlin.Any,kotlin.Function2)` may be used to accumulate a value starting from the head of the modifier chain to the final modifier element.