コード例 #1
0
 // 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;
     }
 }
コード例 #2
0
 // Hide details section on back key press
 public override void OnBackKeyPress(CancellationEventArgs e)
 {
     base.OnBackKeyPress(e);
     if (DetailsSection.activeSelf)
     {
         HideContentDetails();
         e.CancelEvent = true;
     }
 }
コード例 #3
0
 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");
     }
 }
コード例 #4
0
 public void HandleBackKeyPress()
 {
     if (currentPage != null)
     {
         var e = new CancellationEventArgs()
         {
             CancelEvent = false
         };
         currentPage.OnBackKeyPress(e);
         if (!e.CancelEvent)
         {
             Back();
         }
     }
 }
コード例 #5
0
 /// <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");
 }