Skip to content Skip to sidebar Skip to footer

Android Parallax - Offsetpixel

I am trying to design a complicated parallaxing animation that resides inside a ViewPager. The animation uses onPageScrolled function's offsetPixel to calculate the position of the

Solution 1:

Well, I don't know exactly if one of the pages has to have the parallax effect, or it has to been a parallax effect between de transition of changing pages.

I developed a small library to make the second one, https://github.com/xgc1986/ParallaxPagerLibrary

Demo: parallax demo

This library work with Views, the you can use it with imageViews to have the effect.

To do that I don't use de onPageScrolled function, basically then you don't permit to the developer to use this listener anymore, the to solve that I implemented a child of PageTransformer

Post a Comment for "Android Parallax - Offsetpixel"