Activity.OnBackPressed Activity.OnBackPressed Method


Called when the activity has detected the user's press of the back key.

[Android.Runtime.Register("onBackPressed", "()V", "GetOnBackPressedHandler", ApiSince=5)]
public virtual void OnBackPressed ();
abstract member OnBackPressed : unit -> unit
override this.OnBackPressed : unit -> unit


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