library / com.otaliastudios.zoom / ZoomEngine / Listener

Listener

interface Listener

An interface to listen for updates in the inner matrix. This will be called typically on animation frames.

Functions

onIdle

abstract fun onIdle(engine: ZoomEngine): Unit

Notifies that the engine is in an idle state. This means that (most probably) running animations have completed and there are no touch actions in place.

onUpdate

abstract fun onUpdate(engine: ZoomEngine, matrix: Matrix): Unit

Notifies that the inner matrix was updated. The passed matrix can be changed, but is not guaranteed to be stable. For a long lasting value it is recommended to make a copy of it using Matrix.set.

Inheritors

SimpleListener

abstract class SimpleListener : Listener

A simple implementation of Listener that will extract the translation and scale values from the output matrix.