AppBarConfiguration

public final class 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 types

AppBarConfiguration.Builder

The Builder class for constructing new AppBarConfiguration instances.

AppBarConfiguration.OnNavigateUpListener

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

Public fields

final @Nullable 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.

final @Nullable AppBarConfiguration.OnNavigateUpListener

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

final @Nullable Openable

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.

final @NonNull Set<@NonNull Integer>

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

Public fields

drawerLayout

@Nullable
public final @Nullable DrawerLayout 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.

Returns
@Nullable DrawerLayout

The DrawerLayout that should be toggled from the Navigation button

fallbackOnNavigateUpListener

@Nullable
public final @Nullable AppBarConfiguration.OnNavigateUpListener fallbackOnNavigateUpListener

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

Returns
@Nullable AppBarConfiguration.OnNavigateUpListener

a OnNavigateUpListener for providing custom up navigation logic, if one was set.

openableLayout

@Nullable
public final @Nullable Openable openableLayout

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
@Nullable Openable

The Openable layout that should be toggled from the Navigation button

topLevelDestinations

@NonNull
public final @NonNull Set<@NonNull IntegertopLevelDestinations

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
@NonNull Set<@NonNull Integer>

The set of top level destinations by id.