Sdílet prostřednictvím


IOnBackInvokedDispatcher.RegisterOnBackInvokedCallback Method

Definition

Registers a OnBackInvokedCallback.

[Android.Runtime.Register("registerOnBackInvokedCallback", "(ILandroid/window/OnBackInvokedCallback;)V", "GetRegisterOnBackInvokedCallback_ILandroid_window_OnBackInvokedCallback_Handler:Android.Window.IOnBackInvokedDispatcherInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=33)]
public void RegisterOnBackInvokedCallback (int priority, Android.Window.IOnBackInvokedCallback callback);
[<Android.Runtime.Register("registerOnBackInvokedCallback", "(ILandroid/window/OnBackInvokedCallback;)V", "GetRegisterOnBackInvokedCallback_ILandroid_window_OnBackInvokedCallback_Handler:Android.Window.IOnBackInvokedDispatcherInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=33)>]
abstract member RegisterOnBackInvokedCallback : int * Android.Window.IOnBackInvokedCallback -> unit

Parameters

priority
Int32

The priority of the callback.

callback
IOnBackInvokedCallback

The callback to be registered. If the callback instance has been already registered, the existing instance (no matter its priority) will be unregistered and registered again.

Attributes

Remarks

Registers a OnBackInvokedCallback.

Within the same priority level, callbacks are invoked in the reverse order in which they are registered. Higher priority callbacks are invoked before lower priority ones.

Java documentation for android.window.OnBackInvokedDispatcher.registerOnBackInvokedCallback(int, android.window.OnBackInvokedCallback).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to