title: Android: SurfaceView and Z-Level Question
body: <p>I have a FrameLayout containing first a SurfaceView, and second a RelativeLayout which in turn contians various Buttons and TextViews.</p>
  
  <p>Upon the canvas of the SurfaceView I am drawing numerous Bitmaps, and, via Touch and Motion Events am allowing the user to drag them around.</p>
  
  <p>These Bitmaps, when dragged around pass <em>underneath</em> the Buttons etc that are inside the RelativeLayout.</p>
  
  <p>Now, it's my (possibly mistaken) understanding that the "Z-level" of the SurfaceView, or whatever it has that passes for it, is entirely unrelated to the <em>actual</em> Z-level of the rest of the Layout.  Is this the case?  If so, how may I get around it, so that dragged Bitmaps are drawn ontop of other Views?  Or what other way can I implement a full-screen canvas and yet not have my buttons etc act like the controls of an overlay.</p>
  
  <p>I guess what I actually need is an <em>underlay</em>, where touch events can still be picked up by the Buttons etc underneath. But I don't know how to achieve this, as, when redrawing my Canvas, I have to also redraw the background.</p>
  
  <p>Can I swap the order of the RelativeLayout and the SurfaceView inside the FrameLayout, and then make the background of the Canvas transparent?  If so how?  Will touch events still "fall through" to the buttons underneath?</p>
  
  <p>Thanks for bearing with me, I know I'm a bit of a waffler.</p>