Function

scale

Sends a scale event with the given scaleFactor.

scale

Source set: Common
public fun TrackpadInjectionScope.scale(
    @FloatRange(from = 0.0, fromInclusive = false) scaleFactor: Float
)

Sends a scale event with the given scaleFactor. The event will be sent starting at the current event time.

The scaleFactor is a multiplicative zoom factor. A scaleFactor of 1 represents no change. A scaleFactor less than 1 represents a "zoom out" gesture, while a factor of more than one represents a "zoom in" gesture.

Parameters

scaleFactor The amount to scale.
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: