# Transition.WidgetState

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

*** ** * ** ***


```
public class Transition.WidgetState
```

<br />

*** ** * ** ***

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/constraintlayout/core/state/Transition.WidgetState#WidgetState()()` |

| ### Public methods |
|---|---|
| `https://developer.android.com/reference/androidx/constraintlayout/core/state/WidgetFrame` | `https://developer.android.com/reference/androidx/constraintlayout/core/state/Transition.WidgetState#getFrame(int)(int type)` |
| `void` | `https://developer.android.com/reference/androidx/constraintlayout/core/state/Transition.WidgetState#interpolate(int,int,float,androidx.constraintlayout.core.state.Transition)( int parentWidth, int parentHeight, float progress, https://developer.android.com/reference/androidx/constraintlayout/core/state/Transition transition )` |
| `void` | `https://developer.android.com/reference/androidx/constraintlayout/core/state/Transition.WidgetState#setKeyAttribute(androidx.constraintlayout.core.motion.utils.TypedBundle)(https://developer.android.com/reference/androidx/constraintlayout/core/motion/utils/TypedBundle prop)` |
| `void` | `https://developer.android.com/reference/androidx/constraintlayout/core/state/Transition.WidgetState#setKeyAttribute(androidx.constraintlayout.core.motion.utils.TypedBundle,androidx.constraintlayout.core.motion.CustomVariable[])(https://developer.android.com/reference/androidx/constraintlayout/core/motion/utils/TypedBundle prop, CustomVariable[] custom)` Set tge keyAttribute bundle and associated custom attributes |
| `void` | `https://developer.android.com/reference/androidx/constraintlayout/core/state/Transition.WidgetState#setKeyCycle(androidx.constraintlayout.core.motion.utils.TypedBundle)(https://developer.android.com/reference/androidx/constraintlayout/core/motion/utils/TypedBundle prop)` |
| `void` | `https://developer.android.com/reference/androidx/constraintlayout/core/state/Transition.WidgetState#setKeyPosition(androidx.constraintlayout.core.motion.utils.TypedBundle)(https://developer.android.com/reference/androidx/constraintlayout/core/motion/utils/TypedBundle prop)` |
| `void` | `https://developer.android.com/reference/androidx/constraintlayout/core/state/Transition.WidgetState#setPathRelative(androidx.constraintlayout.core.state.Transition.WidgetState)(https://developer.android.com/reference/androidx/constraintlayout/core/state/Transition.WidgetState widgetState)` |
| `void` | `https://developer.android.com/reference/androidx/constraintlayout/core/state/Transition.WidgetState#update(androidx.constraintlayout.core.widgets.ConstraintWidget,int)(https://developer.android.com/reference/androidx/constraintlayout/core/widgets/ConstraintWidget child, int state)` |

## Public constructors

### WidgetState

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

```
public WidgetState()
```

## Public methods

### getFrame

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

```
public WidgetFrame getFrame(int type)
```

### interpolate

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

```
public void interpolate(
    int parentWidth,
    int parentHeight,
    float progress,
    Transition transition
)
```

### setKeyAttribute

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

```
public void setKeyAttribute(TypedBundle prop)
```

### setKeyAttribute

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

```
public void setKeyAttribute(TypedBundle prop, CustomVariable[] custom)
```

Set tge keyAttribute bundle and associated custom attributes

| Parameters |
|---|---|
| `https://developer.android.com/reference/androidx/constraintlayout/core/motion/utils/TypedBundle prop` |   |
| `CustomVariable[] custom` |   |

### setKeyCycle

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

```
public void setKeyCycle(TypedBundle prop)
```

### setKeyPosition

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

```
public void setKeyPosition(TypedBundle prop)
```

### setPathRelative

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

```
public void setPathRelative(Transition.WidgetState widgetState)
```

### update

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

```
public void update(ConstraintWidget child, int state)
```