According to Android developers website, "Every fragment must have an empty constructor, so it can be instantiated when restoring its activity's state". So in the new sample projects they have the fragment instantiation like following:
public static class PlaceHolderFragment extends Fragment {
public PlaceHolderFragment() {}
...
}
Is this necessary (encouraged?) for non-static fragment classes? Actually, I don't quite understand how the empty constructor will help restoring the activity state. I have numerous custom dialog fragments without the empty constructor, but there are no issues with them. What are the possible consequences if I don't supply an empty constructor for the extended fragments?