Multiple pages at the same time on a ViewPager

前端 未结 8 1446
执念已碎
执念已碎 2020-12-07 09:58

Is there a possibility to display two pages at the same time, when using a ViewPager? I\'m not looking for an edge effect, but rather for two full

8条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-07 10:55

    I don't think that's possible with the limitations of a View Pager. It only allows a user to view pages 1 at a time. You might be able to work something out with the use of fragments, and have 2 ViewPager fragments side by side and use buttons to work out the page flipping you want to implement, but the code may become very complex.

    You can try something like a ViewFlipper - where you can do a lot more customizations (including animations).

    Hope this helps.

提交回复
热议问题