Stay organized with collections
Save and categorize content based on your preferences.
OnZoomChangeListener
interface OnZoomChangeListener
Callback interface for zoom changes during a smooth zoom operation.
Summary
Public methods |
abstract Unit |
Called when the zoom value has changed during a smooth zoom.
|
Public methods
onZoomChange
abstract fun onZoomChange(
zoomValue: Int,
stopped: Boolean,
camera: Camera!
): Unit
Deprecated: Deprecated in Java.
Called when the zoom value has changed during a smooth zoom.
Parameters |
zoomValue |
Int: the current zoom value. In smooth zoom mode, camera calls this for every new zoom value. |
stopped |
Boolean: whether smooth zoom is stopped. If the value is true, this is the last zoom update for the application. |
camera |
Camera!: the Camera service object |
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,["# Camera.OnZoomChangeListener\n\nAdded in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nDeprecated in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nOnZoomChangeListener\n====================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/hardware/Camera.OnZoomChangeListener \"View this page in Java\") \n\n```\ninterface OnZoomChangeListener\n```\n\n|---------------------------------------------------|\n| [android.hardware.Camera.OnZoomChangeListener](#) |\n\n*** ** * ** ***\n\n| **This interface was deprecated in API level 21.**\n|\n| We recommend using the new [android.hardware.camera2](/reference/kotlin/android/hardware/camera2/package-summary) API for new applications.\n\nCallback interface for zoom changes during a smooth zoom operation.\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onZoomChange](#onZoomChange(kotlin.Int,%20kotlin.Boolean,%20android.hardware.Camera))`(`zoomValue:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `stopped:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`, `camera:` `[Camera](/reference/kotlin/android/hardware/Camera)!`)` Called when the zoom value has changed during a smooth zoom. |\n\nPublic methods\n--------------\n\n### onZoomChange\n\nAdded in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onZoomChange(\n zoomValue: Int, \n stopped: Boolean, \n camera: Camera!\n): Unit\n```\n\n**Deprecated:** *Deprecated in Java.*\n\nCalled when the zoom value has changed during a smooth zoom.\n\n| Parameters ||\n|-------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `zoomValue` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): the current zoom value. In smooth zoom mode, camera calls this for every new zoom value. |\n| `stopped` | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html): whether smooth zoom is stopped. If the value is true, this is the last zoom update for the application. |\n| `camera` | [Camera](/reference/kotlin/android/hardware/Camera)!: the Camera service object |"]]