简体   繁体   English

Android-滑动以浏览活动/列表视图项

[英]Android - Slide to navigate between activities/listview items

I'm working on a beginner Android project and has a ListView with a long list of items. 我正在研究一个初学者的Android项目,并且具有一个带有长项列表的ListView。 I would like to be able to slide to the left to go to the next Activity or slide to the right to go to the previous activity instead of always hitting the back button to view the entire list again. 我希望能够向左滑动以转到下一个活动,或者向右滑动以转到上一个活动,而不是总是单击后退按钮来再次查看整个列表。

Can anyone help me with a link to read on what I'm trying to do? 任何人都可以通过链接帮助我阅读我正在尝试做的事情吗? I've already searched for the past two days but it seems I'm using the wrong search terms so I've been reading things I don't really need. 我已经搜索了过去两天,但似乎我使用了错误的搜索词,因此我一直在阅读不需要的东西。

Thanks 谢谢

An easy way to go about this is to use fragments with a viewpager: 一个简单的方法是在viewpager中使用片段:

http://developer.android.com/training/implementing-navigation/lateral.html http://developer.android.com/training/implementing-navigation/lateral.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM