OnBackPressedDispatcherOwner

public interface OnBackPressedDispatcherOwner extends LifecycleOwner

Known direct subclasses
ComponentActivity

Base class for activities that enables composition of higher level components.

ComponentDialog

Base class for dialogs that enables composition of higher level components.

Known indirect subclasses
AlertDialog

A subclass of Dialog that can display one, two or three buttons.

AppCompatActivity

Base class for activities that wish to use some of the newer platform features on older Android devices.

AppCompatDialog

Base class for AppCompat themed android.app.Dialogs.

BaseCarAppActivity

Core logic for CarAppLibrary Activity interaction with a host.

CarAppActivity

The class representing a car app activity in the main display.

FragmentActivity

Base class for activities that want to use the support-based Fragments.

LauncherActivity

This class handles providing the right launcher activity when running native applications and Car App Library applications.

MediaRouteChooserDialog

This class implements the route chooser dialog for MediaRouter.

MediaRouteControllerDialog

This class implements the route controller dialog for MediaRouter.

SdkActivity

Activity to start for SDKs running locally.


A class that has an OnBackPressedDispatcher that allows you to register a OnBackPressedCallback for handling the system back button.

It is expected that classes that implement this interface route the system back button to the dispatcher

Summary

Public methods

abstract @NonNull OnBackPressedDispatcher

The OnBackPressedDispatcher that should handle the system back button.

Inherited methods

From androidx.lifecycle.LifecycleOwner
abstract @NonNull Lifecycle

Returns the Lifecycle of the provider.

Public methods

getOnBackPressedDispatcher

Added in 1.0.0
abstract @NonNull OnBackPressedDispatcher getOnBackPressedDispatcher()

The OnBackPressedDispatcher that should handle the system back button.