Android NYTimes 滑动动画/手势
纽约时报有一个非常有趣的翻页功能。您可以从左向右/从右向左滑动来查看其他项目(这很容易实现)。即使您没有超过阈值,视图也会随着您的手指移动,并在您抬起手指后回滚到初始视图。他们是如何做到这一点的?
第二:这可以在 TabActivity 上完成吗?
谢谢
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我制作了 Marc 的 RealViewSwitcher 的修改版本,其中包含“选项卡式”用法的演示(使用 RadioGroup,如果您愿意,可以轻松将其皮肤设置为看起来像传统选项卡)。它可以在 github 上找到。
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.
如果您谈论的是《纽约时报》Android 应用程序文章活动,我们不会做任何特别的事情,它只是一个视图寻呼机。这是一个链接,介绍它如何与我们的应用程序中的标签栏一起使用。 https://developer.android.com/training/implementing-navigation/terior。 html
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
他们很可能有一个自定义视图。
看看 Marc Reichelt 的库:http ://marcreichelt.blogspot.com/2010/09/android-use-realviewswitcher-to-switch.html
可以做到,但这不是核心操作系统的一部分。您可能需要扩展 TabHost/TabView。
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
It CAN be done, but this is not part of the core OS. You would probably need to extend TabHost/TabView.