# Optimizer

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/widgets/Optimizer.java+class:androidx.constraintlayout.core.widgets.Optimizer) Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

*** ** * ** ***


```
class Optimizer
```

<br />

*** ** * ** ***

Implements direct resolution without using the solver

## Summary

| ### Constants |
|---|---|
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/widgets/Optimizer#OPTIMIZATION_BARRIER() = 2` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/widgets/Optimizer#OPTIMIZATION_CACHE_MEASURES() = 256` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/widgets/Optimizer#OPTIMIZATION_CHAIN() = 4` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/widgets/Optimizer#OPTIMIZATION_DEPENDENCY_ORDERING() = 512` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/widgets/Optimizer#OPTIMIZATION_DIMENSIONS() = 8` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/widgets/Optimizer#OPTIMIZATION_DIRECT() = 1` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/widgets/Optimizer#OPTIMIZATION_GRAPH() = 64` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/widgets/Optimizer#OPTIMIZATION_GRAPH_WRAP() = 128` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/widgets/Optimizer#OPTIMIZATION_GROUPING() = 1024` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/widgets/Optimizer#OPTIMIZATION_GROUPS() = 32` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/widgets/Optimizer#OPTIMIZATION_NONE() = 0` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/widgets/Optimizer#OPTIMIZATION_RATIO() = 16` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/widgets/Optimizer#OPTIMIZATION_STANDARD() = 257` |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/widgets/Optimizer#Optimizer()()` |

| ### Public functions |
|---|---|
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/widgets/Optimizer#enabled(int,int)(optimizationLevel: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, optimization: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` |

## Constants

### OPTIMIZATION_BARRIER

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
const val OPTIMIZATION_BARRIER = 2: Int
```

### OPTIMIZATION_CACHE_MEASURES

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
const val OPTIMIZATION_CACHE_MEASURES = 256: Int
```

### OPTIMIZATION_CHAIN

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
const val OPTIMIZATION_CHAIN = 4: Int
```

### OPTIMIZATION_DEPENDENCY_ORDERING

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
const val OPTIMIZATION_DEPENDENCY_ORDERING = 512: Int
```

### OPTIMIZATION_DIMENSIONS

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
const val OPTIMIZATION_DIMENSIONS = 8: Int
```

### OPTIMIZATION_DIRECT

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
const val OPTIMIZATION_DIRECT = 1: Int
```

### OPTIMIZATION_GRAPH

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
const val OPTIMIZATION_GRAPH = 64: Int
```

### OPTIMIZATION_GRAPH_WRAP

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
const val OPTIMIZATION_GRAPH_WRAP = 128: Int
```

### OPTIMIZATION_GROUPING

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
const val OPTIMIZATION_GROUPING = 1024: Int
```

### OPTIMIZATION_GROUPS

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
const val OPTIMIZATION_GROUPS = 32: Int
```

### OPTIMIZATION_NONE

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
const val OPTIMIZATION_NONE = 0: Int
```

### OPTIMIZATION_RATIO

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
const val OPTIMIZATION_RATIO = 16: Int
```

### OPTIMIZATION_STANDARD

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
const val OPTIMIZATION_STANDARD = 257: Int
```

## Public constructors

### Optimizer

Added in 1.1.2

```
Optimizer()
```

## Public functions

### enabled

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
java-static fun enabled(optimizationLevel: Int, optimization: Int): Boolean
```