// Hide the share popup when hardware back button is pressed public override void OnBackKeyPress(CancellationEventArgs e) { base.OnBackKeyPress(e); if (sharePopup.activeSelf) { sharePopup.SetActive(false); e.CancelEvent = true; } }
// Hide details section on back key press public override void OnBackKeyPress(CancellationEventArgs e) { base.OnBackKeyPress(e); if (DetailsSection.activeSelf) { HideContentDetails(); e.CancelEvent = true; } }
public override void OnBackKeyPress(CancellationEventArgs e) { e.CancelEvent = true; if (firstBackKeyPress.AddSeconds(2) > DateTime.Now) { Application.Quit(); } else { firstBackKeyPress = DateTime.Now; PagesManager.DisplayToast("Press Back again to exit"); } }
public void HandleBackKeyPress() { if (currentPage != null) { var e = new CancellationEventArgs() { CancelEvent = false }; currentPage.OnBackKeyPress(e); if (!e.CancelEvent) { Back(); } } }
/// <summary> /// This function is called when hardware back key is pressed /// </summary> /// <param name="e"></param> public virtual void OnBackKeyPress(CancellationEventArgs e) { Debug.Log("Back key press"); }