查看寻呼机:更改默认方向

时间:2015-05-15 20:06:07

标签: android android-viewpager

已经问过类似的question

"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. "

但就我而言,问题有点不同。 我的第一页必须包含商品列表。在该列表视图中,我添加了一项功能----您从右向左滑动项目,它会显示某些选项,如iOS。因此,默认的视图寻呼机行为会与此列表行为产生冲突。

我的ViewPager包含2个片段。片段1包含项目列表。片段2包含项目详细信息。 我不能set current item作为第二个片段。

尝试过gesturelistner,有了它我可以获得滑动的方向,但无法逆转它。

所以我需要反转viewpager的默认滑动方向。

0 个答案:

没有答案