AppBarConfiguration

class AppBarConfiguration
kotlin.Any
   ↳ androidx.navigation.ui.AppBarConfiguration

Configuration options for NavigationUI methods that interact with implementations of the app bar pattern such as androidx.appcompat.widget.Toolbar, com.google.android.material.appbar.CollapsingToolbarLayout, and androidx.appcompat.app.ActionBar.

Summary

Nested classes

The Builder class for constructing new AppBarConfiguration instances.

abstract

Interface for providing custom 'up' behavior beyond what is provided by androidx.navigation.NavController#navigateUp().

Public methods

DrawerLayout?

The DrawerLayout indicating that the Navigation button should be displayed as a drawer symbol when it is not being shown as an Up button.

AppBarConfiguration.OnNavigateUpListener?

The OnNavigateUpListener that should be invoked if androidx.navigation.NavController#navigateUp returns false.

MutableSet<Int!>

The set of destinations by id considered at the top level of your information hierarchy.

Public methods

getDrawerLayout

@Nullable fun getDrawerLayout(): DrawerLayout?

The DrawerLayout indicating that the Navigation button should be displayed as a drawer symbol when it is not being shown as an Up button.

Return
DrawerLayout?: The DrawerLayout that should be toggled from the Navigation button

getFallbackOnNavigateUpListener

@Nullable fun getFallbackOnNavigateUpListener(): AppBarConfiguration.OnNavigateUpListener?

The OnNavigateUpListener that should be invoked if androidx.navigation.NavController#navigateUp returns false.

Return
AppBarConfiguration.OnNavigateUpListener?: a OnNavigateUpListener for providing custom up navigation logic, if one was set.

getTopLevelDestinations

@NonNull fun getTopLevelDestinations(): MutableSet<Int!>

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.

Return
MutableSet<Int!>: The set of top level destinations by id.