CompositePageTransformer
class CompositePageTransformer : ViewPager2.PageTransformer
Allows for combining multiple PageTransformer objects.
| See also | |
|---|---|
setPageTransformer |
|
MarginPageTransformer |
Summary
Public constructors |
|---|
Public functions |
|
|---|---|
Unit |
addTransformer(transformer: ViewPager2.PageTransformer)Adds a page transformer to the list. |
Unit |
removeTransformer(transformer: ViewPager2.PageTransformer)Removes a page transformer from the list. |
Unit |
transformPage(page: View, position: Float)Apply a property transformation to the given page. |
Public constructors
Public functions
addTransformer
fun addTransformer(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(transformer: ViewPager2.PageTransformer): Unit
Removes a page transformer from the list.
transformPage
fun transformPage(page: View, position: Float): Unit
Apply a property transformation to the given page.
| Parameters | |
|---|---|
page: View |
Apply the transformation to this page |
position: Float |
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 -2 is two pages to the left. Minimum / maximum observed values depend on how many pages we keep attached, which depends on offscreenPageLimit. |
| See also | |
|---|---|
setOffscreenPageLimit |