Ya está disponible la segunda Vista previa para desarrolladores de Android 11; pruébala y comparte tus comentarios.

AppBarConfiguration.OnNavigateUpListener

public static interface AppBarConfiguration.OnNavigateUpListener

androidx.navigation.ui.AppBarConfiguration.OnNavigateUpListener


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

Summary

Public methods

abstract boolean onNavigateUp()

Callback for handling the Up button.

Public methods

onNavigateUp

public abstract boolean onNavigateUp ()

Callback for handling the Up button.

Returns
boolean true if the listener successfully navigated 'up'