public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions) { // Override point for customization after application launch. // If not required for your application you can safely delete this method string dbpath = FileAccessHelper.GetLocalFilePath("ethanslist.db3"); databaseConnection = new DatabaseConnection(dbpath); // Code to start the Xamarin Test Cloud Agent #if ENABLE_TEST_CLOUD Xamarin.Calabash.Start(); #endif UIApplication.SharedApplication.SetStatusBarStyle(UIStatusBarStyle.LightContent, false); UINavigationBar.Appearance.BarTintColor = ColorScheme.WetAsphalt; UINavigationBar.Appearance.TintColor = ColorScheme.Clouds; UINavigationBar.Appearance.TitleTextAttributes = new UIStringAttributes() { Font = UIFont.FromName(Constants.NormalFont, 16f), ForegroundColor = ColorScheme.Clouds, }; #if RELEASE Insights.Initialize("ec87be89090cdee48f57cce9ee5ca4d230b1f314"); #endif return true; }
protected override void OnCreate(Bundle bundle) { //TODO: Create appropriately sized placeholder image base.OnCreate(bundle); Instance = this; string dbpath = FileAccessHelper.GetLocalFilePath("ethanslist.db3"); databaseConnection = new DatabaseConnection(dbpath); // Create UI SetContentView(Resource.Layout.Main); drawerLayout = FindViewById<DrawerLayout>(Resource.Id.drawer_layout); // Init toolbar var toolbar = FindViewById<Toolbar>(Resource.Id.toolbar); SetSupportActionBar(toolbar); // Attach item selected handler to navigation view var navigationView = FindViewById<NavigationView>(Resource.Id.nav_view); navigationView.NavigationItemSelected += NavigationView_NavigationItemSelected; // Create ActionBarDrawerToggle button and add it to the toolbar var drawerToggle = new ActionBarDrawerToggle(this, drawerLayout, toolbar, Resource.String.open_drawer, Resource.String.close_drawer); drawerLayout.SetDrawerListener(drawerToggle); drawerToggle.SyncState(); base.SupportFragmentManager.BeginTransaction().Replace(Resource.Id.frameLayout, fragments[0]).Commit(); }