<Why parent of fragment is null after pause?> I re...
# stackoverflow
u
Why parent of fragment is null after pause? I return to app after a long time pause in background, it crashing with null point exception when try to cast view.parent as View. Why fragment don't have parent after pause? class ToolboxSheetFragment : Fragment(R.layout.fragment_toolbox_sheet) { private lateinit var behavior: BottomSheetBehavior override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) behavior = BottomSheetBehavior.from(...