Fragments which can be used without defining a user interface.
Description
Headless fragment are typically used to encapsulate some state across configuration changes or for a background processing task. For this purpose you would set your headless fragment to be retained.
Fragments can be used without defining a user interface.
To implement a headless fragment, simply return null in the onCreateView() method of your fragment.
It is recommended to use headless fragments for your background processing in combination with the setRetainInstance() method. This way you don't have to handle the configuration changes during your asynchronous processing yourself.
Link