ViewPager - get a partial view of the next page

后端 未结 5 703
既然无缘
既然无缘 2020-12-07 11:32

I am trying to achieve this in a ViewPager

The first fragment (blue) is displayed and the beginning of the next fragment must be displayed as well, so the user under

5条回答
  •  执笔经年
    2020-12-07 12:07

    @Override
    public float getPageWidth(int position) {
        return 0.9f;
    }
    

    Use this, this will work perfectly and make sure that your class extended to PagerAdapter

提交回复
热议问题