State of Compose 2023 results are in! Click here to learn more

← Back to Foundation

ZoomableState

Component
in
Foundation
. Since 0.1.0-dev15

Overview

Code Examples

Create ZoomableState with default AnimationClockObservable.

@param onZoomDelta callback to be invoked when pinch/smooth zooming occurs. The callback receives the delta as the ratio of the new size compared to the old. Callers should update their state and UI in this callback.

Overloads

ZoomableState

@Composable
fun ZoomableState(onZoomDelta: (Float) -> Unit)

Parameters

NameDescription
onZoomDeltacallback to be invoked when pinch/smooth zooming occurs. The callback receives the delta as the ratio of the new size compared to the old. Callers should update their state and UI in this callback