# ModifiersBuilders

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

*** ** * ** ***


```
public final class ModifiersBuilders
```

<br />

*** ** * ** ***

Builders for modifiers for composable layout elements.

## Summary

| ### Nested types |
|---|
| `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 200) @https://developer.android.com/reference/androidx/wear/protolayout/expression/ProtoLayoutExperimental public final class https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.AnimatedVisibility` The content transition of an element. |
| `public final class https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.AnimatedVisibility.Builder` Builder for `https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.AnimatedVisibility` |
| `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 0) public final class https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.ArcModifiers` `https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Modifiers` that can be used with ArcLayoutElements. |
| `public final class https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.ArcModifiers.Builder` Builder for `https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.ArcModifiers` |
| `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 0) public final class https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Background` A modifier to apply a background to an element. |
| `public final class https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Background.Builder` Builder for `https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Background` |
| `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 0) public final class https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Border` A modifier to apply a border around an element. |
| `public final class https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Border.Builder` Builder for `https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Border` |
| `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 0) public final class https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Clickable` A modifier for an element which can have associated Actions for click events. |
| `public final class https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Clickable.Builder` Builder for `https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Clickable` |
| `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 0) public final class https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Corner` The corner of a `https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.Box` element. |
| `public final class https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Corner.Builder` Builder for `https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Corner` |
| `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 400) public final class https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.CornerRadius` A radius for either circular or elliptical shapes. |
| `public final class https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.CornerRadius.Builder` Builder for `https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.CornerRadius` |
| `@https://developer.android.com/reference/androidx/wear/protolayout/expression/ProtoLayoutExperimental public final class https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.DefaultContentTransitions` Prebuilt default objects for animated visibility transition animations. |
| `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 0) public final class https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.ElementMetadata` Metadata about an element. |
| `public final class https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.ElementMetadata.Builder` Builder for `https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.ElementMetadata` |
| `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 200) @https://developer.android.com/reference/androidx/wear/protolayout/expression/ProtoLayoutExperimental public final class https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.EnterTransition` The content transition that is triggered when element enters the layout. |
| `public final class https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.EnterTransition.Builder` Builder for `https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.EnterTransition` |
| `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 200) @https://developer.android.com/reference/androidx/wear/protolayout/expression/ProtoLayoutExperimental public final class https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.ExitTransition` The content transition that is triggered when element exits the layout. |
| `public final class https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.ExitTransition.Builder` Builder for `https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.ExitTransition` |
| `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 200) @https://developer.android.com/reference/androidx/wear/protolayout/expression/ProtoLayoutExperimental public final class https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.FadeInTransition` The fading animation for content transition of an element and its children, from the specified starting alpha to fully visible. |
| `public final class https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.FadeInTransition.Builder` Builder for `https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.FadeInTransition` |
| `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 200) @https://developer.android.com/reference/androidx/wear/protolayout/expression/ProtoLayoutExperimental public final class https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.FadeOutTransition` The fading animation for content transition of an element and its children, from fully visible to the specified target alpha. |
| `public final class https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.FadeOutTransition.Builder` Builder for `https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.FadeOutTransition` |
| `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 0) public final class https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Modifiers` `https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Modifiers` for an element. |
| `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` |
| `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 0) public final class https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Padding` A modifier to apply padding around an element. |
| `public final class https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Padding.Builder` Builder for `https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Padding` |
| `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 0) public final class https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Semantics` A modifier for an element which has accessibility semantics associated with it. |
| `public final class https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Semantics.Builder` Builder for `https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Semantics` |
| `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 300) public final class https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Shadow` The shadow definition. |
| `public final class https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Shadow.Builder` Builder for `https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Shadow` |
| `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 200) @https://developer.android.com/reference/androidx/wear/protolayout/expression/ProtoLayoutExperimental public interface https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.SlideBound` Interface defining the boundary that a Slide animation will use for start/end. |
| `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 200) @https://developer.android.com/reference/androidx/wear/protolayout/expression/ProtoLayoutExperimental public final class https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.SlideInTransition` The sliding in animation for content transition of an element and its children. |
| `public final class https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.SlideInTransition.Builder` Builder for `https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.SlideInTransition` |
| `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 200) @https://developer.android.com/reference/androidx/wear/protolayout/expression/ProtoLayoutExperimental public final class https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.SlideOutTransition` The sliding out animation for content transition of an element and its children. |
| `public final class https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.SlideOutTransition.Builder` Builder for `https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.SlideOutTransition` |
| `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 200) @https://developer.android.com/reference/androidx/wear/protolayout/expression/ProtoLayoutExperimental public final class https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.SlideParentBound implements https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.SlideBound` The slide animation will animate from/to the parent elements boundaries. |
| `public final class https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.SlideParentBound.Builder` Builder for `https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.SlideParentBound`. |
| `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 0) public final class https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.SpanModifiers` `https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Modifiers` that can be used with `https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.Span` elements. |
| `public final class https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.SpanModifiers.Builder` Builder for `https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.SpanModifiers` |
| `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 400) public final class https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Transformation` A modifier to apply transformations to the element. |
| `public final class https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Transformation.Builder` Builder for `https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Transformation` |

| ### Constants |
|---|---|
| `static final int` | `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 200) https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders#SEMANTICS_ROLE_BUTTON() = 2` The element is a Button control. |
| `static final int` | `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 200) https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders#SEMANTICS_ROLE_CHECKBOX() = 3` The element is a Checkbox which is a component that represents two states (checked / unchecked). |
| `static final int` | `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 200) https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders#SEMANTICS_ROLE_IMAGE() = 1` The element is an image. |
| `static final int` | `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 200) https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders#SEMANTICS_ROLE_NONE() = 0` Role is undefined. |
| `static final int` | `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 200) https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders#SEMANTICS_ROLE_RADIOBUTTON() = 5` This element is a RadioButton which is a component to represent two states, selected and not selected. |
| `static final int` | `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 200) https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders#SEMANTICS_ROLE_SWITCH() = 4` The element is a Switch which is a two state toggleable component that provides on/off like options. |
| `static final int` | `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 200) @https://developer.android.com/reference/androidx/wear/protolayout/expression/ProtoLayoutExperimental https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders#SLIDE_DIRECTION_BOTTOM_TO_TOP() = 4` The sliding orientation that moves an element vertically from bottom to the top. |
| `static final int` | `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 200) @https://developer.android.com/reference/androidx/wear/protolayout/expression/ProtoLayoutExperimental https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders#SLIDE_DIRECTION_LEFT_TO_RIGHT() = 1` The sliding orientation that moves an element horizontally from left to the right. |
| `static final int` | `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 200) @https://developer.android.com/reference/androidx/wear/protolayout/expression/ProtoLayoutExperimental https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders#SLIDE_DIRECTION_RIGHT_TO_LEFT() = 2` The sliding orientation that moves an element horizontally from right to the left. |
| `static final int` | `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 200) @https://developer.android.com/reference/androidx/wear/protolayout/expression/ProtoLayoutExperimental https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders#SLIDE_DIRECTION_TOP_TO_BOTTOM() = 3` The sliding orientation that moves an element vertically from top to the bottom. |
| `static final int` | `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 200) @https://developer.android.com/reference/androidx/wear/protolayout/expression/ProtoLayoutExperimental https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders#SLIDE_DIRECTION_UNDEFINED() = 0` The undefined sliding orientation. |
| `static final int` | `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 200) @https://developer.android.com/reference/androidx/wear/protolayout/expression/ProtoLayoutExperimental https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders#SLIDE_PARENT_SNAP_TO_INSIDE() = 1` The option that snaps insides of the element and its parent at start/end. |
| `static final int` | `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 200) @https://developer.android.com/reference/androidx/wear/protolayout/expression/ProtoLayoutExperimental https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders#SLIDE_PARENT_SNAP_TO_OUTSIDE() = 2` The option that snaps outsides of the element and its parent at start/end. |
| `static final int` | `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 200) @https://developer.android.com/reference/androidx/wear/protolayout/expression/ProtoLayoutExperimental https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders#SLIDE_PARENT_SNAP_UNDEFINED() = 0` The undefined snapping option. |

## Constants

### SEMANTICS_ROLE_BUTTON

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

```
@RequiresSchemaVersion(major = 1, minor = 200)
public static final int SEMANTICS_ROLE_BUTTON = 2
```

The element is a Button control.

### SEMANTICS_ROLE_CHECKBOX

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

```
@RequiresSchemaVersion(major = 1, minor = 200)
public static final int SEMANTICS_ROLE_CHECKBOX = 3
```

The element is a Checkbox which is a component that represents two states (checked / unchecked).

### SEMANTICS_ROLE_IMAGE

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

```
@RequiresSchemaVersion(major = 1, minor = 200)
public static final int SEMANTICS_ROLE_IMAGE = 1
```

The element is an image.

### SEMANTICS_ROLE_NONE

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

```
@RequiresSchemaVersion(major = 1, minor = 200)
public static final int SEMANTICS_ROLE_NONE = 0
```

Role is undefined. It may be automatically populated.

### SEMANTICS_ROLE_RADIOBUTTON

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

```
@RequiresSchemaVersion(major = 1, minor = 200)
public static final int SEMANTICS_ROLE_RADIOBUTTON = 5
```

This element is a RadioButton which is a component to represent two states, selected and not selected.

### SEMANTICS_ROLE_SWITCH

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

```
@RequiresSchemaVersion(major = 1, minor = 200)
public static final int SEMANTICS_ROLE_SWITCH = 4
```

The element is a Switch which is a two state toggleable component that provides on/off like options.

### SLIDE_DIRECTION_BOTTOM_TO_TOP

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

```
@RequiresSchemaVersion(major = 1, minor = 200)
@ProtoLayoutExperimental
public static final int SLIDE_DIRECTION_BOTTOM_TO_TOP = 4
```

The sliding orientation that moves an element vertically from bottom to the top.

### SLIDE_DIRECTION_LEFT_TO_RIGHT

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

```
@RequiresSchemaVersion(major = 1, minor = 200)
@ProtoLayoutExperimental
public static final int SLIDE_DIRECTION_LEFT_TO_RIGHT = 1
```

The sliding orientation that moves an element horizontally from left to the right.

### SLIDE_DIRECTION_RIGHT_TO_LEFT

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

```
@RequiresSchemaVersion(major = 1, minor = 200)
@ProtoLayoutExperimental
public static final int SLIDE_DIRECTION_RIGHT_TO_LEFT = 2
```

The sliding orientation that moves an element horizontally from right to the left.

### SLIDE_DIRECTION_TOP_TO_BOTTOM

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

```
@RequiresSchemaVersion(major = 1, minor = 200)
@ProtoLayoutExperimental
public static final int SLIDE_DIRECTION_TOP_TO_BOTTOM = 3
```

The sliding orientation that moves an element vertically from top to the bottom.

### SLIDE_DIRECTION_UNDEFINED

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

```
@RequiresSchemaVersion(major = 1, minor = 200)
@ProtoLayoutExperimental
public static final int SLIDE_DIRECTION_UNDEFINED = 0
```

The undefined sliding orientation.

### SLIDE_PARENT_SNAP_TO_INSIDE

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

```
@RequiresSchemaVersion(major = 1, minor = 200)
@ProtoLayoutExperimental
public static final int SLIDE_PARENT_SNAP_TO_INSIDE = 1
```

The option that snaps insides of the element and its parent at start/end.

### SLIDE_PARENT_SNAP_TO_OUTSIDE

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

```
@RequiresSchemaVersion(major = 1, minor = 200)
@ProtoLayoutExperimental
public static final int SLIDE_PARENT_SNAP_TO_OUTSIDE = 2
```

The option that snaps outsides of the element and its parent at start/end.

### SLIDE_PARENT_SNAP_UNDEFINED

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

```
@RequiresSchemaVersion(major = 1, minor = 200)
@ProtoLayoutExperimental
public static final int SLIDE_PARENT_SNAP_UNDEFINED = 0
```

The undefined snapping option.