# State.Constraint

Artifact: [androidx.constraintlayout:constraintlayout-core](https://developer.android.com/jetpack/androidx/releases/constraintlayout) [View Source](https://cs.android.com/search?q=file:androidx/constraintlayout/core/state/State.java+class:androidx.constraintlayout.core.state.State.Constraint) Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

*** ** * ** ***


```
public enum State.Constraint
```

<br />

*** ** * ** ***

## Summary

| ### Enum Values |
|---|---|
| `https://developer.android.com/reference/androidx/constraintlayout/core/state/State.Constraint#BASELINE_TO_BASELINE` |   |
| `https://developer.android.com/reference/androidx/constraintlayout/core/state/State.Constraint#BASELINE_TO_BOTTOM` |   |
| `https://developer.android.com/reference/androidx/constraintlayout/core/state/State.Constraint#BASELINE_TO_TOP` |   |
| `https://developer.android.com/reference/androidx/constraintlayout/core/state/State.Constraint#BOTTOM_TO_BASELINE` |   |
| `https://developer.android.com/reference/androidx/constraintlayout/core/state/State.Constraint#BOTTOM_TO_BOTTOM` |   |
| `https://developer.android.com/reference/androidx/constraintlayout/core/state/State.Constraint#BOTTOM_TO_TOP` |   |
| `https://developer.android.com/reference/androidx/constraintlayout/core/state/State.Constraint#CENTER_HORIZONTALLY` |   |
| `https://developer.android.com/reference/androidx/constraintlayout/core/state/State.Constraint#CENTER_VERTICALLY` |   |
| `https://developer.android.com/reference/androidx/constraintlayout/core/state/State.Constraint#CIRCULAR_CONSTRAINT` |   |
| `https://developer.android.com/reference/androidx/constraintlayout/core/state/State.Constraint#END_TO_END` |   |
| `https://developer.android.com/reference/androidx/constraintlayout/core/state/State.Constraint#END_TO_START` |   |
| `https://developer.android.com/reference/androidx/constraintlayout/core/state/State.Constraint#LEFT_TO_LEFT` |   |
| `https://developer.android.com/reference/androidx/constraintlayout/core/state/State.Constraint#LEFT_TO_RIGHT` |   |
| `https://developer.android.com/reference/androidx/constraintlayout/core/state/State.Constraint#RIGHT_TO_LEFT` |   |
| `https://developer.android.com/reference/androidx/constraintlayout/core/state/State.Constraint#RIGHT_TO_RIGHT` |   |
| `https://developer.android.com/reference/androidx/constraintlayout/core/state/State.Constraint#START_TO_END` |   |
| `https://developer.android.com/reference/androidx/constraintlayout/core/state/State.Constraint#START_TO_START` |   |
| `https://developer.android.com/reference/androidx/constraintlayout/core/state/State.Constraint#TOP_TO_BASELINE` |   |
| `https://developer.android.com/reference/androidx/constraintlayout/core/state/State.Constraint#TOP_TO_BOTTOM` |   |
| `https://developer.android.com/reference/androidx/constraintlayout/core/state/State.Constraint#TOP_TO_TOP` |   |

| ### Public methods |
|---|---|
| `static https://developer.android.com/reference/androidx/constraintlayout/core/state/State.Constraint` | `https://developer.android.com/reference/androidx/constraintlayout/core/state/State.Constraint#valueOf(java.lang.String)(https://developer.android.com/reference/java/lang/String.html name)` Returns the enum constant of this type with the specified name. |
| `static State.Constraint[]` | `https://developer.android.com/reference/androidx/constraintlayout/core/state/State.Constraint#values()()` Returns an array containing the constants of this enum type, in the order they're declared. |

## Enum Values

### BASELINE_TO_BASELINE

```
State.Constraint State.Constraint.BASELINE_TO_BASELINE
```

### BASELINE_TO_BOTTOM

```
State.Constraint State.Constraint.BASELINE_TO_BOTTOM
```

### BASELINE_TO_TOP

```
State.Constraint State.Constraint.BASELINE_TO_TOP
```

### BOTTOM_TO_BASELINE

```
State.Constraint State.Constraint.BOTTOM_TO_BASELINE
```

### BOTTOM_TO_BOTTOM

```
State.Constraint State.Constraint.BOTTOM_TO_BOTTOM
```

### BOTTOM_TO_TOP

```
State.Constraint State.Constraint.BOTTOM_TO_TOP
```

### CENTER_HORIZONTALLY

```
State.Constraint State.Constraint.CENTER_HORIZONTALLY
```

### CENTER_VERTICALLY

```
State.Constraint State.Constraint.CENTER_VERTICALLY
```

### CIRCULAR_CONSTRAINT

```
State.Constraint State.Constraint.CIRCULAR_CONSTRAINT
```

### END_TO_END

```
State.Constraint State.Constraint.END_TO_END
```

### END_TO_START

```
State.Constraint State.Constraint.END_TO_START
```

### LEFT_TO_LEFT

```
State.Constraint State.Constraint.LEFT_TO_LEFT
```

### LEFT_TO_RIGHT

```
State.Constraint State.Constraint.LEFT_TO_RIGHT
```

### RIGHT_TO_LEFT

```
State.Constraint State.Constraint.RIGHT_TO_LEFT
```

### RIGHT_TO_RIGHT

```
State.Constraint State.Constraint.RIGHT_TO_RIGHT
```

### START_TO_END

```
State.Constraint State.Constraint.START_TO_END
```

### START_TO_START

```
State.Constraint State.Constraint.START_TO_START
```

### TOP_TO_BASELINE

```
State.Constraint State.Constraint.TOP_TO_BASELINE
```

### TOP_TO_BOTTOM

```
State.Constraint State.Constraint.TOP_TO_BOTTOM
```

### TOP_TO_TOP

```
State.Constraint State.Constraint.TOP_TO_TOP
```

## Public methods

### valueOf

Added in 1.1.2

```
public static State.Constraint valueOf(String name)
```

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/constraintlayout/core/state/State.Constraint` | the enum constant with the specified name |

| Throws |
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException.html` | if this enum type has no constant with the specified name |

### values

Added in 1.1.2

```
public static State.Constraint[] values()
```

Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants.

| Returns |
|---|---|
| `State.Constraint[]` | an array containing the constants of this enum type, in the order they're declared |