I do it this way, but it does not appear

@OnClick(R.id.btnMap) public void click(){ initBottomSheet(); Log.d("TAG", "!!!"); } private void initBottomSheet() { bottomSheetBehavior = BottomSheetBehavior.from(layout_bottom); bottomSheetBehavior.setState(BottomSheetBehavior.STATE_HIDDEN); bottomSheetBehavior.setPeekHeight(340); bottomSheetBehavior.setHideable(false); initBottomSheetStateListener(bottomSheetBehavior); } private void initBottomSheetStateListener(@NonNull BottomSheetBehavior bottomSheetBehavior) { bottomSheetBehavior.setBottomSheetCallback(new BottomSheetBehavior.BottomSheetCallback() { @Override public void onStateChanged(@NonNull View bottomSheet, int newState) { } @Override public void onSlide(@NonNull View bottomSheet, float slideOffset) { } }); } 

And markup

 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/bottom_sheet" android:layout_width="match_parent" android:layout_height="220dp" android:background="@drawable/shape_bottom_sheet" android:orientation="vertical" app:behavior_hideable="true" app:behavior_peekHeight="0dp" app:layout_behavior="android.support.design.widget.BottomSheetBehavior"> 

    1 answer 1

    Strange, until I asked the question I did not solve the problem, but it turned out just

     @Override public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); ButterKnife.bind(this, view); bottomSheetBehavior = BottomSheetBehavior.from(layout_bottom); } private void initBottomSheet() { bottomSheetBehavior.setHideable(false); bottomSheetBehavior.setState(BottomSheetBehavior.STATE_EXPANDED); initBottomSheetStateListener(bottomSheetBehavior); } private void initBottomSheetStateListener(@NonNull BottomSheetBehavior bottomSheetBehavior) { bottomSheetBehavior.setBottomSheetCallback(new BottomSheetBehavior.BottomSheetCallback() { @Override public void onStateChanged(@NonNull View bottomSheet, int newState) { } @Override public void onSlide(@NonNull View bottomSheet, float slideOffset) { } }); }