Use an activity / fragment on a bottom sheet

2

I was taking a look at the Bottom Sheet, and I built something like this from this tutorial link .

I was left wondering how I could put together something similar to what the Uber app does. It's a bottom sheet, which when expanded seems to me to be a new activity.

Does anyone know how to create something similar or have an example made?

I'll leave the video link where it shows the exact timing of the component I'm looking for

    
asked by anonymous 05.07.2017 / 16:12

1 answer

1
In the "4. Using a Bottom Sheet Fragment" step of the link you provided you have a code snippet that creates a BottomSheet without the visual code being present in the xml file of the activity where it will appear, the method on line 19 (from step 4 of the link provided) is called to create and program your custom view that will be placed in the BottomSheet, you can create the desired layout by following the image step by step below  

andreplacethe"R.layout.fragment_bottom_sheet" line 22

View contentView = View.inflate (getContext (), R.layout.fragment_bottom_sheet, null);

For the name of your xml file, and program your view the way you want, accessing the objects via findViewById (), but now before findViewById (), you need to enter the variable name of line 22, which in the case of example is contentView, then populating contentView.findViewById ();

    
16.07.2017 / 15:02