Fragment frag = new MyFragment();
frag.setArguments(page);
Will do the same as the Fragment.instantiate
line.
Instantiate
should only be used when you don't have a source code dependency to the fragment. i.e. you only have a String
name of the class, not access to the class itself.
The cause is unclear, but it could be that MyFragment
is a v11 fragment, and you try to create it with a v4 Fragment.instantiate
.