title: Android: SlidingDrawer disappears under SurfaceView
body: <p>I'm trying to create a SlidingDrawer with LinearLayout content over a FrameLayout.  </p>
  
  <p>At first it all seems fine, I get my SlidingDrawer's handle at the bottom of the screen.
  But then, if I start dragging the handle up and the content starts showing, it gets clipped by the border rectangle of the handle. If I drag the handle all the way up the entire content eventually gets shown, however if I now drag the handle down, it will be clipped by the border rectangle of the content. Also, if the handle is all the way up, as soon as I start dragging it the whole content disappears.<br>
  I can still click on where the handle should be on the screen, drag it and the content would show, but I need to guess where the handle is.   </p>
  
  <p>What seems to be causing this is the fact that I have a SurfaceView in the xml file just before SlidingDrawer.<br>
  Removing the view from the xml solves this problem, however I need this view.  </p>
  
  <p>Here's the xml:  </p>
  
  <pre><code>&lt;FrameLayout
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="fill_parent" 
      android:layout_height="fill_parent"&gt;
  
      &lt;!--  Removing this DrawView from here solves the problem --&gt;
      &lt;com.package.DrawView 
          android:id="@+id/main"
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"
      /&gt;
  
      &lt;SlidingDrawer  
          android:id="@+id/SlidingDrawer"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:allowSingleTap="true"
          android:animateOnClick="true"
          android:handle="@+id/slideHandleButton"
          android:content="@+id/contentLayout" 
          android:padding="10dip"&gt;
  
          &lt;Button
              android:id="@+id/slideHandleButton"
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:background="@drawable/sliding_button"&gt;
          &lt;/Button&gt;
  
          &lt;LinearLayout
              android:id="@+id/contentLayout"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:orientation="vertical"&gt;
  
              &lt;Button 
                  android:id="@+id/clearButton" 
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:text="Test"&gt;
              &lt;/Button&gt;
  
          &lt;/LinearLayout&gt;
  
      &lt;/SlidingDrawer&gt;
  
  &lt;/FrameLayout&gt;   
  </code></pre>
  
  <p>Java:</p>
  
  <pre><code>package com.package;
  
  import android.app.Activity;
  import android.os.Bundle;
  
  public class SlideTest extends Activity 
  {
      /** Called when the activity is first created. */
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
  
          setContentView(R.layout.main);
      }
  }
  
  package com.package;
  
  import android.content.Context;
  import android.util.AttributeSet;
  import android.view.SurfaceView;
  
  public class DrawView extends SurfaceView
  {
      public DrawView(Context context, AttributeSet attrs) {
          super(context, attrs);
      }
  }
  </code></pre>
  
  <p>Edit: I just noticed that if DrawView extends View and not SurfaceView this problem goes away.
  However, I'm using a dedicated drawing thread and according to the documentation (and LunarLander example) when using a dedicated drawing thread, it should draw to a SurfaceView.</p>
  
  <p>Any help would be greatly appreciated!</p>