library / com.otaliastudios.zoom / ZoomEngine / setContainerSize

setContainerSize

@JvmOverloads fun setContainerSize(width: Float, height: Float, applyTransformation: Boolean = false): Unit

Sets the size of the container view. Normally you don't need to call this because the size is detected from the container passed to the constructor using a global layout listener.

However, there are cases where you might want to update it, for example during View.onSizeChanged (called during shared element transitions).

Parameters

width - the container width

height - the container height

applyTransformation - whether to apply the transformation defined by setTransformation