本文介绍了在同一时间上的ViewPager多个页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有一种可能性,以显示两页在同一时间,当使用 ViewPager ?我不是在寻找一个边缘效应,而是两个完全页在同一时间。
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 pages at the same time.
在此先感谢。
推荐答案请看看在 getPageWidth 方法在相应的 PagerAdapter 。覆盖它并返回例如 0.8f 将所有子页面仅跨越80%的ViewPager的宽度。
Please have a look at the getPageWidth Method in the corresponding PagerAdapter. Override it and return e.g. 0.8f to have all child pages span only 80% of the ViewPager's width.
更多信息: developer.android/reference/android/support/v4/view/PagerAdapter.html#getPageWidth(int)
更多推荐
在同一时间上的ViewPager多个页面
发布评论