public virtual void BindOptionsMenuView(IMobileOptionsMenuView view) { // This is used only on Android, where the Options menu is bound to the main activity. _optionsMenuView = view; _optionsMenuPresenter = Bootstrapper.GetContainer().Resolve<IMobileOptionsMenuPresenter>(); _optionsMenuPresenter.BindView(view); _optionsMenuView.OnViewDestroy = (theView) => { _optionsMenuPresenter.ViewDestroyed(); _optionsMenuPresenter = null; _optionsMenuView = null; }; }
private IMobileOptionsMenuView CreateOptionsMenuView() { // This is used only on iOS, where the Options menu is actually a tab named "More" Action<IBaseView> onViewReady = (view) => BindOptionsMenuView((IMobileOptionsMenuView)view); _optionsMenuView = Bootstrapper.GetContainer().Resolve<IMobileOptionsMenuView>(new NamedParameterOverloads() { { "onViewReady", onViewReady } }); return _optionsMenuView; }