pdj pdj - 1 year ago 105
Android Question

Parallax Effect in Android's ViewPager

I'm trying to emulate a parallax effect when sliding through my fragments, I've read about beginFakeDrag and fakeDragBy but to be honest, I don't know even if it's the best approach to my problem.

Anyone has done something similar with the ViewPager or have a hint about how should I approach this?

Thank you

Answer Source

This question is a bit old, but I found it when I was trying to do exactly that...

I implemented my own solution, basically extending ViewPager and overriding onDraw.

You can find all the code with a simple example here

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download