I'm building an app and I'm trying to show a Fragment as an overlay to another fragment, which I know how to do following this question.
However, I'm using the Android Navigation Component and I'm trying to figure out how to show a fragment as an overlay instead of replacing the current visible fragment, when I navigate to it. Is there a way or it is still not supported?
Figured it out with the help of a reddit post, I used a BottomSheetDialogFragment, which is supported by Navigation Component v2.0.0 and on, which was however messing up my "back" button not turning into the burger menu button on the top most Fragment, so I ended up manually showing it by using BottomDialogFragment().show(supportFragmentManager, "dialog")
Getting the DialogFragment to be fullscreen was another pain, which I solved using this medium post.
Hope this helps someone else as well.