Stay organized with collections
Save and categorize content based on your preferences.
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.
|
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# TransformationCallback\n======================\n\n\n`\npublic\n\n\ninterface\nTransformationCallback\n`\n\n\n`\n\n\n`\n\n|---------------------------------------------------------------------------------------------|\n| com.google.android.material.animation.TransformationCallback\\\u003cT extends android.view.View\\\u003e |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nCallback to be invoked when the view undergoes a transformation (e.g., translation or scale).\nThis is particularly useful to react to animations applied to a view, such as the cutout of the\n[BottomAppBar](/reference/com/google/android/material/bottomappbar/BottomAppBar) reacting to the [FloatingActionButton](/reference/com/google/android/material/floatingactionbutton/FloatingActionButton).\n\nSummary\n-------\n\n| ### Public methods ||\n|------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract void` | ` `[onScaleChanged](/reference/com/google/android/material/animation/TransformationCallback#onScaleChanged(T))`(T view) ` Called when the view has been scaled. |\n| ` abstract void` | ` `[onTranslationChanged](/reference/com/google/android/material/animation/TransformationCallback#onTranslationChanged(T))`(T view) ` Called when the view has been translated. |\n\nPublic methods\n--------------\n\n### onScaleChanged\n\n```\npublic abstract void onScaleChanged (T view)\n```\n\nCalled when the view has been scaled.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|--------|---------------------------------------|\n| `view` | `T`: the view that was scaled. \u003cbr /\u003e |\n\n### onTranslationChanged\n\n```\npublic abstract void onTranslationChanged (T view)\n```\n\nCalled when the view has been translated.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|--------|-------------------------------------------|\n| `view` | `T`: the view that was translated. \u003cbr /\u003e |"]]