public App() { InitializeComponent(); #if DEBUG Settings.UserIsLoggedIn = false; #endif // As iOS and Android follow fundamenntally different navigation patterns, we split up the // navigation style between iOS and Android here. iOS is using a Tabbed Navigation, // while Android uses a Navigation Drawer (Hamburger Menu) if (Xamarin.Forms.Device.RuntimePlatform == Xamarin.Forms.Device.iOS) { // Create tabbed navigation for iOS // Tab Bar Color is set in AppDelegate.cs within the iOS project var tabbedNavigation = new FreshTabbedFONavigationContainer("Contoso"); tabbedNavigation.BarBackgroundColor = (Color)Current.Resources["BackgroundColorDark"]; tabbedNavigation.BarTextColor = (Color)Current.Resources["AccentColor"]; // Add first level navigationpages as tabs tabbedNavigation.AddTab <JobsPageModel>("Jobs", "icon_jobs.png"); tabbedNavigation.AddTab <PartsPageModel>("Parts", "icon_parts.png"); tabbedNavigation.AddTab <ProfilePageModel>("Me", "icon_user.png"); MainPage = tabbedNavigation; } else { var navContainer = new CustomAndroidNavigation("AndroidNavigation"); navContainer.Init("Menu", "hamburger.png"); navContainer.AddPage <JobsPageModel>("Jobs"); navContainer.AddPage <PartsPageModel>("Parts"); navContainer.AddPage <ProfilePageModel>("Me"); MainPage = navContainer; } }
public App() { InitializeComponent(); FlowListView.Init(); // Configure Monkey Cache Barrel.ApplicationId = "ContosoFieldService"; #if DEBUG Settings.LoginViewShown = false; #endif // Stop the keyboard overlaying the chatbot webview on Android (it isn't a problem on iOS). Xamarin.Forms.PlatformConfiguration.AndroidSpecific.Application.SetWindowSoftInputModeAdjust(this, Xamarin.Forms.PlatformConfiguration.AndroidSpecific.WindowSoftInputModeAdjust.Resize); // As iOS and Android follow fundamenntally different navigation patterns, we split up the // navigation style between iOS and Android here. iOS is using a Tabbed Navigation, // while Android uses a Navigation Drawer (Hamburger Menu) if (Xamarin.Forms.Device.RuntimePlatform == Xamarin.Forms.Device.iOS) { // Create tabbed navigation for iOS // Tab Bar Color is set in AppDelegate.cs within the iOS project var tabbedNavigation = new FreshTabbedFONavigationContainer("Contoso"); tabbedNavigation.BarBackgroundColor = (Color)Current.Resources["BackgroundColorDark"]; tabbedNavigation.BarTextColor = (Color)Current.Resources["AccentColor"]; // Add first level navigationpages as tabs tabbedNavigation.AddTab <JobsViewModel>("Jobs", "icon_jobs.png"); tabbedNavigation.AddTab <PartsViewModel>("Parts", "icon_parts.png"); tabbedNavigation.AddTab <ProfileViewModel>("Me", "icon_user.png"); MainPage = tabbedNavigation; } else { var navContainer = new CustomAndroidNavigation("AndroidNavigation"); navContainer.Init("Menu", "hamburger.png"); navContainer.AddPage <JobsViewModel>("Jobs"); navContainer.AddPage <PartsViewModel>("Parts"); navContainer.AddPage <ProfileViewModel>("Me"); navContainer.AddPage <BotViewModel>("Bot"); navContainer.AddPage <SettingsViewModel>("Settings"); MainPage = navContainer; } }