I based my code on this question : How to create BottomSheetDialogFragment using Navigation Architecture Component?
I want to use fragment bottom sheet with navigation component I used the following setup :
<fragment
android:id="@+id/mainFragment"
android:name="package.MainFragment"
android:label="main_fragment"
tools:layout="@layout/main_fragment" >
<action
android:id="@+id/action_mainFragment_to_bottomSheet"
app:destination="@id/bottomSheet" />
</fragment>
<dialog
android:id="@+id/bottomShee"
android:name="package.OptionFragment" />
and in the code
view.findNavController().navigate(R.id.action_mainFragment_to_bottomSheet)
But the problem is that the bottom sheet appears in another fragment and not shadowing current fragment.
is there any way to implement bottom sheet with android navigation component?