Custom swipe animation (Tilt, Card Deck, 3D, etc.)

damaxxed picture damaxxed · Mar 26, 2012 · Viewed 9.2k times · Source

How can I implement a custom swipe animation instead of the standard horizontal movement? I'm thinking about a mixture of ViewPager (swipe to scroll) and ViewFlipper (custom animation). It's important that the animation gives a live feedback to the user's finger movement, not just plays after a swipe has been completed.

Some examples:

Any idea on how to generally override the swipe animation in a ViewPager?

Answer

Bondax picture Bondax · Mar 26, 2012

You will have to override onTouchEvent(), onScroll() and the likes. Point is that the ViewPager's swipe is no animation but actually scrolls the views around. Animations wont work for you here is my bet.