BaseTransientBottomBar.BaseCallback

public abstract class BaseTransientBottomBar.BaseCallback<B>

Known direct subclasses
Snackbar.Callback

Callback class for Snackbar instances.


Base class for BaseTransientBottomBar callbacks.

Parameters
<B>

The transient bottom bar subclass.

See also
addCallback

Summary

Constants

static final int

Indicates that the Snackbar was dismissed via an action click.

static final int

Indicates that the Snackbar was dismissed from a new Snackbar being shown.

static final int

Indicates that the Snackbar was dismissed via a call to dismiss.

static final int

Indicates that the Snackbar was dismissed via a swipe.

static final int

Indicates that the Snackbar was dismissed via a timeout.

Public constructors

Public methods

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.

void
onShown(B transientBottomBar)

Called when the given BaseTransientBottomBar is visible.

Constants

DISMISS_EVENT_ACTION

public static final int DISMISS_EVENT_ACTION = 1

Indicates that the Snackbar was dismissed via an action click.

DISMISS_EVENT_CONSECUTIVE

public static final int DISMISS_EVENT_CONSECUTIVE = 4

Indicates that the Snackbar was dismissed from a new Snackbar being shown.

DISMISS_EVENT_MANUAL

public static final int DISMISS_EVENT_MANUAL = 3

Indicates that the Snackbar was dismissed via a call to dismiss.

DISMISS_EVENT_SWIPE

public static final int DISMISS_EVENT_SWIPE = 0

Indicates that the Snackbar was dismissed via a swipe.

DISMISS_EVENT_TIMEOUT

public static final int DISMISS_EVENT_TIMEOUT = 2

Indicates that the Snackbar was dismissed via a timeout.

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
B transientBottomBar

The transient bottom bar which has been dismissed.

int event

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
dismiss

onShown

public void onShown(B transientBottomBar)

Called when the given BaseTransientBottomBar is visible.

Parameters
B transientBottomBar

The transient bottom bar which is now visible.

See also
show