Android 12 Developer Preview is here! Try it out, and give us your feedback!

TransformationCallback

public interface TransformationCallback

com.google.android.material.animation.TransformationCallback<T extends android.view.View>


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 BottomAppBar reacting to the FloatingActionButton.

Summary

Public methods

abstract void onScaleChanged(T view)

Called when the view has been scaled.

abstract void onTranslationChanged(T view)

Called when the view has been translated.

Public methods

onScaleChanged

public abstract void onScaleChanged (T view)

Called when the view has been scaled.

Parameters
view T: the view that was scaled.

onTranslationChanged

public abstract void onTranslationChanged (T view)

Called when the view has been translated.

Parameters
view T: the view that was translated.