# LayoutModifier.Companion

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.Companion) 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.Companion "View this page in Java")


```
object LayoutModifier.Companion : LayoutModifier
```

<br />

*** ** * ** ***

The companion object `LayoutModifier` is the empty, default, or starter `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/modifiers/LayoutModifier` that contains no `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/modifiers/LayoutModifier.Element`. Use it to create a new `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/modifiers/LayoutModifier` using modifier extension factory functions.

## 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#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. |
| `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. |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/modifiers/LayoutModifier#toString()()` |

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

### then

```
open infix fun then(other: LayoutModifier): LayoutModifier
```

Concatenates this modifier with another.

Returns a `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/modifiers/LayoutModifier` representing this modifier followed by `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/modifiers/LayoutModifier#then(androidx.wear.protolayout.modifiers.LayoutModifier)` in sequence.

### toString

```
open fun toString(): String
```