private void CheckIfMenuIsNeeded(CustomFragmentInfo myCustomInfo) { //If not root, we will block the menu sliding gesture and show the back button on top if (myCustomInfo == null || myCustomInfo.IsRoot) { ShowHamburgerMenu(); } else { ShowBackButton(); } }
/// <summary> /// Shows the specified my custom information. /// </summary> /// <param name="myCustomInfo">My custom information.</param> /// <returns></returns> public bool Show(CustomFragmentInfo myCustomInfo) { try { var title = string.Empty; var section = ViewModel.GetSectionForViewModelType(myCustomInfo.ViewModelType); switch (section) { case Section.Drafts: { title = LanguageResolver.Drafts.ToUpperInvariant(); SetMenuIconAndBadge(); } break; case Section.Outbox: { title = LanguageResolver.Outbox.ToUpperInvariant(); //PreviousTitle = SupportActionBar.Title; SetMenuIconAndBadge(); } break; case Section.Sent: { title = LanguageResolver.Sent.ToUpperInvariant(); SetMenuIconAndBadge(); } break; case Section.Settings: { title = LanguageResolver.MenuSettings.ToUpperInvariant(); SetMenuIconAndBadge(); } break; } _drawerList.SetItemChecked(ViewModel.MenuItems.FindIndex(m => m.Id == (int)section), true); SupportActionBar.Title = _title = title; return(true); } finally { _drawer.CloseDrawer(_drawerList); } }
public override void OnFragmentChanged(IMvxCachedFragmentInfo fragmentInfo) { currentFragmentInfo = fragmentInfo as CustomFragmentInfo; }
public bool Show(CustomFragmentInfo myCustomInfo) { try { var title = string.Empty; var section = ViewModel.GetSectionForViewModelType(myCustomInfo.ViewModelType); switch (section) { case Section.Search: { title = LanguageResolver.MenuSearch.ToUpperInvariant(); SetMenuIconAndBadge(); } break; case Section.ProviderList: { title = LanguageResolver.ListOfCustomers.ToUpperInvariant(); SetMenuIconAndBadge(); } break; case Section.AddCustomer: { title = LanguageResolver.AddNewCustomer.ToUpperInvariant(); SetMenuIconAndBadge(); } break; case Section.AddAddress: { title = LanguageResolver.MenuManageAddresses.ToUpperInvariant(); SetMenuIconAndBadge(); } break; case Section.AcceptPayment: { title = LanguageResolver.AcceptAPayment.ToUpperInvariant(); SetMenuIconAndBadge(); } break; case Section.Settings: { title = LanguageResolver.MenuSettings.ToUpperInvariant(); SetMenuIconAndBadge(); } break; case Section.ProviderDetails: { title = LanguageResolver.CustomerDetails.ToUpperInvariant(); PreviousTitle = SupportActionBar.Title; } break; case Section.AssetInstallSummary: { title = "NEW INSTALLATION"; PreviousTitle = SupportActionBar.Title; } break; } _drawerList.SetItemChecked(ViewModel.MenuItems.FindIndex(m => m.Id == (int)section), true); SupportActionBar.Title = _title = title; return(true); } finally { _drawer.CloseDrawer(_drawerList); } }