Navigation Bar View
SESL Varaint Provides an abstract implementation of a navigation bar that can be used to implementation such as Bottom Navigation or Navigation rail.
Navigation bars make it easy for users to explore and switch between top-level views in a single tap.
The bar contents can be populated by specifying a menu resource file. Each menu item title, icon and enabled state will be used for displaying navigation bar items. Menu items can also be used for programmatically selecting which destination is currently active. It can be done using MenuItem#setChecked(true)
Inheritors
Types
Link copied to clipboard
Menu Label visibility mode enum for component provide an implementation of navigation bar view.
Link copied to clipboard
interface OnItemReselectedListener
Listener for handling reselection events on navigation items.
Link copied to clipboard
interface OnItemSelectedListener
Listener for handling selection events on navigation items.
Properties
Link copied to clipboard
Link copied to clipboard
Label behaves as "labeled" when there are 3 items or less, or "selected" when there are 4 items or more.
Link copied to clipboard
Label is shown on all navigation items.
Link copied to clipboard
Label is shown on the selected navigation item.
Link copied to clipboard
Label is not shown on any navigation items.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Functions
Link copied to clipboard
Get the distance between the active indicator container and the item's label.
Link copied to clipboard
Returns an instance of BadgeDrawable associated with
menuItemId
, null if none was initialized.Link copied to clipboard
Get the color of the active indicator drawable.
Link copied to clipboard
Get the width of an item's active indicator.
Link copied to clipboard
Get the margin that will be maintained at the start and end of the active indicator away from the edges of its parent container.
Link copied to clipboard
Get the ShapeAppearanceModel of the active indicator drawable.
Link copied to clipboard
Get the width of an item's active indicator.
Link copied to clipboard
Returns the background drawable of the menu items.
Link copied to clipboard
Returns the background resource of the menu items.
Link copied to clipboard
Returns the size provided for the menu item icons in pixels.
Link copied to clipboard
Returns the tint which is applied to our menu items' icons.
Link copied to clipboard
Get the distance from the bottom of an item's label to the bottom of the navigation bar item.
Link copied to clipboard
Get the distance from the top of an item's icon/active indicator to the top of the navigation bar item.
Link copied to clipboard
Returns the text appearance used for the active menu item label.
Link copied to clipboard
Returns the text appearance used for inactive menu item labels.
Link copied to clipboard
Returns colors used for the different states (normal, selected, focused, etc.) of the menu item text.
Link copied to clipboard
Returns the current label visibility mode used by this NavigationBarView.
Link copied to clipboard
Returns the maximum number of items that can be shown in NavigationBarView.
Link copied to clipboard
Returns the MenuView instance associated with this navigation bar.
Link copied to clipboard
Creates an instance of BadgeDrawable associated with
menuItemId
if none exists.Link copied to clipboard
Returns the currently selected menu item ID, or zero if there is no menu.
Link copied to clipboard
Inflate a menu resource into this navigation view.
Link copied to clipboard
Get whether or not a selected item should show an active indicator.
Link copied to clipboard
Removes the BadgeDrawable associated with
menuItemId
.Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Set the distance between the active indicator container and the item's label.
Link copied to clipboard
Sets the base elevation of this view, in pixels.
Link copied to clipboard
Set the ColorStateList of the active indicator drawable.
Link copied to clipboard
Set whether a selected item should show an active indicator.
Link copied to clipboard
Set the height of an item's active indicator.
Link copied to clipboard
Set the horizontal margin that will be maintained at the start and end of the active indicator, making sure the indicator remains the given distance from the edge of its parent container.
Link copied to clipboard
Set the ShapeAppearanceModel of the active indicator drawable.
Link copied to clipboard
Set the width of an item's active indicator.
Link copied to clipboard
Set the background of our menu items to the given drawable.
Link copied to clipboard
Set the background of our menu items to the given resource.
Link copied to clipboard
Set the size to provide for the menu item icons.
Link copied to clipboard
Set the size to provide for the menu item icons using a resource ID.
Link copied to clipboard
Set the tint which is applied to our menu items' icons.
Link copied to clipboard
Sets an android.view.View.OnTouchListener for the item view associated with the provided
menuItemId
.Link copied to clipboard
Set the distance from the bottom of an item's label to the bottom of the navigation bar item.
Link copied to clipboard
Set the distance from the top of an items icon/active indicator to the top of the navigation bar item.
Link copied to clipboard
Sets the text appearance to be used for the menu item labels.
Link copied to clipboard
Sets the text appearance to be used for inactive menu item labels.
Link copied to clipboard
Set the colors to use for the different states (normal, selected, focused, etc.) of the menu item text.
Link copied to clipboard
Sets the navigation items' label visibility mode.
Link copied to clipboard
open fun setOnItemReselectedListener(@Nullable listener: NavigationBarView.OnItemReselectedListener)
Set a listener that will be notified when the currently selected navigation item is reselected.
Link copied to clipboard
Set a listener that will be notified when a navigation item is selected.
Link copied to clipboard
Set the selected menu item ID.