private void Init() { drawerLayout = FindViewById <DrawerLayout>(Resource.Id.DrawerLayout); drawerMenu = FindViewById <LinearLayout>(Resource.Id.LeftMenu); var Toolbar = FindViewById <Toolbar>(Resource.Id.toolbar); if (Toolbar != null) { SetActionBar(Toolbar); } drawerToggle = new CustomDrawerToggle(this, drawerLayout, 0, 0); drawerLayout.AddDrawerListener(drawerToggle); drawerToggle.SyncState(); drawerLayout.CloseDrawer(drawerMenu); var bottomNavigation = FindViewById <BottomNavigationView>(Resource.Id.bottom_navigation); var fragments = new List <MvxViewPagerFragmentInfo>() { new MvxViewPagerFragmentInfo("First", typeof(FirstView), new FirstViewModel()), new MvxViewPagerFragmentInfo("Second", typeof(SecondView), new SecondViewModel()) }; var adapter = new MvxCachingFragmentStatePagerAdapter(this, SupportFragmentManager, fragments); viewPager = FindViewById <ViewPager>(Resource.Id.viewPager); viewPager.Adapter = adapter; bottomNavigation.SetOnNavigationItemSelectedListener(this); }
private void Init() { drawerLayout = FindViewById <DrawerLayout>(Resource.Id.DrawerLayout); drawerMenu = FindViewById <LinearLayout>(Resource.Id.LeftMenu); var Toolbar = FindViewById <Toolbar>(Resource.Id.toolbar); if (Toolbar != null) { SetActionBar(Toolbar); } drawerToggle = new CustomDrawerToggle(this, drawerLayout, 0, 0); drawerLayout.AddDrawerListener(drawerToggle); drawerToggle.SyncState(); drawerLayout.CloseDrawer(drawerMenu); ViewModel.MainScreenCommand.Execute(null); }