BottomSheetBehavior.BottomSheetCallback
public
static
abstract
class
BottomSheetBehavior.BottomSheetCallback
extends Object
java.lang.Object
|
↳ |
com.google.android.material.bottomsheet.BottomSheetBehavior.BottomSheetCallback
|
Callback for monitoring events about bottom sheets.
Summary
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
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
Public constructors
BottomSheetCallback
public BottomSheetCallback ()
Public methods
onSlide
public abstract 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
public abstract void onStateChanged (View bottomSheet,
int newState)
Called when the bottom sheet changes its state.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[]]