# 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)

*** ** * ** ***


```
public interface LayoutModifier.Element extends LayoutModifier
```

<br />

*** ** * ** ***

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

## Summary

| ### Public methods |
|---|---|
| `default @https://developer.android.com/reference/androidx/annotation/NonNull R` | `<R extends https://developer.android.com/reference/java/lang/Object.html> https://developer.android.com/reference/androidx/wear/protolayout/modifiers/LayoutModifier.Element#foldRight(kotlin.Any,kotlin.Function2)( @https://developer.android.com/reference/androidx/annotation/NonNull R initial, @https://developer.android.com/reference/androidx/annotation/NonNull Function2<@https://developer.android.com/reference/androidx/annotation/NonNull R, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/modifiers/LayoutModifier.Element, @https://developer.android.com/reference/androidx/annotation/NonNull R> operation )` Accumulates a value starting with `https://developer.android.com/reference/androidx/wear/protolayout/modifiers/LayoutModifier#foldRight(kotlin.Any,kotlin.Function2)` and applying `https://developer.android.com/reference/androidx/wear/protolayout/modifiers/LayoutModifier#foldRight(kotlin.Any,kotlin.Function2)` to the current value and each element from left to right. |

| ### Inherited methods |
|---|
| From [androidx.wear.protolayout.modifiers.LayoutModifier](https://developer.android.com/reference/androidx/wear/protolayout/modifiers/LayoutModifier) |---|---| | `default @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/modifiers/LayoutModifier` | `https://developer.android.com/reference/androidx/wear/protolayout/modifiers/LayoutModifier#then(androidx.wear.protolayout.modifiers.LayoutModifier)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/modifiers/LayoutModifier other)` Concatenates this modifier with another. | |

## Public methods

### foldRight

```
default @NonNull R <R extends Object> foldRight(
    @NonNull R initial,
    @NonNull Function2<@NonNull R, @NonNull LayoutModifier.Element, @NonNull R> operation
)
```

Accumulates a value starting with `https://developer.android.com/reference/androidx/wear/protolayout/modifiers/LayoutModifier#foldRight(kotlin.Any,kotlin.Function2)` and applying `https://developer.android.com/reference/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/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.