0

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.

Gabriele Mariotti
  • 320,139
  • 94
  • 887
  • 841
WoodPecker
  • 19
  • 4
  • The `BottomSheetDialogFragment` is part of the material components library: https://material.io/develop/android/docs/getting-started – Henry Twist Mar 28 '21 at 12:44

1 Answers1

1

The BottomSheetDialogFragment is provided by the Material Components Library:

Relevant part of the doc about the usage:

  • Subclass BottomSheetDialogFragment
  • Override the onCreateView method.
  • Use one of the two versions of 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.

Gabriele Mariotti
  • 320,139
  • 94
  • 887
  • 841