Android NYTimes Swipe Animation/Gesture
Asked Answered
B

3

5

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

Bentlee answered 28/11, 2010 at 9:32 Comment(0)
U
3
  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.

Urn answered 28/11, 2010 at 10:1 Comment(0)
A
2

I've made a modified version of Marc's RealViewSwitcher that comes with demos that include "tabbed" usage (using a RadioGroup, which can be easily skinned to look like conventional tabs if you so choose). It's available on github.

Allium answered 21/2, 2011 at 17:51 Comment(0)
W
2

If you are talking about the NY Times Android App Article Activity we don't do anything special it is simply a view pager. Here's a link to how it works with a tabbar like within our app. https://developer.android.com/training/implementing-navigation/lateral.html

Watchcase answered 21/6, 2017 at 18:27 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.