Use the method newInstance() instead of an contructor to instantiate the GenericFragment, in onder to instantiate the right implementation of the class.