title: Why is isDrawerVisible always showing as false
body: <p>So, I have this </p>
  
  <pre><code>btn_menu.setOnClickListener(new View.OnClickListener() {
  @Override
  
          public void onClick(View v) {if(mDrawerLayout.isDrawerVisible(R.id.drawer_layout) == false) {
                  mDrawerLayout.openDrawer(mDrawerList);
                  Log.d("False", "" + mDrawerLayout.isDrawerOpen(R.id.drawer_layout));
              } else {
                  mDrawerLayout.closeDrawer(mDrawerLayout);
                  Log.d("True", "" + mDrawerLayout.isDrawerOpen(R.id.drawer_layout));
              }
          }
      });
  </code></pre>
  
  <p>On the "btn_menu" click I will open and close the drawer, thing is that no matter what I do the method "isDrawerOpen" will ALWAYS return false. I don't know what else to do.</p>
  
  <p>Here is the layout:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:id="@+id/drawer_layout"
  android:layout_width="match_parent"
  android:layout_height="match_parent" &gt;
  
  &lt;FrameLayout
  android:id="@+id/content_frame"
  android:layout_width="match_parent"
  android:layout_height="match_parent" /&gt;
  &lt;!-- The navigation drawer --&gt;
  
  &lt;ExpandableListView
  android:id="@+id/left_drawer"
  android:layout_width="240dp"
  android:layout_height="match_parent"
  android:layout_gravity="start"
  android:background="#111"
  android:choiceMode="singleChoice"
  android:divider="@android:color/transparent"
  android:dividerHeight="0dp" /&gt;
  
  &lt;/android.support.v4.widget.DrawerLayout&gt;
  </code></pre>
  
  <p>Edit: blipinsk answer was right. But I had to change the if test too. </p>
  
  <pre><code>if (mDrawerLayout.isDrawerOpen(Gravity.LEFT)) {
                      mDrawerLayout.closeDrawer(Gravity.LEFT);
                  } else {
                      mDrawerLayout.openDrawer(Gravity.LEFT);
                  }
  </code></pre>