belongs to Maven artifact com.android.support:design:27.1.0
BaseTransientBottomBar
public
abstract
class
BaseTransientBottomBar
extends Object
java.lang.Object | |
↳ | android.support.design.widget.BaseTransientBottomBar<B extends android.support.design.widget.BaseTransientBottomBar<B>> |
Known Direct Subclasses |
Base class for lightweight transient bars that are displayed along the bottom edge of the application window.
Summary
Nested classes | |
---|---|
class |
BaseTransientBottomBar.BaseCallback<B>
Base class for |
interface |
BaseTransientBottomBar.ContentViewCallback
Interface that defines the behavior of the main content of a transient bottom bar. |
Constants | |
---|---|
int |
LENGTH_INDEFINITE
Show the Snackbar indefinitely. |
int |
LENGTH_LONG
Show the Snackbar for a long period of time. |
int |
LENGTH_SHORT
Show the Snackbar for a short period of time. |
Protected constructors | |
---|---|
BaseTransientBottomBar(ViewGroup parent, View content, BaseTransientBottomBar.ContentViewCallback contentViewCallback)
Constructor for the transient bottom bar. |
Public methods | |
---|---|
B
|
addCallback(BaseCallback<B> callback)
Adds the specified callback to the list of callbacks that will be notified of transient bottom bar events. |
void
|
dismiss()
Dismiss the |
Context
|
getContext()
Returns the |
int
|
getDuration()
Return the duration. |
View
|
getView()
Returns the |
boolean
|
isShown()
Return whether this |
boolean
|
isShownOrQueued()
Returns whether this |
B
|
removeCallback(BaseCallback<B> callback)
Removes the specified callback from the list of callbacks that will be notified of transient bottom bar events. |
B
|
setDuration(int duration)
Set how long to show the view for. |
void
|
show()
Show the |
Inherited methods | |
---|---|
From
class
java.lang.Object
|
Constants
LENGTH_INDEFINITE
int LENGTH_INDEFINITE
Show the Snackbar indefinitely. This means that the Snackbar will be displayed from the time
that is shown
until either it is dismissed, or another Snackbar is shown.
See also:
Constant Value: -2 (0xfffffffe)
LENGTH_LONG
int LENGTH_LONG
Show the Snackbar for a long period of time.
See also:
Constant Value: 0 (0x00000000)
LENGTH_SHORT
int LENGTH_SHORT
Show the Snackbar for a short period of time.
See also:
Constant Value: -1 (0xffffffff)
Protected constructors
BaseTransientBottomBar
BaseTransientBottomBar (ViewGroup parent, View content, BaseTransientBottomBar.ContentViewCallback contentViewCallback)
Constructor for the transient bottom bar.
Parameters | |
---|---|
parent |
ViewGroup : The parent for this transient bottom bar. |
content |
View : The content view for this transient bottom bar. |
contentViewCallback |
BaseTransientBottomBar.ContentViewCallback : The content view callback for this transient bottom bar.
|
Public methods
addCallback
B addCallback (BaseCallback<B> callback)
Adds the specified callback to the list of callbacks that will be notified of transient bottom bar events.
Parameters | |
---|---|
callback |
BaseCallback : Callback to notify when transient bottom bar events occur. |
Returns | |
---|---|
B |
See also:
getContext
Context getContext ()
Returns the BaseTransientBottomBar
's context.
Returns | |
---|---|
Context |
getView
View getView ()
Returns the BaseTransientBottomBar
's view.
Returns | |
---|---|
View |
isShown
boolean isShown ()
Return whether this BaseTransientBottomBar
is currently being shown.
Returns | |
---|---|
boolean |
isShownOrQueued
boolean isShownOrQueued ()
Returns whether this BaseTransientBottomBar
is currently being shown, or is queued
to be shown next.
Returns | |
---|---|
boolean |
removeCallback
B removeCallback (BaseCallback<B> callback)
Removes the specified callback from the list of callbacks that will be notified of transient bottom bar events.
Parameters | |
---|---|
callback |
BaseCallback : Callback to remove from being notified of transient bottom bar events |
Returns | |
---|---|
B |
See also:
setDuration
B setDuration (int duration)
Set how long to show the view for.
Parameters | |
---|---|
duration |
int : either be one of the predefined lengths:
LENGTH_SHORT , LENGTH_LONG , or a custom duration
in milliseconds.
|
Returns | |
---|---|
B |
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
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2024-04-11 UTC.