diff --git a/TheGameExtreme.Android/MainActivity.cs b/TheGameExtreme.Android/MainActivity.cs index 820c3d1..8a6d4ef 100644 --- a/TheGameExtreme.Android/MainActivity.cs +++ b/TheGameExtreme.Android/MainActivity.cs @@ -10,7 +10,7 @@ using Xamarin.Forms; namespace TheGameExtreme.Droid { - [Activity(Label = "OrderStacks", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation, ScreenOrientation = ScreenOrientation.Landscape)] + [Activity(Label = "OrderStacks", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation, ScreenOrientation = ScreenOrientation.Landscape)] // ConfigChanges.Navigation public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity { @@ -18,22 +18,16 @@ namespace TheGameExtreme.Droid { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; - - /*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;*/ base.OnCreate(savedInstanceState); Rg.Plugins.Popup.Popup.Init(this, savedInstanceState); Xamarin.Essentials.Platform.Init(this, savedInstanceState); global::Xamarin.Forms.Forms.Init(this, savedInstanceState); + this.Window.DecorView.SystemUiVisibility = (StatusBarVisibility)SystemUiFlags.HideNavigation; LoadApplication(new App()); Window.SetStatusBarColor(Android.Graphics.Color.Argb(255, 0, 0, 0)); this.Window.AddFlags(WindowManagerFlags.Fullscreen | WindowManagerFlags.TurnScreenOn); - + } public override void OnRequestPermissionsResult(int requestCode, string[] permissions, [GeneratedEnum] Android.Content.PM.Permission[] grantResults) { diff --git a/TheGameExtreme.Android/Properties/AndroidManifest.xml b/TheGameExtreme.Android/Properties/AndroidManifest.xml index 84a14d8..8895c42 100644 --- a/TheGameExtreme.Android/Properties/AndroidManifest.xml +++ b/TheGameExtreme.Android/Properties/AndroidManifest.xml @@ -1,4 +1,4 @@ - + diff --git a/TheGameExtreme/view/App.xaml.cs b/TheGameExtreme/view/App.xaml.cs index b77a7be..5a94e3d 100644 --- a/TheGameExtreme/view/App.xaml.cs +++ b/TheGameExtreme/view/App.xaml.cs @@ -10,7 +10,8 @@ namespace TheGameExtreme public App() { InitializeComponent(); - + + NavigationPage.SetHasNavigationBar(this, false); MainPage = new NavigationPage(new HomePage()); } diff --git a/TheGameExtreme/view/GamePreparationPage.xaml.cs b/TheGameExtreme/view/GamePreparationPage.xaml.cs index 2db9fef..4aa390f 100644 --- a/TheGameExtreme/view/GamePreparationPage.xaml.cs +++ b/TheGameExtreme/view/GamePreparationPage.xaml.cs @@ -17,7 +17,9 @@ namespace TheGameExtreme.view public GamePreparationPage() { InitializeComponent(); + NavigationPage.SetHasNavigationBar(this, false); + LoadParameterName(); PlayerSelecter.ItemsSource = listNbPlayer; @@ -42,7 +44,10 @@ namespace TheGameExtreme.view IOGamePreparation.SaveParameterGamePreparationGameModeValue(SelectMode.SelectedIndex); IOGamePreparation.SaveParameterGamePreparationNbStacks(SelectNbStack.SelectedIndex); IOGamePreparation.SaveParameterGamePreparationNbCards(SelectNbCard.SelectedIndex); - IOGamePreparation.SaveParameterGamePreparationName(FirstEntry.Text); + if ((int)PlayerSelecter.SelectedItem == 1) + { + IOGamePreparation.SaveParameterGamePreparationName(FirstEntry.Text); + } await Navigation.PopAsync(); } @@ -52,7 +57,10 @@ namespace TheGameExtreme.view IOGamePreparation.SaveParameterGamePreparationGameModeValue(SelectMode.SelectedIndex); IOGamePreparation.SaveParameterGamePreparationNbStacks(SelectNbStack.SelectedIndex); IOGamePreparation.SaveParameterGamePreparationNbCards(SelectNbCard.SelectedIndex); - IOGamePreparation.SaveParameterGamePreparationName(FirstEntry.Text); + if ((int)PlayerSelecter.SelectedItem == 1) + { + IOGamePreparation.SaveParameterGamePreparationName(FirstEntry.Text); + } return base.OnBackButtonPressed(); } @@ -80,6 +88,14 @@ namespace TheGameExtreme.view private void ChangedPseudo(object sender, EventArgs args) { + if ((int)PlayerSelecter.SelectedItem == 1) + { + LoadParameterName(); + } + else + { + FirstEntry.Text = ""; + } while (NameList.Children.Count - 1 != (int)PlayerSelecter.SelectedItem) { if (NameList.Children.Count - 1 < (int)PlayerSelecter.SelectedItem) diff --git a/TheGameExtreme/view/HomePage.xaml b/TheGameExtreme/view/HomePage.xaml index ab791b6..f1f5811 100644 --- a/TheGameExtreme/view/HomePage.xaml +++ b/TheGameExtreme/view/HomePage.xaml @@ -8,112 +8,110 @@ x:Class="TheGameExtreme.view.HomePage" x:Name="homepageT"> - - - - - - - - - - - - - - - - - - - -