在同一时间上的ViewPager多个页面

编程入门 行业动态 更新时间:2024-10-12 01:30:58
本文介绍了在同一时间上的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多个页面

本文发布于:2023-11-24 00:28:40,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1623315.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:多个   页面   时间   在同一   ViewPager

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!