Skip to content

getRootView returns null when used with FragmentStatePagerAdapter #1

@airtel121

Description

@airtel121

I want to update fragment dynamically but its not work with FragmentPagerAdapter so i just change it to FragmentStatePagerAdapter but issue is that getRootView() returns null when used with FragmentStatePagerAdapter.so how to get below method to work when used FragmentStatePagerAdapter.

private MyLinearLayout getRootView(int position)
{
        return (MyLinearLayout) 
                fm.findFragmentByTag(this.getFragmentTag(position))
                .getView().findViewById(R.id.root);
}

or suggest me demo to update fragment dynamically with for SimpleInfiniteCarousel.

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