BaseTransientBottomBar.BaseCallback
public
static
abstract
class
BaseTransientBottomBar.BaseCallback
extends Object
| java.lang.Object | |
| ↳ | com.google.android.material.snackbar.BaseTransientBottomBar.BaseCallback<B> |
Base class for BaseTransientBottomBar callbacks.
Summary
Constants | |
|---|---|
int |
DISMISS_EVENT_ACTION
Indicates that the Snackbar was dismissed via an action click. |
int |
DISMISS_EVENT_CONSECUTIVE
Indicates that the Snackbar was dismissed from a new Snackbar being shown. |
int |
DISMISS_EVENT_MANUAL
Indicates that the Snackbar was dismissed via a call to |
int |
DISMISS_EVENT_SWIPE
Indicates that the Snackbar was dismissed via a swipe. |
int |
DISMISS_EVENT_TIMEOUT
Indicates that the Snackbar was dismissed via a timeout. |
Public constructors | |
|---|---|
BaseCallback()
|
|
Public methods | |
|---|---|
void
|
onDismissed(B transientBottomBar, int event)
Called when the given |
void
|
onShown(B transientBottomBar)
Called when the given |
Inherited methods | |
|---|---|
Constants
DISMISS_EVENT_ACTION
public static final int DISMISS_EVENT_ACTION
Indicates that the Snackbar was dismissed via an action click.
Constant Value: 1 (0x00000001)
DISMISS_EVENT_CONSECUTIVE
public static final int DISMISS_EVENT_CONSECUTIVE
Indicates that the Snackbar was dismissed from a new Snackbar being shown.
Constant Value: 4 (0x00000004)
DISMISS_EVENT_MANUAL
public static final int DISMISS_EVENT_MANUAL
Indicates that the Snackbar was dismissed via a call to BaseTransientBottomBar.dismiss().
Constant Value: 3 (0x00000003)
DISMISS_EVENT_SWIPE
public static final int DISMISS_EVENT_SWIPE
Indicates that the Snackbar was dismissed via a swipe.
Constant Value: 0 (0x00000000)
DISMISS_EVENT_TIMEOUT
public static final int DISMISS_EVENT_TIMEOUT
Indicates that the Snackbar was dismissed via a timeout.
Constant Value: 2 (0x00000002)
Public constructors
BaseCallback
public BaseCallback ()
Public methods
onDismissed
public void onDismissed (B transientBottomBar,
int event)Called when the given BaseTransientBottomBar has been dismissed, either through a
time-out, having been manually dismissed, or an action being clicked.
| Parameters | |
|---|---|
transientBottomBar |
B: The transient bottom bar which has been dismissed. |
event |
int: The event which caused the dismissal. One of either: DISMISS_EVENT_SWIPE, DISMISS_EVENT_ACTION, DISMISS_EVENT_TIMEOUT,
DISMISS_EVENT_MANUAL or DISMISS_EVENT_CONSECUTIVE. |
See also:
onShown
public void onShown (B transientBottomBar)
Called when the given BaseTransientBottomBar is visible.
| Parameters | |
|---|---|
transientBottomBar |
B: The transient bottom bar which is now visible. |
See also: