title: how to close the slidind drawer with the return button - android
body: <p>i try to close the sliding drawer when i click on the return back key but its not working 
  here is the code i used </p>
  
  <pre><code>@Override
  public void onBackPressed() {
     Log.d("onBackPressed Called", FROM_SETTINGS_KEY);
        slidingDrawer.close();
  
  }
  </code></pre>
  
  <p>the xml :</p>
  
  <pre><code>&lt;SlidingDrawer
      android:id="@+id/slidingDrawer1"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:layout_alignParentTop="true"
      android:layout_centerHorizontal="true"
      android:layout_marginTop="197dp"
      android:content="@+id/content"
      android:handle="@+id/handle" &gt;
  
      &lt;Button
          android:id="@+id/handle"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="Handle" /&gt;
  
      &lt;LinearLayout
          android:id="@+id/content"
          android:layout_width="match_parent"
          android:layout_height="match_parent" &gt;
      &lt;/LinearLayout&gt;
  &lt;/SlidingDrawer&gt;
  </code></pre>
  
  <p>so how can i make the return back key close this sliding drawer ?</p>