# ModifiersBuilders.Modifiers

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/ModifiersBuilders.java+class:androidx.wear.protolayout.ModifiersBuilders.Modifiers) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

*** ** * ** ***


```
@RequiresSchemaVersion(major = 1, minor = 0)
public final class ModifiersBuilders.Modifiers
```

<br />

*** ** * ** ***

`https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Modifiers` for an element. These may change the way they are drawn (e.g. `https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Padding` or `https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Background`), or change their behaviour (e.g. `https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Clickable`, or `https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Semantics`).

## Summary

| ### Nested types |
|---|
| `public final class https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Modifiers.Builder` Builder for `https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Modifiers` |

| ### Public methods |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Background` | `https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Modifiers#getBackground()()` Gets the background (with optional corner radius) of the modified element. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Border` | `https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Modifiers#getBorder()()` Gets the border of the modified element. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Clickable` | `https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Modifiers#getClickable()()` Gets the clickable property of the modified element. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.AnimatedVisibility` | `@https://developer.android.com/reference/androidx/wear/protolayout/expression/ProtoLayoutExperimental https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Modifiers#getContentUpdateAnimation()()` Gets the content transition of an element. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.ElementMetadata` | `https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Modifiers#getMetadata()()` Gets metadata about an element. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/wear/protolayout/TypeBuilders.FloatProp` | `https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Modifiers#getOpacity()()` Gets the opacity of the element with a value from 0 to 1, where 0 means the view is the element is completely transparent and 1 means the element is completely opaque. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Padding` | `https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Modifiers#getPadding()()` Gets the padding of the modified element. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Semantics` | `https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Modifiers#getSemantics()()` Gets the semantics of the modified element. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Transformation` | `https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Modifiers#getTransformation()()` Gets the transformation applied to the element post-layout. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/TypeBuilders.BoolProp` | `@https://developer.android.com/reference/androidx/wear/protolayout/expression/ProtoLayoutExperimental https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Modifiers#isVisible()()` Gets whether the attached element is visible, or hidden. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Modifiers#toString()()` |

## Public methods

### getBackground

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
public @Nullable ModifiersBuilders.Background getBackground()
```

Gets the background (with optional corner radius) of the modified element.

### getBorder

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
public @Nullable ModifiersBuilders.Border getBorder()
```

Gets the border of the modified element.

### getClickable

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
public @Nullable ModifiersBuilders.Clickable getClickable()
```

Gets the clickable property of the modified element. It allows its wrapped element to have actions associated with it, which will be executed when the element is tapped.

### getContentUpdateAnimation

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
@ProtoLayoutExperimental
public @Nullable ModifiersBuilders.AnimatedVisibility getContentUpdateAnimation()
```

Gets the content transition of an element. Any update to the element or its children will trigger this animation for this element and everything underneath it.

### getMetadata

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
public @Nullable ModifiersBuilders.ElementMetadata getMetadata()
```

Gets metadata about an element. For use by libraries building higher-level components only. This can be used to track component metadata.

### getOpacity

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.2.0)

```
public @Nullable TypeBuilders.FloatProp getOpacity()
```

Gets the opacity of the element with a value from 0 to 1, where 0 means the view is the element is completely transparent and 1 means the element is completely opaque.

### getPadding

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
public @Nullable ModifiersBuilders.Padding getPadding()
```

Gets the padding of the modified element.

### getSemantics

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
public @Nullable ModifiersBuilders.Semantics getSemantics()
```

Gets the semantics of the modified element. This can be used to add metadata to the modified element (eg. screen reader content descriptions).

### getTransformation

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.2.0)

```
public @Nullable ModifiersBuilders.Transformation getTransformation()
```

Gets the transformation applied to the element post-layout.

### isVisible

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.1.0)

```
@ProtoLayoutExperimental
public @NonNull TypeBuilders.BoolProp isVisible()
```

Gets whether the attached element is visible, or hidden. If the element is hidden, then it will still consume space in the layout, but will not render any contents, nor will any children render any contents. Defaults to visible.

### toString

```
public @NonNull String toString()
```