如何实现片段之间轻扫手势? [英] How to implement a swipe-gesture between Fragments?

查看:209
本文介绍了如何实现片段之间轻扫手势?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的那个我了Android Studio IDE中开发Android应用程序来实现。
不同的标签(片段)之间的刷卡。我试着在网上和在计算器上寻找,但我不太明白。
我的动作条是经典的一个与Android工程3.0以上
如果你能给我一些建议或援助等的例子,我将非常感激。
有了这个,我谢谢你。

I would like to implement in my android app that I'm developing with the Android studio ide. The swipe between the different tabs (fragment). I tried searching online and on StackOverflow but I could not quite understand. My action bar is the classic one that works with Android above 3.0 If you can give me some advice or examples of aid etc. I shall be very grateful. With this I thank you.

推荐答案

我想在 Android的ViewPager 是你正在寻找:

<一个href=\"http://developer.android.com/reference/android/support/v4/view/ViewPager.html\">http://developer.android.com/reference/android/support/v4/view/ViewPager.html

下面是关于如何实现它一个很好的教程

Here is a nice tutorial on how to implement it:

<一个href=\"http://developer.android.com/training/animation/screen-slide.html\">http://developer.android.com/training/animation/screen-slide.html

其基本思想是,你有多个片段,每个片段重新presenting
  不同的画面。
的ViewPager使用户之间的刷卡
  不同的片段,并显示不同的内容。

The basic idea is that you have multiple Fragments, each representing a different Screen. The ViewPager enables the user to swipe between the different Fragments and display different content.

另外看看这个问题:

<一个href=\"http://stackoverflow.com/questions/18413309/how-to-implement-a-viewpager-with-different-fragments-layouts/18413437#18413437\">How实施ViewPager不同片段/布局

和如何将支持库:<一href=\"http://developer.android.com/tools/support-library/setup.html\">http://developer.android.com/tools/support-library/setup.html

这篇关于如何实现片段之间轻扫手势?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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