getViewLifecycleOwner() in DialogFragment leads to crash
This happens because of how the DialogFragment is created. If you use onCreateDialog() than a slightly different lifecycle is used for this type of Fragment. The onCreateView() will not be used, thus the viewLifecycleOwner for this Fragment won’t be initialized. As a workaround for this, you can use the Fragment instance as the owner for … Read more