I am learning about Fragment
in Android development. So the question is which approach is better to use for passing arguments from an Activity
to a Fragment
:
fragment.setArguments(args);
or
MyFragment.newInstance(args);
Or it does not matter which one to use? Thanks for your efforts.