AppBarConfiguration
public
final
class
AppBarConfiguration
extends Object
java.lang.Object | |
↳ | androidx.navigation.ui.AppBarConfiguration |
Configuration options for NavigationUI
methods that interact with implementations of the
app bar pattern such as Toolbar
,
CollapsingToolbarLayout
, and
ActionBar
.
Summary
Nested classes | |
---|---|
class |
AppBarConfiguration.Builder
The Builder class for constructing new |
interface |
AppBarConfiguration.OnNavigateUpListener
Interface for providing custom 'up' behavior beyond what is provided by
|
Public methods | |
---|---|
DrawerLayout
|
getDrawerLayout()
This method is deprecated.
Use |
AppBarConfiguration.OnNavigateUpListener
|
getFallbackOnNavigateUpListener()
The |
Openable
|
getOpenableLayout()
The |
Set<Integer>
|
getTopLevelDestinations()
The set of destinations by id considered at the top level of your information hierarchy. |
Inherited methods | |
---|---|
Public methods
getDrawerLayout
public DrawerLayout getDrawerLayout ()
This method is deprecated.
Use getOpenableLayout()
.
The DrawerLayout
indicating that the Navigation button should be displayed as
a drawer symbol when it is not being shown as an Up button.
Returns | |
---|---|
DrawerLayout |
The DrawerLayout that should be toggled from the Navigation button |
getFallbackOnNavigateUpListener
public AppBarConfiguration.OnNavigateUpListener getFallbackOnNavigateUpListener ()
The AppBarConfiguration.OnNavigateUpListener
that should be invoked if
NavController.navigateUp()
returns false
.
Returns | |
---|---|
AppBarConfiguration.OnNavigateUpListener |
a AppBarConfiguration.OnNavigateUpListener for providing custom up navigation logic,
if one was set.
|
getOpenableLayout
public Openable getOpenableLayout ()
The Openable
layout indicating that the Navigation button should be displayed as
a drawer symbol when it is not being shown as an Up button.
Returns | |
---|---|
Openable |
The Openable layout that should be toggled from the Navigation button |
getTopLevelDestinations
public Set<Integer> getTopLevelDestinations ()
The set of destinations by id considered at the top level of your information hierarchy. The Up button will not be displayed when on these destinations.
Returns | |
---|---|
Set<Integer> |
The set of top level destinations by id. |
Content and code samples on this page are subject to the licenses described in the Content License. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2021-02-24 UTC.