FragmentStatePageAdapter: Multiple Items visible at the same time - How to center a specific page?

Viewed 231

I'd like to use a FragmentStatePageAdapter and display 3 items at the same time. This could be done by overriding the getPageWidth()-Method:

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

This works great. But my problem is that I'd now like to have the centered page in focus. Currently the left page is in focus...

I've visualized the problem:

Currently:Current Pager

Desired: Desired Pager

Desired 2 (If you scroll until the end): Desired Page 2

What would you suggest?

1 Answers
Related