SideSheetCallback

public abstract class SideSheetCallback
extends Object

java.lang.Object
   ↳ com.google.android.material.sidesheet.SideSheetCallback


Callback that monitors side sheet events.

Summary

Public constructors

SideSheetCallback()

Public methods

abstract void onSlide(View sheet, float slideOffset)

Called when the sheet is being dragged.

abstract void onStateChanged(View sheet, int newState)

Called when the sheet changes its state.

Inherited methods

Public constructors

SideSheetCallback

public SideSheetCallback ()

Public methods

onSlide

public abstract void onSlide (View sheet, 
                float slideOffset)

Called when the sheet is being dragged.

Parameters
sheet View: The sheet view.

slideOffset float: The new offset of this sheet within [0,1] range. Offset increases as this sheet is moving towards the outer edge. A value of 0 means that the sheet is hidden, and a value of 1 means that the sheet is fully expanded.

onStateChanged

public abstract void onStateChanged (View sheet, 
                int newState)

Called when the sheet changes its state.

Parameters
sheet View: The sheet view.

newState int: The new state. This should be one of SideSheetBehavior.STATE_DRAGGING, SideSheetBehavior.STATE_SETTLING, SideSheetBehavior.STATE_EXPANDED or SideSheetBehavior.STATE_HIDDEN.