public abstract static class BottomSheetBehavior.BottomSheetCallback extends Object
Constructor and Description |
---|
BottomSheetCallback() |
Modifier and Type | Method and Description |
---|---|
abstract void |
onSlide(View bottomSheet,
float slideOffset)
Called when the bottom sheet is being dragged.
|
abstract void |
onStateChanged(View bottomSheet,
int newState)
Called when the bottom sheet changes its state.
|
public abstract void onStateChanged(@NonNull View bottomSheet, int newState)
bottomSheet
- The bottom sheet view.newState
- The new state. This will be one of BottomSheetBehavior.STATE_DRAGGING
,
BottomSheetBehavior.STATE_SETTLING
, BottomSheetBehavior.STATE_EXPANDED
,
BottomSheetBehavior.STATE_COLLAPSED
, or BottomSheetBehavior.STATE_HIDDEN
.public abstract void onSlide(@NonNull View bottomSheet, float slideOffset)
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.