“主屏幕”类似 Android 上视图切换时的效果

发布于 2024-12-11 19:26:02 字数 331 浏览 0 评论 0原文

我正在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

浅浅淡淡 2024-12-18 19:26:02

我认为您正在寻找 ViewPager。它是兼容性库的一部分。

I think you're looking for the ViewPager. It's part of the compatibility library.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文