BottomSheetBehavior work properly in
compile \'com.android.support:design:24.1.1\'
but when I update it to 24.2.0,it is not work.Is that a
Updated August 30th, 2016
The accepted answer explains the difference between STATE_HIDDEN and STATE_COLLAPSED and how to correctly use both in com.android.support:design:24.2.0.
As of August 20th, 2016
Although this does seem to be a bug with com.android.support:design:24.2.0, you can temporarily work around it by using BottomSheetBehavior.STATE_HIDDEN:
mBehavior.setHideable(true);
mBehavior.setState(BottomSheetBehavior.STATE_HIDDEN);
This will still close the bottom sheet with an animation.
I'm not sure what the actual difference between STATE_COLLAPSED and STATE_HIDDEN is, and the documentation is less than helpful, but until it's actually fixed I think STATE_HIDDEN is okay.