I have implemented Bottom Sheet functionality within my activity in onCreate() using this solution and this library
sheet = new BottomSheet.Builder(this,
For showing the Bottom Sheet use this code:
bottomSheetInfoBehavior.setHideable(false);
bottomSheetInfoBehavior.setState(BottomSheetBehavior.STATE_EXPANDED);
For Hiding the Bottom sheet use this code:
bottomSheetInfoBehavior.setHideable(true);
bottomSheetInfoBehavior.setState(BottomSheetBehavior.STATE_HIDDEN);