Two fragments on one page viewpager

I am currently very well using one snippet per page with a FragmentPagerAdapter pageview. But now I want to use two panel views inside the same page for a tablet. For example, the left side is a list view, and the right side is a grid. Does anyone know how I can achieve this? Many thanks!

+8
android android-fragments android-viewpager
source share
2 answers

Finally, I use two views in one fragment and manage the data myself. But I noticed that there is a new function in the support package and structure, so I can add a fragment inside the fragment. See the answer here: Fragment inside fragment

+1
source share

if you want to have something like a google market, you can create tow fragments yourself and then add code to adater

@Override public float getPageWidth(int position) { if (position == 0) { return(0.5f); } else { return (1.0f); } } 
0
source share

All Articles