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

问题描述

我想实现一个ViewPager有多个活动。我下面这个例如但这并不外观,使用多个活动,但碎片。如果任何人都可以解释我如何实现这一点。我要的是在不同屏幕之间滚动,每个画面做自己的工作。

感谢。

解决方案

我怀疑这是可能的,而且在某种程度上,它是,它会使用去precated技术,如的ActivityGroup

使用片段,@Glendon Trullinger建议。

使用您连接到示例。还是看看 Support13Demos 在SDK中的演员/ 文件夹树,这表明 ViewPager 。当你的的具体具体的的关于使用片段,问另外一个问题在这里StackOverflow的。问题

I'm trying to implement a ViewPager that have multiple activities. I'm following this example but this doesnt look that uses multiple activities, but Fragments. If anyone can explain me how to implement this. What I want is to scroll between different screens, and each screen does its own job.

Thanks.

解决方案

I doubt this is possible, and to the extent that it is, it would use deprecated techniques like ActivityGroup.

Use fragments, as @Glendon Trullinger suggested.

Use the example that you linked to. Or look at the Support13Demos in your SDK's extras/ folder tree, which demonstrate ViewPager. When you have specific, concrete questions regarding the use of fragments, ask another question here on StackOverflow.

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

08-21 09:40