开发者

Using multiple fragments in each screen in ViewPager

I have been trying the ViewPager from recently supported android compatibility v4 package.

In my app, I have multiple screens which I would like to swipe across just like what ViewPager does. But in my app, I have multiple fragments in EACH single screen. In the ViewPager, the FragmentPagerAdapter seems to be for the purpose of using multiple screens, each with single fragment.

I am wondering if there is anyway I could use the current support package for my current requirement? Or I need to go back to the same android launcher src to reference the home screen behavior an开发者_高级运维d design my own custom control.


PagerAdapters are a generic idea not strictly tied to fragments at all. FragmentPagerAdapter adds the association and rules for how a fragment maps to a page. You could write a similar adapter that presents multiple fragments per page and controls their layout within a container view.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜