@Override
  public void onDrawerStateChanged(int state) {
    mDrawerToggle.onDrawerStateChanged(state);
    switch (state) {
      case DrawerLayout.STATE_DRAGGING:
      case DrawerLayout.STATE_SETTLING:
        startTransition();
        break;
      case DrawerLayout.STATE_IDLE:
        stopTransition();
        break;
    }

    if (mDrawerListener != null) {
      mDrawerListener.onDrawerStateChanged(state);
    }
  }
 @Override
 public void onDrawerStateChanged(int newState) {
   if (mDrawerToggle != null) mDrawerToggle.onDrawerStateChanged(newState);
 }