View paste
I have a question regarding the pattern for passing arguments to a fragment of using a static factory method. As I understand it, if you call Fragment#setArguments() in the factory method, the arguments will be preserved across rotations.
I'm wondering why the pattern is to use a static factory method rather than a constructor with arguments. I realize that there needs to be a constructor with no arguments available to the framework to recreate the fragment. But why not have two constructors, one with arguments (in which you call Fragment#setArguments() ) and one without, instead of a constructor with no arguments and the static factory method? Is there something special about the factory method or is this simply a convention?