Skip to content

Most visited

Recently visited

navigation

BottomSheetBehavior.BottomSheetCallback

public static abstract class BottomSheetBehavior.BottomSheetCallback
extends Object

java.lang.Object
   ↳ android.support.design.widget.BottomSheetBehavior.BottomSheetCallback


Callback for monitoring events about bottom sheets.

Summary

Public constructors

BottomSheetBehavior.BottomSheetCallback()

Public methods

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.

Inherited methods

From class java.lang.Object

Public constructors

BottomSheetBehavior.BottomSheetCallback

added in version 23.2.0
BottomSheetBehavior.BottomSheetCallback ()

Public methods

onSlide

added in version 23.2.0
void onSlide (View bottomSheet, 
                float slideOffset)

Called when the bottom sheet is being dragged.

Parameters
bottomSheet View: The bottom sheet view.

slideOffset float: 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.

onStateChanged

added in version 23.2.0
void onStateChanged (View bottomSheet, 
                int newState)

Called when the bottom sheet changes its state.

Parameters
bottomSheet View: The bottom sheet view.

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

This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a one-minute survey?
Help us improve Android tools and documentation.