Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android NYTimes Swipe Animation/Gesture

The NYTimes has a very interesting page turning feature. You can swipe left to right / right to left to view other items (which is easy to implement). Even if you don't cross the threshold values the view moves with your finger and roll back to the initial view once you lift your finger. How do they do this?

Second: can this be done on a TabActivity?

Thanks

like image 823
Sameer Segal Avatar asked Nov 28 '10 09:11

Sameer Segal


1 Answers

  1. They most probably have a custom View.

    Take a look at Marc Reichelt's library: http://marcreichelt.blogspot.com/2010/09/android-use-realviewswitcher-to-switch.html

  2. It CAN be done, but this is not part of the core OS. You would probably need to extend TabHost/TabView.

like image 153
Peter Knego Avatar answered Oct 04 '22 21:10

Peter Knego