com.ToxicBakery.viewpager.transforms / ABaseTransformer / onPreTransform

onPreTransform

protected open fun onPreTransform(page: View, position: Float): Unit

Called each .transformPage before {.onTransform.

The default implementation attempts to reset all view properties. This is useful when toggling transforms that do not modify the same page properties. For instance changing from a transformation that applies rotation to a transformation that fades can inadvertently leave a fragment stuck with a rotation or with some degree of applied alpha.

Parameters

page - Apply the transformation to this page

position - Position of page relative to the current front-and-center position of the pager. 0 is front and center. 1 is one full page position to the right, and -1 is one page position to the left.