Google 致力于为黑人社区推动种族平等。查看具体举措

OnBackPressedDispatcherOwner

public interface OnBackPressedDispatcherOwner
implements LifecycleOwner

androidx.activity.OnBackPressedDispatcherOwner


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 OnBackPressedDispatcher getOnBackPressedDispatcher()

Retrieve the OnBackPressedDispatcher that should handle the system back button.

Inherited methods

Public methods

getOnBackPressedDispatcher

public abstract OnBackPressedDispatcher getOnBackPressedDispatcher ()

Retrieve the OnBackPressedDispatcher that should handle the system back button.

Returns
OnBackPressedDispatcher The OnBackPressedDispatcher.