滑动在Android的活动 [英] Swipe for activities in Android

查看:141
本文介绍了滑动在Android的活动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想建立中,我想通过刷卡,比如说去一个新的网页应用程序。我有大约10个不同的页面,我想通过滑动到去这些网页。我可以实现这些页面作为单独的活动?我可以从一个活动轻扫到另一个?我强烈希望实现单独的XML文件,这些页面,而不是建立在一个单独的XML页面的一切。但正如我已搜查远,没有适当的教程或博客给予实施刷卡程序的适当例子。如果可能的话,提供一些工作codeS。
先谢谢了。

I am trying to build an app in which I want to go to a new page through swipe-say. I have about 10 different pages and I want to go to these pages by swiping. Can I implement these pages as separate activities? Can I swipe from one activity to another? I strongly like to implement these pages in seperate xml files rather than creating everything in a single xml page. But as far as I have searched, there are no proper tutorials or blogs giving an appropriate example of a program implementing swipe. If possible, provide some working codes. Thanks in advance.

推荐答案

看来,一个的 FragmentPager 是你想要的。
示例和code链接的页面上。结果
如果你建立了早期版本的Andr​​oid,必要的code列入href=\"http://developer.android.com/sdk/compatibility-library.html\" rel=\"nofollow\">支持Android的

It seems that a FragmentPager is what you want. Examples and code on the linked page.
If you build for earlier versions of Android, the necessary code is included in the Android Support Package.

这篇关于滑动在Android的活动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆