コード例 #1
0
 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;
     };
 }
コード例 #2
0
 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;
 }