mirror of
https://github.com/Nioux/AideDeJeu.git
synced 2025-10-30 15:06:06 +00:00
Bouton back
This commit is contained in:
parent
7b176f7ee9
commit
f1c8efa2a2
2 changed files with 345 additions and 330 deletions
|
|
@ -8,6 +8,7 @@ using Android.Widget;
|
||||||
using Android.OS;
|
using Android.OS;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
namespace AideDeJeu.Droid
|
namespace AideDeJeu.Droid
|
||||||
{
|
{
|
||||||
|
|
@ -75,6 +76,19 @@ namespace AideDeJeu.Droid
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnBackPressed()
|
public override void OnBackPressed()
|
||||||
|
{
|
||||||
|
//new AlertDialog.Builder(this)
|
||||||
|
// .SetPositiveButton("OK", (sender, args) =>
|
||||||
|
// {
|
||||||
|
// })
|
||||||
|
// .SetMessage(Xamarin.Forms.Shell.Current.CurrentItem.Route)
|
||||||
|
// .SetTitle("OnBackPressed")
|
||||||
|
// .Show();
|
||||||
|
if (Xamarin.Forms.Shell.Current.Navigation.NavigationStack.Count == 1 && Xamarin.Forms.Shell.Current.CurrentItem.Route != "IMPL_home")
|
||||||
|
{
|
||||||
|
Xamarin.Forms.Shell.Current.GoToAsync("//home", true);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
if (Rg.Plugins.Popup.Popup.SendBackPressed(base.OnBackPressed))
|
if (Rg.Plugins.Popup.Popup.SendBackPressed(base.OnBackPressed))
|
||||||
{
|
{
|
||||||
|
|
@ -86,6 +100,7 @@ namespace AideDeJeu.Droid
|
||||||
// Do something if there are not any pages in the `PopupStack`
|
// Do something if there are not any pages in the `PopupStack`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public override void OnRequestPermissionsResult(int requestCode, string[] permissions, [GeneratedEnum] Android.Content.PM.Permission[] grantResults)
|
public override void OnRequestPermissionsResult(int requestCode, string[] permissions, [GeneratedEnum] Android.Content.PM.Permission[] grantResults)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue