code: @Override
      public void setSupportActionBar(@Nullable Toolbar toolbar) {
          if (toolbar != null) {
              if (toolbar != mDefaultToolbar && mDefaultToolbar.getVisibility() != View.GONE) {
                  mDefaultToolbar.setVisibility(View.GONE);
              }
  
              super.setSupportActionBar(toolbar);
  
              mDrawerToggle = new ActionBarDrawerToggle(this, mDrawer, toolbar, R.string.md_content_description_drawer_open, R.string.md_content_description_drawer_close) {
                  public void onDrawerClosed(View view) {
                      invalidateOptionsMenu();
                  }
  
                  public void onDrawerOpened(View drawerView) {
                      invalidateOptionsMenu();
                  }
              };
              mDrawerToggle.syncState();
              mDrawer.addDrawerListener(mDrawerToggle);
  
              mDrawer.setOnItemClickListener(new DrawerItem.OnItemClickListener() {
                  @Override
                  public void onClick(DrawerItem item, long id, int position) {
                      if (item instanceof DrawerFragmentItem && ((DrawerFragmentItem) item).hasFragment()) {
                          switchFragment(((DrawerFragmentItem) item).getFragment());
                      }
                      if (item.hasOnItemClickListener()) {
                          item.getOnItemClickListener().onClick(item, id, position);
                      } else {
                          if (hasOnItemClickListener()) {
                              mOnItemClickListener.onClick(item, id, position);
                          }
                      }
                  }
              });
              mDrawer.setOnFixedItemClickListener(new DrawerItem.OnItemClickListener() {
                  @Override
                  public void onClick(DrawerItem item, long id, int position) {
                      if (item instanceof DrawerFragmentItem && ((DrawerFragmentItem) item).hasFragment()) {
                          switchFragment(((DrawerFragmentItem) item).getFragment());
                      }
                      if (item.hasOnItemClickListener()) {
                          item.getOnItemClickListener().onClick(item, id, position);
                      } else {
                          if (hasOnItemClickListener()) {
                              mOnFixedItemClickListener.onClick(item, id, position);
                          }
                      }
                  }
              });
          }
      }
docs: Set a {@link Toolbar} to act as the {@link android.support.v7.app.ActionBar}ActionBar for this Activity window.
  You must take care of hiding the old {@link Toolbar} if necessary.
  
  @param toolbar Toolbar to set as the Activity's action bar