I am trying to set hidden state for BottomSheet
, but it doesn't work. What's the problem?
bottomBar = BottomSheetBehavior.from(findViewById(R.id.bottom_bar));
bottomBar.setState(BottomSheetBehavior.STATE_HIDDEN);
Remember to add this while hiding the bottom sheet at start of activity/fragment
bottomSheetBehavior =BottomSheetBehavior.from(bottom_sheet_view_here);
bottomSheetBehavior.setHideable(true);//Important to add
bottomSheetBehavior.setState(BottomSheetBehavior.STATE_HIDDEN);