I want to enforce the factory pattern for certain Fragment, since according to this question, it's the way to go for passing data to Fragments.
However, to enforce it, me must prevent instantiating the fragment. The way to do this is making the constructor private, according to this question.
The problem is that I get this error: could not find Fragment constructor
According to this question, All Fragment classes you create must have a public, no-arg constructor.
So apparently I cannot make the constructor private. So how can I enforce the Factory pattern?