# ArrayRow

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

*** ** * ** ***


```
public class ArrayRow
```

<br />

Known direct subclasses [GoalRow](https://developer.android.com/reference/androidx/constraintlayout/core/GoalRow), [PriorityGoalRow](https://developer.android.com/reference/androidx/constraintlayout/core/PriorityGoalRow)

|---|---|
| `https://developer.android.com/reference/androidx/constraintlayout/core/GoalRow` |   |
| `https://developer.android.com/reference/androidx/constraintlayout/core/PriorityGoalRow` | Implements a row containing goals taking in account priorities. |

*** ** * ** ***

## Summary

| ### Nested types |
|---|
| `public interface https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow.ArrayRowVariables` |

| ### Public fields |
|---|---|
| `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow.ArrayRowVariables` | `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow#variables()` |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow#ArrayRow()()` |
| `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow#ArrayRow(androidx.constraintlayout.core.Cache)(https://developer.android.com/reference/androidx/constraintlayout/core/Cache cache)` |

| ### Public methods |
|---|---|
| `void` | `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow#addError(androidx.constraintlayout.core.SolverVariable)(https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable error)` |
| `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow` | `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow#addError(androidx.constraintlayout.core.LinearSystem,int)(https://developer.android.com/reference/androidx/constraintlayout/core/LinearSystem system, int strength)` |
| `void` | `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow#clear()()` |
| `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow` | `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow#createRowDimensionRatio(androidx.constraintlayout.core.SolverVariable,androidx.constraintlayout.core.SolverVariable,androidx.constraintlayout.core.SolverVariable,androidx.constraintlayout.core.SolverVariable,float)( https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable variableA, https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable variableB, https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable variableC, https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable variableD, float ratio )` Create a constraint to express `A = B + (C - D)` \* ratio We use this for ratio, where for example `Right = Left + (Bottom - Top) * percent` |
| `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow` | `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow#createRowEqualDimension(float,float,float,androidx.constraintlayout.core.SolverVariable,int,androidx.constraintlayout.core.SolverVariable,int,androidx.constraintlayout.core.SolverVariable,int,androidx.constraintlayout.core.SolverVariable,int)( float currentWeight, float totalWeights, float nextWeight, https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable variableStartA, int marginStartA, https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable variableEndA, int marginEndA, https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable variableStartB, int marginStartB, https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable variableEndB, int marginEndB )` |
| `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow` | `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow#createRowEqualMatchDimensions(float,float,float,androidx.constraintlayout.core.SolverVariable,androidx.constraintlayout.core.SolverVariable,androidx.constraintlayout.core.SolverVariable,androidx.constraintlayout.core.SolverVariable)( float currentWeight, float totalWeights, float nextWeight, https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable variableStartA, https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable variableEndA, https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable variableStartB, https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable variableEndB )` |
| `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow` | `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow#createRowEquals(androidx.constraintlayout.core.SolverVariable,int)(https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable variable, int value)` |
| `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow` | `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow#createRowEquals(androidx.constraintlayout.core.SolverVariable,androidx.constraintlayout.core.SolverVariable,int)( https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable variableA, https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable variableB, int margin )` |
| `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow` | `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow#createRowGreaterThan(androidx.constraintlayout.core.SolverVariable,int,androidx.constraintlayout.core.SolverVariable)(https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable a, int b, https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable slack)` |
| `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow` | `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow#createRowGreaterThan(androidx.constraintlayout.core.SolverVariable,androidx.constraintlayout.core.SolverVariable,androidx.constraintlayout.core.SolverVariable,int)( https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable variableA, https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable variableB, https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable slack, int margin )` |
| `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow` | `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow#createRowLowerThan(androidx.constraintlayout.core.SolverVariable,androidx.constraintlayout.core.SolverVariable,androidx.constraintlayout.core.SolverVariable,int)( https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable variableA, https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable variableB, https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable slack, int margin )` |
| `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow` | `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow#createRowWithAngle(androidx.constraintlayout.core.SolverVariable,androidx.constraintlayout.core.SolverVariable,androidx.constraintlayout.core.SolverVariable,androidx.constraintlayout.core.SolverVariable,float)( https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable at, https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable ab, https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable bt, https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable bb, float angleComponent )` Create a constraint to express At + (Ab-At)/2 = Bt + (Bb-Bt)/2 - angle |
| `https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable` | `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow#getKey()()` |
| `https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable` | `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow#getPivotCandidate(androidx.constraintlayout.core.LinearSystem,boolean[])(https://developer.android.com/reference/androidx/constraintlayout/core/LinearSystem system, boolean[] avoid)` |
| `void` | `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow#initFromRow(androidx.constraintlayout.core.LinearSystem.Row)(https://developer.android.com/reference/androidx/constraintlayout/core/LinearSystem.Row row)` Used to initiate a goal from a given row (to see if we can remove an extra var) |
| `boolean` | `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow#isEmpty()()` |
| `https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable` | `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow#pickPivot(androidx.constraintlayout.core.SolverVariable)(https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable exclude)` |
| `void` | `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow#reset()()` |
| `https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow#toString()()` |
| `void` | `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow#updateFromFinalVariable(androidx.constraintlayout.core.LinearSystem,androidx.constraintlayout.core.SolverVariable,boolean)( https://developer.android.com/reference/androidx/constraintlayout/core/LinearSystem system, https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable variable, boolean removeFromDefinition )` |
| `void` | `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow#updateFromRow(androidx.constraintlayout.core.LinearSystem,androidx.constraintlayout.core.ArrayRow,boolean)( https://developer.android.com/reference/androidx/constraintlayout/core/LinearSystem system, https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow definition, boolean removeFromDefinition )` |
| `void` | `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow#updateFromSynonymVariable(androidx.constraintlayout.core.LinearSystem,androidx.constraintlayout.core.SolverVariable,boolean)( https://developer.android.com/reference/androidx/constraintlayout/core/LinearSystem system, https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable variable, boolean removeFromDefinition )` |
| `void` | `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow#updateFromSystem(androidx.constraintlayout.core.LinearSystem)(https://developer.android.com/reference/androidx/constraintlayout/core/LinearSystem system)` |

## Public fields

### variables

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

```
public ArrayRow.ArrayRowVariables variables
```

## Public constructors

### ArrayRow

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

```
public ArrayRow()
```

### ArrayRow

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

```
public ArrayRow(Cache cache)
```

## Public methods

### addError

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

```
public void addError(SolverVariable error)
```

### addError

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

```
public ArrayRow addError(LinearSystem system, int strength)
```

### clear

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

```
public void clear()
```

### createRowDimensionRatio

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

```
public ArrayRow createRowDimensionRatio(
    SolverVariable variableA,
    SolverVariable variableB,
    SolverVariable variableC,
    SolverVariable variableD,
    float ratio
)
```

Create a constraint to express `A = B + (C - D)` \* ratio We use this for ratio, where for example `Right = Left + (Bottom - Top) * percent`

| Parameters |
|---|---|
| `https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable variableA` | variable A |
| `https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable variableB` | variable B |
| `https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable variableC` | variable C |
| `https://developer.android.com/reference/androidx/constraintlayout/core/SolverVariable variableD` | variable D |
| `float ratio` | ratio between AB and CD |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/constraintlayout/core/ArrayRow` | the row |

### createRowEqualDimension

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

```
public ArrayRow createRowEqualDimension(
    float currentWeight,
    float totalWeights,
    float nextWeight,
    SolverVariable variableStartA,
    int marginStartA,
    SolverVariable variableEndA,
    int marginEndA,
    SolverVariable variableStartB,
    int marginStartB,
    SolverVariable variableEndB,
    int marginEndB
)
```

### createRowEqualMatchDimensions

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

```
public ArrayRow createRowEqualMatchDimensions(
    float currentWeight,
    float totalWeights,
    float nextWeight,
    SolverVariable variableStartA,
    SolverVariable variableEndA,
    SolverVariable variableStartB,
    SolverVariable variableEndB
)
```

### createRowEquals

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

```
public ArrayRow createRowEquals(SolverVariable variable, int value)
```

### createRowEquals

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

```
public ArrayRow createRowEquals(
    SolverVariable variableA,
    SolverVariable variableB,
    int margin
)
```

### createRowGreaterThan

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

```
public ArrayRow createRowGreaterThan(SolverVariable a, int b, SolverVariable slack)
```

### createRowGreaterThan

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

```
public ArrayRow createRowGreaterThan(
    SolverVariable variableA,
    SolverVariable variableB,
    SolverVariable slack,
    int margin
)
```

### createRowLowerThan

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

```
public ArrayRow createRowLowerThan(
    SolverVariable variableA,
    SolverVariable variableB,
    SolverVariable slack,
    int margin
)
```

### createRowWithAngle

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

```
public ArrayRow createRowWithAngle(
    SolverVariable at,
    SolverVariable ab,
    SolverVariable bt,
    SolverVariable bb,
    float angleComponent
)
```

Create a constraint to express At + (Ab-At)/2 = Bt + (Bb-Bt)/2 - angle

### getKey

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

```
public SolverVariable getKey()
```

### getPivotCandidate

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

```
public SolverVariable getPivotCandidate(LinearSystem system, boolean[] avoid)
```

### initFromRow

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

```
public void initFromRow(LinearSystem.Row row)
```

Used to initiate a goal from a given row (to see if we can remove an extra var)

### isEmpty

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

```
public boolean isEmpty()
```

### pickPivot

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

```
public SolverVariable pickPivot(SolverVariable exclude)
```

### reset

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

```
public void reset()
```

### toString

```
public String toString()
```

### updateFromFinalVariable

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

```
public void updateFromFinalVariable(
    LinearSystem system,
    SolverVariable variable,
    boolean removeFromDefinition
)
```

### updateFromRow

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

```
public void updateFromRow(
    LinearSystem system,
    ArrayRow definition,
    boolean removeFromDefinition
)
```

### updateFromSynonymVariable

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

```
public void updateFromSynonymVariable(
    LinearSystem system,
    SolverVariable variable,
    boolean removeFromDefinition
)
```

### updateFromSystem

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

```
public void updateFromSystem(LinearSystem system)
```