In step "4. Using a Bottom Sheet Fragment" of the link you have made available has a code snippet that creates a Bottomsheet without the need for visual code to be present in the xml file of Activity where it will appear, the method of line 19(from step 4 of the link provided), is called to create and program your custom view that will be placed on Bottomsheet, you can create the desired layout by following the image step by step below
and replace the "R.layout.fragment_bottom_sheet" of line 22
View contentView = View.inflate(getcontext(), R.layout.fragment_bottom_sheet, null);
By the name of your xml file, and program your view as desired, accessing the objects by findViewById(), only now before findViewById(), it is necessary to put the name of the variable of the line 22, which in the case of the example is contentView, ending then contentView.findViewById();
What is your specific doubt?
– ramaral
The bottom sheet transition effect, where when started is a card with margin on the side and when expanded a Toolbar appears, with a layout above the card and no margin @ramaral
– LMaker
https://uber-design-herokuapp-com.global.ssl.fastly.net/7457991f6084e7507818b227c718a800.webm something like that
– LMaker