Boolean: The direction of the zoom: true to zoom in, false to zoom out.
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.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# ZoomButtonsController.OnZoomListener\n\nAdded in [API level 4](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nDeprecated in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nOnZoomListener\n==============\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/widget/ZoomButtonsController.OnZoomListener \"View this page in Java\") \n\n```\ninterface OnZoomListener\n```\n\n|----------------------------------------------------------|\n| [android.widget.ZoomButtonsController.OnZoomListener](#) |\n\n*** ** * ** ***\n\n| **This interface was deprecated in API level 29.**\n|\n| Deprecated in Java.\n\nInterface that will be called when the user performs an interaction that triggers some action, for example zooming.\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onVisibilityChanged](#onVisibilityChanged(kotlin.Boolean))`(`visible:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`)` Called when the zoom controls' visibility changes. |\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onZoom](#onZoom(kotlin.Boolean))`(`zoomIn:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`)` Called when the owner view needs to be zoomed. |\n\nPublic methods\n--------------\n\n### onVisibilityChanged\n\nAdded in [API level 4](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onVisibilityChanged(visible: Boolean): Unit\n```\n\n**Deprecated:** *Deprecated in Java.*\n\nCalled when the zoom controls' visibility changes.\n\n| Parameters ||\n|-----------|----------------------------------------------------------------------------------------------------------------------------|\n| `visible` | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html): Whether the zoom controls are visible. |\n\n### onZoom\n\nAdded in [API level 4](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onZoom(zoomIn: Boolean): Unit\n```\n\n**Deprecated:** *Deprecated in Java.*\n\nCalled when the owner view needs to be zoomed.\n\n| Parameters ||\n|----------|----------------------------------------------------------------------------------------------------------------------------------------------------|\n| `zoomIn` | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html): The direction of the zoom: true to zoom in, false to zoom out. |"]]