Skip to content

Most visited

Recently visited

navigation
added in version 25.1.0
belongs to Maven artifact com.android.support:design:27.0.0

BaseTransientBottomBar.BaseCallback

public static abstract class BaseTransientBottomBar.BaseCallback
extends Object

java.lang.Object
   ↳ android.support.design.widget.BaseTransientBottomBar.BaseCallback<B>
Known Direct Subclasses


Base class for BaseTransientBottomBar callbacks.

See also:

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 dismiss().

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

BaseTransientBottomBar.BaseCallback()

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.

Inherited methods

From class java.lang.Object

Constants

DISMISS_EVENT_ACTION

added in version 25.1.0
int DISMISS_EVENT_ACTION

Indicates that the Snackbar was dismissed via an action click.

Constant Value: 1 (0x00000001)

DISMISS_EVENT_CONSECUTIVE

added in version 25.1.0
int DISMISS_EVENT_CONSECUTIVE

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

Constant Value: 4 (0x00000004)

DISMISS_EVENT_MANUAL

added in version 25.1.0
int DISMISS_EVENT_MANUAL

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

Constant Value: 3 (0x00000003)

DISMISS_EVENT_SWIPE

added in version 25.1.0
int DISMISS_EVENT_SWIPE

Indicates that the Snackbar was dismissed via a swipe.

Constant Value: 0 (0x00000000)

DISMISS_EVENT_TIMEOUT

added in version 25.1.0
int DISMISS_EVENT_TIMEOUT

Indicates that the Snackbar was dismissed via a timeout.

Constant Value: 2 (0x00000002)

Public constructors

BaseTransientBottomBar.BaseCallback

added in version 25.1.0
BaseTransientBottomBar.BaseCallback ()

Public methods

onDismissed

added in version 25.1.0
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

added in version 25.1.0
void onShown (B transientBottomBar)

Called when the given BaseTransientBottomBar is visible.

Parameters
transientBottomBar B: The transient bottom bar which is now visible.

See also:

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!

Follow Google Developers on WeChat

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 short survey?
Help us improve the Android developer experience.
(Sep 2017 survey)