diff --git a/TheGameExtreme.Android/MainActivity.cs b/TheGameExtreme.Android/MainActivity.cs index c33445d..c698caf 100644 --- a/TheGameExtreme.Android/MainActivity.cs +++ b/TheGameExtreme.Android/MainActivity.cs @@ -1,4 +1,4 @@ -using System; +using System; using Android.App; using Android.Content.PM; diff --git a/TheGameExtreme.Android/MainActivity.cs.orig b/TheGameExtreme.Android/MainActivity.cs.orig new file mode 100644 index 0000000..42d5b86 --- /dev/null +++ b/TheGameExtreme.Android/MainActivity.cs.orig @@ -0,0 +1,78 @@ +using System; + +using Android.App; +using Android.Content.PM; +using Android.Runtime; +using Android.Views; +using Android.Widget; +using Android.OS; +using Xamarin.Forms; + +namespace TheGameExtreme.Droid +{ + [Activity(Label = "OrderStacks", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation, ScreenOrientation = ScreenOrientation.Landscape)] + + public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity + { + protected override void OnCreate(Bundle savedInstanceState) + { + base.OnCreate(savedInstanceState); + + TabLayoutResource = Resource.Layout.Tabbar; + ToolbarResource = Resource.Layout.Toolbar; + Xamarin.Essentials.Platform.Init(this, savedInstanceState); + Forms.Init(this, savedInstanceState); + LoadApplication(new App()); + } + +<<<<<<< HEAD + public override void OnWindowFocusChanged(bool hasFocus) + { + base.OnWindowFocusChanged(hasFocus); + if (hasFocus) + { + BarClose(); + } + } + + public override void OnUserInteraction() + { + base.OnUserInteraction(); + BarClose(); + } +======= + + + int uiOptions = (int)Window.DecorView.SystemUiVisibility; + uiOptions |= (int)SystemUiFlags.LowProfile; + uiOptions |= (int)SystemUiFlags.Fullscreen; + uiOptions |= (int)SystemUiFlags.HideNavigation; + uiOptions |= (int)SystemUiFlags.ImmersiveSticky; + Window.DecorView.SystemUiVisibility = (StatusBarVisibility)uiOptions; + Window.SetStatusBarColor(Android.Graphics.Color.Argb(255, 0, 0, 0)); + Window.AddFlags(WindowManagerFlags.Fullscreen | WindowManagerFlags.TurnScreenOn); + +>>>>>>> 952c6827ab474c97c8f5426f3ea43c3472005093 + + private void BarClose() + { + Window.AddFlags(WindowManagerFlags.Fullscreen | WindowManagerFlags.TurnScreenOn); + Window.DecorView.SystemUiVisibility = (StatusBarVisibility) + (SystemUiFlags.LowProfile + | SystemUiFlags.Fullscreen + | SystemUiFlags.HideNavigation + | SystemUiFlags.Immersive + | SystemUiFlags.ImmersiveSticky + ); + } + + public override void OnRequestPermissionsResult(int requestCode, string[] permissions, [GeneratedEnum] Permission[] grantResults) + { + Xamarin.Essentials.Platform.OnRequestPermissionsResult(requestCode, permissions, grantResults); + + base.OnRequestPermissionsResult(requestCode, permissions, grantResults); + } + + + } +} diff --git a/TheGameExtreme/TheGameExtreme.csproj b/TheGameExtreme/TheGameExtreme.csproj index f7dd762..ee1cd44 100644 --- a/TheGameExtreme/TheGameExtreme.csproj +++ b/TheGameExtreme/TheGameExtreme.csproj @@ -2,7 +2,10 @@ netstandard2.0 - true + true + + Library + diff --git a/TheGameExtreme/view/GamePreparationPage.xaml.cs b/TheGameExtreme/view/GamePreparationPage.xaml.cs index 76532e2..b100345 100644 --- a/TheGameExtreme/view/GamePreparationPage.xaml.cs +++ b/TheGameExtreme/view/GamePreparationPage.xaml.cs @@ -12,7 +12,7 @@ namespace TheGameExtreme.view public List listGameMode = new List { AppResources.TypeValueWhole, AppResources.TypeValueRelative, AppResources.TypeValueTenthFract, AppResources.TypeValueHundredthFract, AppResources.TypeValueThousandthFract, AppResources.TypeValuefractionated, AppResources.TypeValueTenth, AppResources.TypeValueHundredth }; public List listNbStack = new List { 4, 6, 8 }; public List listNbCard = new List { 100, 80, 60, 40 }; - + public GamePreparationPage() { @@ -34,10 +34,9 @@ namespace TheGameExtreme.view SelectNbCard.ItemsSource = listNbCard; LoadParameterNbCardsGamePreparation(); - - } + private async void Back(object sender, EventArgs e) { IOGamePreparation.SaveParamaterGamePreparationNbPlayers(PlayerSelecter.SelectedIndex); diff --git a/TheGameExtreme/view/HomePage.xaml.cs b/TheGameExtreme/view/HomePage.xaml.cs index 36a484d..0ee01bd 100644 --- a/TheGameExtreme/view/HomePage.xaml.cs +++ b/TheGameExtreme/view/HomePage.xaml.cs @@ -13,6 +13,7 @@ namespace TheGameExtreme.view InitializeComponent(); NavigationPage.SetHasNavigationBar(this, false); + NavigationPage.SetHasBackButton(this, false); LoadParameterOptionOnHomepage(); }