setPageTransformer
Sets a PageTransformer that will be called for each attached page whenever the scroll position is changed. This allows the application to apply custom property transformations to each page, overriding the default sliding behavior.
Note: By default, calling this method will cause contained pages to use LAYER_TYPE_HARDWARE. This layer type allows custom alpha transformations, but it will cause issues if any of your pages contain a android.view.SurfaceView and you have not called setZOrderOnTop to put that android.view.SurfaceView above your app content. To disable this behavior, call setPageTransformer and pass LAYER_TYPE_NONE for pageLayerType
.
Parameters
true if the supplied PageTransformer requires page views to be drawn from last to first instead of first to last.
PageTransformer that will modify each page's animation properties
Sets a PageTransformer that will be called for each attached page whenever the scroll position is changed. This allows the application to apply custom property transformations to each page, overriding the default sliding behavior.
Parameters
true if the supplied PageTransformer requires page views to be drawn from last to first instead of first to last.
PageTransformer that will modify each page's animation properties
View layer type that should be used for ViewPager pages. It should be either LAYER_TYPE_HARDWARE, LAYER_TYPE_SOFTWARE, or LAYER_TYPE_NONE.