コード例 #1
0
 @Override
 public void setMenu(Menu menu, MenuPresenter.Callback cb) {
   if (mActionMenuPresenter == null) {
     mActionMenuPresenter = new ActionMenuPresenter(mToolbar.getContext());
     mActionMenuPresenter.setId(R.id.action_menu_presenter);
   }
   mActionMenuPresenter.setCallback(cb);
   mToolbar.setMenu((MBuilder) menu, mActionMenuPresenter);
 }