Package-level declarations

Types

Link copied to clipboard

Implement this interface for reacting to double clicks on Modifier.zoomable's content. By default, ToggleBetweenMinAndMax is used.

Link copied to clipboard

Detects zoom and pan events made using keyboard and mouse shortcuts.

Link copied to clipboard
class HardwareShortcutsSpec(val enabled: Boolean = true, val shortcutDetector: HardwareShortcutDetector = HardwareShortcutDetector.Default)

Describes how keyboard and mouse shortcuts are handled. When enabled, Modifier.zoomable's content will participate in the focus system to receive hardware events.

Link copied to clipboard

Modifier.zoomable uses ZoomableContentLocation to understand the content's visual size and position in order to prevent it from going out of bounds during pan & zoom gestures.

Link copied to clipboard

Graphics transformations generated by Modifier.zoomable when pan & zoom gestures are received.

Link copied to clipboard
Link copied to clipboard
class ZoomSpec(val maxZoomFactor: Float = 2.0f, val preventOverOrUnderZoom: Boolean = true)

Functions

Link copied to clipboard
fun rememberZoomableState(zoomSpec: ZoomSpec = ZoomSpec(), autoApplyTransformations: Boolean = true, hardwareShortcutsSpec: HardwareShortcutsSpec = HardwareShortcutsSpec()): ZoomableState

Create a ZoomableState that can be used with Modifier.zoomable.

Link copied to clipboard
fun Modifier.zoomable(state: ZoomableState, enabled: Boolean = true, onClick: (Offset) -> Unit? = null, onLongClick: (Offset) -> Unit? = null, clipToBounds: Boolean = true, onDoubleClick: DoubleClickToZoomListener = DoubleClickToZoomListener.ToggleBetweenMinAndMax): Modifier

A Modifier for handling pan & zoom gestures, designed to be shared across all your media composables so that your users can use the same familiar gestures throughout your app. It offers,