问题
I have an activity with 2 fragments, it uses a ViewPager and a FragmentPagerAdapter.
Now it shows only one fragment at a time, I would like to show the fragments a bit overlapped, like in this link.
Is it possible to do this without changing structure? In other words, without using MultiPaneLayout or something like that?
Thanks everyone
回答1:
Try this,It may clears ur problem
ViewPager examplePager = (ViewPager) findViewById(R.id.exampleView);
examplePager.setPageMargin(-50);
examplePager.setHorizontalFadingEdgeEnabled(true);
examplePager.setFadingEdgeLength(30);
来源:https://stackoverflow.com/questions/18719348/showing-fragment-in-viewpager-overlapped