When i view others Android code, i find a class which extends BottomSheetDialogFragment
. I want to use it (BottomSheetDialogFragment
), then I find it need to add implementation in build.gradle(app)
. I had viewed this website BottomSheetDialogFragment
in official Doc. But I can not found any implementation details about BottomSheetDialogFragment
. I finally found implementation in other tutorial by Google. I want to konw how can find the implementation details in Official Doc.
The BottomSheetDialogFragment
is provided by the Material Components Library:
Relevant part of the doc about the usage:
BottomSheetDialogFragment
onCreateView
method.show
to display the dialog. Notice BottomSheetDialogFragment
is a subclass of AppCompatFragment
, which means you need to use Activity.getSupportFragmentManager()
.Note: Don't call setOnCancelListener
or setOnDismissListener
on a BottomSheetDialogFragment
, instead you can override onCancel(DialogInterface)
or onDismiss(DialogInterface)
if necessary.