public override void UpdateData() { base.UpdateData(); MenuCell = new SideMenuCell(this); SideMenuListView?.UpdateDataSource(MenuManager.Instance.GetMenuItem()); if (RootViewSide != null) { RootViewSide.Click -= MenuAction; RootViewSide.Click += MenuAction; } if (SideImage != null) { SideImage?.SetImageFromResource(DrawableConstants.MenuOpenIcon); SideImage?.SetSelected(ColorConstants.BlackColor); SideImage.Click -= MenuAction; SideImage.Click += MenuAction; } if (!SideContainer.IsNull()) { SideContainer.SetBackgroundColor(ColorConstants.SelectorHome); SideContainer.Click += SideContainer_click; SideContainer.Click += SideContainer_click; } SideMenuListView?.UpdateDataSource(MenuManager.Instance.GetMenuItem()); SetupHeaderView(); }
protected override void InitViews() { base.InitViews(); SideMenuListView.VerticalScrollBarEnabled = false; if (ModelView.TypeMenu == ProjectNavigationBaseViewModel.HeaderAreaActionType.Back) { Drawer?.SetDrawerLockMode(DrawerLayout.LockModeLockedClosed); } Drawer?.SetScrimColor(Color.Transparent); SideMenuListView?.SetAdapter(ComponentAdapterRecyclerFactory.CreateAdapter((inflater, parent) => new MenuCellViewHolder(inflater, parent, ModelView.MenuCell))); }