OnBackAnimationCallback
public
interface
OnBackAnimationCallback
implements
OnBackInvokedCallback
android.window.OnBackAnimationCallback |
Interface for applications to register back animation callbacks along their custom back handling.
This allows the client to customize various back behaviors by overriding the corresponding callback methods.
Callback instances can be added to and removed from OnBackInvokedDispatcher
, which
is held at window level and accessible through Activity.getOnBackInvokedDispatcher()
,
Dialog.getOnBackInvokedDispatcher()
, Window.getOnBackInvokedDispatcher()
and View.findOnBackInvokedDispatcher()
.
When back is triggered, callbacks on the in-focus window are invoked in reverse order in which they are added within the same priority. Between different priorities, callbacks with higher priority are invoked first.
See also:
Summary
Public methods | |
---|---|
default
void
|
onBackCancelled()
Called when a back gesture or back button press has been cancelled. |
default
void
|
onBackProgressed(BackEvent backEvent)
Called when a back gesture progresses. |
default
void
|
onBackStarted(BackEvent backEvent)
Called when a back gesture has been started, or back button has been pressed down. |
Inherited methods | |
---|---|
Public methods
onBackCancelled
public void onBackCancelled ()
Called when a back gesture or back button press has been cancelled.
onBackProgressed
public void onBackProgressed (BackEvent backEvent)
Called when a back gesture progresses.
Parameters | |
---|---|
backEvent |
BackEvent : An BackEvent object describing the progress event.
This value cannot be null . |
See also:
onBackStarted
public void onBackStarted (BackEvent backEvent)
Called when a back gesture has been started, or back button has been pressed down.
Parameters | |
---|---|
backEvent |
BackEvent : The BackEvent containing information about the touch or
button press.
This value cannot be null . |
See also: