# TransformationCallback

[View Source](https://github.com/material-components/material-components-android/blob/1.14.0/lib/java/com/google/android/material/animation/TransformationCallback.java)

*** ** * ** ***


```
public interface TransformationCallback<T extends View>
```

<br />

*** ** * ** ***

Callback to be invoked when the view undergoes a transformation (e.g., translation or scale). This is particularly useful to react to animations applied to a view, such as the cutout of the `https://developer.android.com/reference/com/google/android/material/bottomappbar/BottomAppBar` reacting to the `https://developer.android.com/reference/com/google/android/material/floatingactionbutton/FloatingActionButton`.

## Summary

| ### Public methods |
|---|---|
| `abstract void` | `https://developer.android.com/reference/com/google/android/material/animation/TransformationCallback#onScaleChanged(T)(T view)` Called when the view has been scaled. |
| `abstract void` | `https://developer.android.com/reference/com/google/android/material/animation/TransformationCallback#onTranslationChanged(T)(T view)` Called when the view has been translated. |

## Public methods

### onScaleChanged

```
abstract void onScaleChanged(T view)
```

Called when the view has been scaled.

| Parameters |
|---|---|
| `T view` | the view that was scaled. |

### onTranslationChanged

```
abstract void onTranslationChanged(T view)
```

Called when the view has been translated.

| Parameters |
|---|---|
| `T view` | the view that was translated. |