Stay organized with collections
Save and categorize content based on your preferences.
Camera.OnZoomChangeListener
public
static
interface
Camera.OnZoomChangeListener
android.hardware.Camera.OnZoomChangeListener
|
This interface was deprecated
in API level 21.
We recommend using the new android.hardware.camera2
API for new
applications.
Callback interface for zoom changes during a smooth zoom operation.
Summary
Public methods |
abstract
void
|
onZoomChange(int zoomValue, boolean stopped, Camera camera)
Called when the zoom value has changed during a smooth zoom.
|
Public methods
onZoomChange
public abstract void onZoomChange (int zoomValue,
boolean stopped,
Camera camera)
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](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nDeprecated in [API level\n21](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\nCamera.OnZoomChangeListener\n===========================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/hardware/Camera.OnZoomChangeListener \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\nstatic\n\n\ninterface\nCamera.OnZoomChangeListener\n`\n\n\n`\n\n\n`\n\n|----------------------------------------------|\n| android.hardware.Camera.OnZoomChangeListener |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\n\n**This interface was deprecated\nin API level 21.** \n\nWe recommend using the new [android.hardware.camera2](/reference/android/hardware/camera2/package-summary) API for new\napplications.\n\nCallback interface for zoom changes during a smooth zoom operation. \n**See also:**\n\n- [Camera.setZoomChangeListener(OnZoomChangeListener)](/reference/android/hardware/Camera#setZoomChangeListener(android.hardware.Camera.OnZoomChangeListener))\n- [Camera.startSmoothZoom(int)](/reference/android/hardware/Camera#startSmoothZoom(int))\n\nSummary\n-------\n\n| ### Public methods ||\n|------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract void` | ` `[onZoomChange](/reference/android/hardware/Camera.OnZoomChangeListener#onZoomChange(int,%20boolean,%20android.hardware.Camera))`(int zoomValue, boolean stopped, `[Camera](/reference/android/hardware/Camera)` 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](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract void onZoomChange (int zoomValue, \n boolean stopped, \n Camera camera)\n```\n\nCalled when the zoom value has changed during a smooth zoom.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-------------|---------------------------------------------------------------------------------------------------------------------------|\n| `zoomValue` | `int`: the current zoom value. In smooth zoom mode, camera calls this for every new zoom value. \u003cbr /\u003e |\n| `stopped` | `boolean`: whether smooth zoom is stopped. If the value is true, this is the last zoom update for the application. \u003cbr /\u003e |\n| `camera` | `Camera`: the Camera service object \u003cbr /\u003e |"]]