belongs to Maven artifact com.android.support:design:27.1.0
Snackbar.Callback
public
static
class
Snackbar.Callback
extends BaseCallback<Snackbar>
| java.lang.Object | ||
| ↳ | android.support.design.widget.BaseTransientBottomBar.BaseCallback<android.support.design.widget.Snackbar> | |
| ↳ | android.support.design.widget.Snackbar.Callback | |
Callback class for Snackbar instances.
Note: this class is here to provide backwards-compatible way for apps written before
the existence of the base BaseTransientBottomBar class.
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 |
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. |
Inherited constants |
|---|
android.support.design.widget.BaseTransientBottomBar.BaseCallback
|
Public constructors | |
|---|---|
Snackbar.Callback()
|
|
Public methods | |
|---|---|
void
|
onDismissed(Snackbar transientBottomBar, int event)
Called when the given |
void
|
onShown(Snackbar sb)
Called when the given |
Inherited methods | |
|---|---|
android.support.design.widget.BaseTransientBottomBar.BaseCallback
| |
java.lang.Object
| |
Constants
DISMISS_EVENT_ACTION
int DISMISS_EVENT_ACTION
Indicates that the Snackbar was dismissed via an action click.
Constant Value: 1 (0x00000001)
DISMISS_EVENT_CONSECUTIVE
int DISMISS_EVENT_CONSECUTIVE
Indicates that the Snackbar was dismissed from a new Snackbar being shown.
Constant Value: 4 (0x00000004)
DISMISS_EVENT_MANUAL
int DISMISS_EVENT_MANUAL
Indicates that the Snackbar was dismissed via a call to dismiss().
Constant Value: 3 (0x00000003)
DISMISS_EVENT_SWIPE
int DISMISS_EVENT_SWIPE
Indicates that the Snackbar was dismissed via a swipe.
Constant Value: 0 (0x00000000)
DISMISS_EVENT_TIMEOUT
int DISMISS_EVENT_TIMEOUT
Indicates that the Snackbar was dismissed via a timeout.
Constant Value: 2 (0x00000002)
Public constructors
Public methods
onDismissed
void onDismissed (Snackbar 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 |
Snackbar: 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. |
onShown
void onShown (Snackbar sb)
Called when the given BaseTransientBottomBar is visible.
| Parameters | |
|---|---|
sb |
Snackbar: The transient bottom bar which is now visible. |
Annotations
Interfaces
- AppBarLayout.OnOffsetChangedListener
- BaseTransientBottomBar.ContentViewCallback
- BottomNavigationView.OnNavigationItemReselectedListener
- BottomNavigationView.OnNavigationItemSelectedListener
- CoordinatorLayout.AttachedBehavior
- NavigationView.OnNavigationItemSelectedListener
- SwipeDismissBehavior.OnDismissListener
- TabLayout.OnTabSelectedListener
Classes
- AppBarLayout
- AppBarLayout.Behavior
- AppBarLayout.Behavior.DragCallback
- AppBarLayout.Behavior.SavedState
- AppBarLayout.LayoutParams
- AppBarLayout.ScrollingViewBehavior
- BaseTransientBottomBar
- BaseTransientBottomBar.BaseCallback
- BottomNavigationView
- BottomSheetBehavior
- BottomSheetBehavior.BottomSheetCallback
- BottomSheetBehavior.SavedState
- BottomSheetDialog
- BottomSheetDialogFragment
- CollapsingToolbarLayout
- CollapsingToolbarLayout.LayoutParams
- CoordinatorLayout
- CoordinatorLayout.Behavior
- CoordinatorLayout.LayoutParams
- CoordinatorLayout.SavedState
- FloatingActionButton
- FloatingActionButton.Behavior
- FloatingActionButton.OnVisibilityChangedListener
- NavigationView
- NavigationView.SavedState
- Snackbar
- Snackbar.Callback
- SwipeDismissBehavior
- TabItem
- TabLayout
- TabLayout.Tab
- TabLayout.TabLayoutOnPageChangeListener
- TabLayout.ViewPagerOnTabSelectedListener
- TextInputEditText
- TextInputLayout