Android 12 Developer Preview is here! Try it out, and give us your feedback!

BaseTransientBottomBar.Behavior

public static class BaseTransientBottomBar.Behavior
extends SwipeDismissBehavior<View>

java.lang.Object
   ↳ androidx.coordinatorlayout.widget.CoordinatorLayout.Behavior<V extends android.view.View>
     ↳ com.google.android.material.behavior.SwipeDismissBehavior<android.view.View>
       ↳ com.google.android.material.snackbar.BaseTransientBottomBar.Behavior


Behavior for BaseTransientBottomBar.

Summary

Inherited constants

Public constructors

Behavior()

Public methods

boolean canSwipeDismissView(View child)

Called when the user's input indicates that they want to swipe the given view.

boolean onInterceptTouchEvent(CoordinatorLayout parent, View child, MotionEvent event)

Inherited methods

Public constructors

Behavior

public Behavior ()

Public methods

canSwipeDismissView

public boolean canSwipeDismissView (View child)

Called when the user's input indicates that they want to swipe the given view.

Parameters
child View: View the user is attempting to swipe

Returns
boolean true if the view can be dismissed via swiping, false otherwise

onInterceptTouchEvent

public boolean onInterceptTouchEvent (CoordinatorLayout parent, 
                View child, 
                MotionEvent event)

Parameters
parent CoordinatorLayout

child View

event MotionEvent

Returns
boolean