title: Floating Icon with Navigation Drawer Animation is not hiding while drawer is open
body: <p>I am using Floating icon and <code>NavigationDrawer</code> but when I open Drawer my animation of floating icon is not close they are remain open and when I used <code>alpha 1-slideOffset</code>, icons are hiding but working on click what should I do to completely close animation while drawer is open?</p>
  
  <p>I am also working with different <code>SDK</code> devices. Is it possible to use same code for all devices?
  <br />
  This is what I've tried:</p>
  
  <pre><code> private void initUi() {
  
      fab_1 = (FloatingMenuButton) findViewById(R.id.fab_1);
      if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.JELLY_BEAN) {
          fab_1.setStartAngle(0)
                  .setEndAngle(360)
                  .setRadius(150)
                  .setAnimationType(AnimationType.EXPAND)
                  .setMovementStyle(MovementStyle.FREE);
      }
      if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.JELLY_BEAN_MR1) {
          fab_1.setStartAngle(0)
                  .setEndAngle(360)
                  .setRadius(150)
                  .setAnimationType(AnimationType.EXPAND)
                  .setMovementStyle(MovementStyle.FREE);
      }
      if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.JELLY_BEAN_MR2) {
          fab_1.setStartAngle(0)
                  .setEndAngle(360)
                  .setRadius(150)
                  .setAnimationType(AnimationType.EXPAND)
                  .setMovementStyle(MovementStyle.FREE);
      }
      if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.KITKAT) {
          fab_1.setStartAngle(0)
                  .setEndAngle(360)
                  .setRadius(150)
                  .setAnimationType(AnimationType.EXPAND)
                  .setMovementStyle(MovementStyle.FREE);
      }
      if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.KITKAT_WATCH) {
          fab_1.setStartAngle(0)
                  .setEndAngle(360)
                  .setRadius(160)
                  .setAnimationType(AnimationType.EXPAND)
                  .setMovementStyle(MovementStyle.FREE);
      }
  
      if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.LOLLIPOP) {
          fab_1.setStartAngle(0)
                  .setEndAngle(360)
                  .setRadius(200)
                  .setAnimationType(AnimationType.EXPAND)
                  .setMovementStyle(MovementStyle.FREE);
      }
  
      if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.LOLLIPOP_MR1) {
          fab_1.setStartAngle(0)
                  .setEndAngle(360)
                  .setRadius(200)
                  .setAnimationType(AnimationType.EXPAND)
                  .setMovementStyle(MovementStyle.FREE);
      }
      if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.M) {
          fab_1.setStartAngle(0)
                  .setEndAngle(360)
                  .setRadius(350)
                  .setAnimationType(AnimationType.EXPAND)
                  .setMovementStyle(MovementStyle.FREE);
      }
      if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.N) {
          fab_1.setStartAngle(0)
                  .setEndAngle(360)
                  .setRadius(500)
                  .setAnimationType(AnimationType.EXPAND)
                  .setMovementStyle(MovementStyle.FREE);
      }
      if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.O) {
          fab_1.setStartAngle(0)
                  .setEndAngle(360)
                  .setRadius(250)
                  .setAnimationType(AnimationType.EXPAND)
                  .setMovementStyle(MovementStyle.FREE);
      }
      if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.O_MR1) {
          fab_1.setStartAngle(0)
                  .setEndAngle(360)
                  .setRadius(150)
                  .setAnimationType(AnimationType.EXPAND)
                  .setMovementStyle(MovementStyle.FREE);
      }
  
  
      fab_1.getAnimationHandler()
              .setOpeningAnimationDuration(500)
              .setClosingAnimationDuration(200)
              .setLagBetweenItems(0)
  
  
  
  
              .setOpeningInterpolator(new FastOutSlowInInterpolator())
  
              .setClosingInterpolator(new FastOutLinearInInterpolator())
              .shouldFade(false)
              .shouldScale(true)
  
              .shouldRotate(false);
  
  
      Poultry= (FloatingSubButton) findViewById(R.id.fab_1_sub_fab_left_1);
      Poultry.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View view) {
              Intent intent = new Intent(FloatingActivity.this, PoultryActivity.class);
              startActivity(intent);
          }
      });
  
  
  
  
      //Navigation Drawer
  
  
  dl = (DrawerLayout)findViewById(R.id.activity_main);
  t = new ActionBarDrawerToggle(this, dl, R.string.Open,
          R.string.Close){
  
          public void onDrawerClosed(View view) {
              // Visible/Enable the FAB
  
          }
  
          public void onDrawerOpened(View drawerView) {
              // Hide/Disable the FAB
  
          }
  
          @Override
          public void onDrawerSlide(View drawerView, float slideOffset) {
              // invert the slideOffset value
  
              fab_1.setAlpha((1/255)*slideOffset);
  
  
          }
      };
  
  
      dl.addDrawerListener(t);
      t.syncState();
  
  
  getSupportActionBar().setDisplayHomeAsUpEnabled(true);
  
  nv = (NavigationView)findViewById(R.id.nv);
      nv.setNavigationItemSelectedListener(new NavigationView.OnNavigationItemSelectedListener() {
      @Override
      public boolean onNavigationItemSelected(@NonNull MenuItem item) {
  
          int id=item.getItemId();
      if (id == R.id.account){
          Intent intent = (new Intent(FloatingActivity.this, ComplaintSplash.class));
          startActivity(intent);
      }
  
  
  
          switch(id)
          {
              case R.id.account:
                  Toast.makeText(FloatingActivity.this, "Complain ",Toast.LENGTH_SHORT).show();
              case R.id.settings:
                  Toast.makeText(FloatingActivity.this, "Commissioner Karachi Division",Toast.LENGTH_SHORT).show();
              case R.id.mycart:
                  Toast.makeText(FloatingActivity.this, "About Consumer Rights Council",Toast.LENGTH_SHORT).show();
  
              case R.id.PrivacyPolicy:
                  Toast.makeText(FloatingActivity.this, "Privacy Policy",Toast.LENGTH_SHORT).show();
              default:
                  return true;
          }
      }
      });
  
  
  }
  
  @Override
  public boolean onOptionsItemSelected(MenuItem item) {
  
          if(t.onOptionsItemSelected(item))
              return true;
  
           return super.onOptionsItemSelected(item);
      }
  
  }
  </code></pre>