Android Dev Summit, October 23-24: two days of technical content, directly from the Android team. Sign-up for livestream updates.

CompositePageTransformer

class CompositePageTransformer : ViewPager2.PageTransformer
kotlin.Any
   ↳ androidx.viewpager2.widget.CompositePageTransformer

Allows for combining multiple PageTransformer objects.

Summary

Public constructors

Allows for combining multiple PageTransformer objects.

Public methods

Unit

Adds a page transformer to the list.

Unit

Removes a page transformer from the list.

Unit
transformPage(@NonNull page: View, position: Float)

Public constructors

<init>

CompositePageTransformer()

Allows for combining multiple PageTransformer objects.

Public methods

addTransformer

fun addTransformer(@NonNull transformer: ViewPager2.PageTransformer): Unit

Adds a page transformer to the list.

Transformers will be executed in the order that they were added.

removeTransformer

fun removeTransformer(@NonNull transformer: ViewPager2.PageTransformer): Unit

Removes a page transformer from the list.

transformPage

fun transformPage(@NonNull page: View, position: Float): Unit