{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

SnackbarData

public interface SnackbarData


Interface to represent the data of one particular Snackbar as a piece of the SnackbarHostState.

Summary

Public methods

abstract void

Function to be called when Snackbar is dismissed either by timeout or by the user.

abstract @NonNull SnackbarVisuals

Holds the visual representation for a particular Snackbar.

abstract void

Function to be called when Snackbar action has been performed to notify the listeners.

Public methods

dismiss

abstract void dismiss()

Function to be called when Snackbar is dismissed either by timeout or by the user.

getVisuals

abstract @NonNull SnackbarVisuals getVisuals()

Holds the visual representation for a particular Snackbar.

performAction

abstract void performAction()

Function to be called when Snackbar action has been performed to notify the listeners.