English 中文(简体)
机器人如何通过擦擦手势 改变观众群
原标题:Android How to implement a change of viewgroup by swipe gesture

当使用 gmail 或 greader 时, 您可以通过发条手势从一个消息/ 新闻转到下一个/ 上一个/ 前一个 。

我想知道这种行为如何得到最好的执行? 是否有某种内在观点这样做,或者我应该选择来源和目的地观点,并在两者之间过渡?

任何代码例子 周围为这个?

此外,让我们说我想从一个列表切换到第二个列表。 当在平板板上我要同时显示两个列表时。 这是典型的碎片使用吗? 但是, 如何执行筛选?

最佳回答

您需要查看 < a href=> http:// developmenter.android.com/ reference/android/support/v4/view/ViewPager.html" rel="no follow"\ code>ViewPager 。 开发者博客条目 http://android-Developers.blogspot.in/2011/08/holitonal-view-swipping- with-viewpager.html" rel=“no following" >Viorizontal Viewspide Swiping with ViewPager 提供简要概述和样本来源。

我想从列表切换到第二个列表。 当在平板板上我要同时显示两个列表。 这是典型的碎片使用吗?

在上述使用情况下最好使用 Fradiment

问题回答

暂无回答




相关问题
Android - ListView fling gesture triggers context menu

I m relatively new to Android development. I m developing an app with a ListView. I ve followed the info in #1338475 and have my app recognizing the fling gesture, but after the gesture is complete, ...

AsyncTask and error handling on Android

I m converting my code from using Handler to AsyncTask. The latter is great at what it does - asynchronous updates and handling of results in the main UI thread. What s unclear to me is how to handle ...

Android intent filter for a particular file extension?

I want to be able to download a file with a particular extension from the net, and have it passed to my application to deal with it, but I haven t been able to figure out the intent filter. The ...

Android & Web: What is the equivalent style for the web?

I am quite impressed by the workflow I follow when developing Android applications: Define a layout in an xml file and then write all the code in a code-behind style. Is there an equivalent style for ...

TiledLayer equivalent in Android [duplicate]

To draw landscapes, backgrounds with patterns etc, we used TiledLayer in J2ME. Is there an android counterpart for that. Does android provide an option to set such tiled patterns in the layout XML?

Using Repo with Msysgit

When following the Android Open Source Project instructions on installing repo for use with Git, after running the repo init command, I run into this error: /c/Users/Andrew Rabon/bin/repo: line ...

Android "single top" launch mode and onNewIntent method

I read in the Android documentation that by setting my Activity s launchMode property to singleTop OR by adding the FLAG_ACTIVITY_SINGLE_TOP flag to my Intent, that calling startActivity(intent) would ...

From Web Development to Android Development

I have pretty good skills in PHP , Mysql and Javascript for a junior developer. If I wanted to try my hand as Android Development do you think I might find it tough ? Also what new languages would I ...

热门标签