how to reverse the direction of viewPager to left to right order?(如何将 viewPager 的方向反转为从左到右的顺序?)
问题描述
我有几个视图的 viewPager.viewPager 的默认行为是首先显示第一项,然后从右向左滑动显示第二个视图,以此类推.
I have viewPager with several views. the default behavior of viewPager is that the first item is displayed first, then swiping right to left displays the second view right to the current view etc.
我想要的行为是在显示第一个项目后,从左向右滑动将显示下一个视图从左到当前项目.
the behavior i want is that after the first item is displayed, swiping left to right will display the next view left to the current item.
我搜索了很多聪明的方法来实现这个但没有结果..
提前致谢.
i searched a lot for clever way to implement this but no results..
thanks in advance.
推荐答案
你为什么不反转你在视图分页器中查看的列表并使用 setCurrentItem(int) 或 setCurrentItem(int,boolean) 并在活动/片段启动时设置最后一个..
why don't you reverse the list of you view in view pager and use setCurrentItem(int) or setCurrentItem(int,boolean) and set the last one at the launch of the activity/fragment..
这篇关于如何将 viewPager 的方向反转为从左到右的顺序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何将 viewPager 的方向反转为从左到右的顺序?
基础教程推荐
- 如何从 logcat 中删除旧数据? 2022-01-01
- AdMob 广告未在模拟器中显示 2022-01-01
- iOS4 创建后台定时器 2022-01-01
- 通过重定向链接在 Google Play 中打开应用 2022-01-01
- Cocos2d iPhone 非矩形精灵触摸检测 2022-01-01
- iPhone - 获取给定地点/时区的当前日期和时间并将其与同一地点的另一个日期/时间进行比较的正确方法 2022-01-01
- NSString intValue 不能用于检索电话号码 2022-01-01
- Android:getLastKnownLocation(LocationManager.NETWORK_PROVIDER 2022-01-01
- navigator.geolocation.getCurrentPosition 在 Android 浏览器上 2022-01-01
- libGDX 从精灵或纹理中获取像素颜色 2022-01-01
