There are around six different states in BottomSheetBehavior. I did not get any proper explanation of them.
Like I don't understand difference between STATE_HIDDEN and STATE_COLLAPSED?
Similarly what is difference between STATE_SETTLING and STATE_DRAGGING?
Also what is the use of STATE_HALF_EXPANDED?
STATE_COLLAPSED-> bottomsheet is visible but only showing its peek height. This state is usually the ‘resting position’ of a Bottom Sheet. The peek height is chosen by the developer and should be enough to indicate there is extra content, allow the user to trigger an action or expand the bottom sheet.STATE_HIDDEN-> bottomsheet is no longer visible on screenSTATE_EXPANDED-> bottom sheet is visible and its maximum height and it is neither dragging or settlingSTATE_DRAGGING-> The user is actively dragging the bottom sheet up or down.STATE_SETTLING-> bottomsheet is settling to specific height after a drag/swipe gesture. This will be the peek height, expanded height, or 0, in case the user action caused the bottom sheet to hide.STATE_HALF_EXPANDED-> The sheet is half-expanded(half visible). (only applicable if behavior_fitToContents has been set to false).For more information, you can visit here