“主屏幕”类似 Android 上视图切换时的效果
我正在 Android 上创建一个类似于书籍的应用程序。我只是希望在视图(而不是活动)之间具有类似于主屏幕的滚动效果。目前我正在使用 ViewFlipper
并且没有我想要的动画,因为移动是突然的而不是跟随你的手指。
我知道有几个开源项目和类正在开发,以便个人程序员更容易地实现这样的事情,但想知道是否有一种我可能忽略的方法来实现主屏幕式效果。我想到使用的另一种选择是 TabView,页面内容上方没有显示标签选项卡,但尚未深入研究此选项。
如果有人遇到同样的障碍并且有任何克服它的想法,我会给你买披萨! (不是真的......我不知道你的地址)但我会非常感激! :)
谢谢
I'm creating an application on android similar to that of a book. I would simply like to have the scrolling effect between views (not activities) similar to that of the home screen. Currently I am using a ViewFlipper
and don't have the animation I would like, since the shift is sudden as opposed to following your finger.
I am aware that there are several opensource projects and classes being developed to achieve such a thing more easily for the individual programmer, but wondered if there was a way I may have overlooked to implement a homescreen-esque effect. An alternative which I have thought of using would be a TabView
, with no label tabs being displayed above the content of the page, yet have not heavily looked into this option yet.
If anyone has encountered the same hurdle and has any ideas of how to overcome it, I will buy you a pizza! (Not really... I don't know your address) But I'd be very appreciative! :)
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为您正在寻找
ViewPager
。它是兼容性库的一部分。I think you're looking for the
ViewPager
. It's part of the compatibility library.