在同一时间上的ViewPager多个页面 [英] Multiple pages at the same time on a ViewPager

查看:210
本文介绍了在同一时间上的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.

更多信息: <一href="http://developer.android.com/reference/android/support/v4/view/PagerAdapter.html#getPageWidth(int">http://developer.android.com/reference/android/support/v4/view/PagerAdapter.html#getPageWidth(int)

这篇关于在同一时间上的ViewPager多个页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆