onSlide

abstract fun onSlide(@NonNull bottomSheet: View, slideOffset: Float)

Called when the bottom sheet is being dragged.

Parameters

bottomSheet

The bottom sheet view.

slideOffset

The new offset of this bottom sheet within [-1,1] range. Offset increases as this bottom sheet is moving upward. From 0 to 1 the sheet is between collapsed and expanded states and from -1 to 0 it is between hidden and collapsed states.