Skip to content

VerticalPagerAdapter extends FragmentPagerAdapter #4

@DanChaltiel

Description

@DanChaltiel

Hi,

In your example, there could be a way VerticalPagerAdapter could extend FragmentPagerAdapter.

For now, I have to override your instantiateItem() like this :

pager.setAdapter(new DoubleViewPagerAdapter(getApplicationContext(), verticalAdapters){
    @Override
    public Object instantiateItem(final ViewGroup container, int position) {
        VerticalViewPager childVP = (VerticalViewPager) super.instantiateItem(container, position);
        childVP.setId(R.id.dummyId);
        return childVP;
    }
});

This way I dont have an error at instantiation, but the horizontal swiping is not working yet.

Maybe you can change your code and set childVP an id ?
ViewPagers need an id to work with fragments.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions