I have a BottomSheetDialogFragment that creates another child Fragment as its main view.
BottomSheetDialogFragment
Fragment
That child navigates to another Fragment as follows: fragmentManager?.beginTransaction()?.replace(R.id.fragmentContainer, fragment)?.addToBackStack("tag")?.commit()
fragmentManager?.beginTransaction()?.replace(R.id.fragmentContainer, fragment)?.addToBackStack("tag")?.commit()
but when I press the back button the whole dialog is dismissed.
So is it possible to have a back stack in a BottomSheetDialogFragment?
1.4m articles
1.4m replys
5 comments
56.9k users