I'm trying to handle the back button in a BottomSheetDialogFragment
, which is a DialogFragment
, using 'androidx.activity:activity-ktx:1.1.0-alpha01'
and 'androidx.fragment:fragment-ktx:1.2.0-alpha01'
.
handleOnBackPressed()
is not called and the DialogFragment
is dismissed. The OnBackPressedCallback
is enabled when the back button is pressed.
I think the DialogFragment
is intercepting the back button press, because the ComponentActivity
never calls mOnBackPressedDispatcher.onBackPressed();
Is there a way to override the DialogFragment
handling of back button press?