title: Android buttons not displaying on top of SurfaceView
body: <p>So in an Activity I have a SurfaceView which I use as a drawing canvas, and 2 layouts to provide UI function. There is a LinearLayout holding buttons and a RelativeLayout which I use later on (it is GONE from the start and called VISIBLE later).</p>
  
  <p>Now the button row doesn't appear correctly on the screen. The buttons are all washed out, as if they are trapped behind the canvas. I have tried setting the alpha with:</p>
  
  <pre><code> button.getBackground().setAlpha(255);
  </code></pre>
  
  <p>I have tried making the SurfaceView transparent as in <a href="https://stackoverflow.com/questions/5391089/how-to-make-surfaceview-transparent">how to make surfaceview transparent</a> but neither of these have worked. </p>
  
  <p>Interestingly if I set the background of the buttons to #ff000000 (as can be seen in some of the buttons below, been testing a few ideas) then it appears completely black on top of the canvas, although obviously it has now lost its button shape which is not what I want!</p>
  
  <p>Here's the layout:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:id="@+id/TopLevelView"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"&gt;
  
  &lt;!--  Drawing Surface --&gt;
  &lt;stu.test.project.DrawingSurface
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:id="@+id/drawingSurface"/&gt;
  
  &lt;!--  Button Row --&gt;
  &lt;LinearLayout
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:gravity="center"
          android:id="@+id/ButtonRow"&gt;
          &lt;!--  START BUTTON --&gt;
          &lt;Button
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Start"
              android:visibility="gone"
              android:id="@+id/startDrawingButtonId"/&gt;
          &lt;!--  FINISH BUTTON --&gt;
          &lt;Button
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Finish"
              android:visibility="gone"
              android:id="@+id/finishButtonId"/&gt;
          &lt;!--  RESET BUTTON --&gt;
          &lt;Button
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:background="#ff000000"
              android:text="Restart"
              android:visibility="gone"
              android:id="@+id/resetButtonId"/&gt;
          &lt;!--  HOME BUTTON --&gt;
          &lt;Button
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Home"
              android:background="#ff000000"
              android:visibility="gone"
              android:id="@+id/homeButtonId"/&gt;
          &lt;!--  RESTART BUTTON --&gt;
          &lt;Button
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Restart"
              android:background="#ff000000"
              android:visibility="gone"
              android:id="@+id/restartButtonId"/&gt;
          &lt;!--  SAVE BUTTON --&gt;
          &lt;Button
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Save"
              android:background="#ff000000"
              android:visibility="gone"
              android:id="@+id/saveButtonId"/&gt;
          &lt;!--  STATS BUTTON --&gt;
          &lt;Button
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Stats"
              android:visibility="gone"
              android:id="@+id/statsButtonId"/&gt;
          &lt;!--  EMAIL BUTTON --&gt;
          &lt;Button
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Send email"
              android:visibility="gone"
              android:background="#ff000000"
              android:id="@+id/emailButtonId"/&gt;
          &lt;!--  LOAD BUTTON --&gt;
          &lt;Button
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Load another record"
              android:visibility="gone"
              android:background="#ff000000"
              android:id="@+id/loadButtonId"/&gt;
          &lt;!--  MARKS BUTTON --&gt;
          &lt;Button
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Add marks"
              android:visibility="gone"
              android:id="@+id/marksButtonId"/&gt;       
  &lt;/LinearLayout&gt;
  
  &lt;!--  Here is the Marking Scheme Layout --&gt;
  &lt;RelativeLayout
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:visibility="gone"
      android:background="@drawable/marks_background"
      android:id="@+id/marksRelativeLayout"&gt;
      &lt;!--  Element Title --&gt;
      &lt;TextView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_centerHorizontal="true"
          android:id="@+id/markTitle"
          android:padding="10dp"/&gt;
      &lt;!--  Instructions --&gt;
       &lt;TextView
           android:layout_width="wrap_content"
           android:layout_height="wrap_content"
           android:text="Enter the score"
           android:id="@+id/markDescription"
           android:padding="10dp"
           android:layout_centerHorizontal="true"
           android:layout_below="@id/markTitle"/&gt;
       &lt;!--  Previous Button --&gt;
      &lt;Button
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="Previous"
          android:id="@+id/previousMarkButton"
          android:layout_below="@id/markDescription"
          android:layout_alignParentLeft="true"
          android:layout_marginLeft="10dp"/&gt;
      &lt;!--  Marking Scheme --&gt;
      &lt;RadioGroup
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:orientation="horizontal"
          android:padding="10dp"
          android:layout_below="@id/markDescription"
          android:layout_toRightOf="@id/previousMarkButton"
          android:id="@+id/marksRadioGroup"&gt;
          &lt;RadioButton 
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="0"
              android:id="@+id/radioButton0"/&gt;
          &lt;RadioButton 
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="1"
              android:id="@+id/radioButton1"/&gt;
          &lt;RadioButton 
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="2"
              android:id="@+id/radioButton2"/&gt;
      &lt;/RadioGroup&gt;
      &lt;!-- Next Button --&gt;
      &lt;Button
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="Next"
          android:id="@+id/nextMarkButton"
          android:layout_below="@id/markDescription"
          android:layout_marginRight="10dp"
          android:layout_toRightOf="@id/marksRadioGroup"/&gt;
      &lt;!--  Done Button --&gt;
      &lt;Button
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="Done"
          android:id="@+id/doneMarkButton"
          android:layout_centerHorizontal="true"
          android:layout_marginBottom="10dp"
          android:layout_below="@id/marksRadioGroup"/&gt;
  &lt;/RelativeLayout&gt;
  
  &lt;/FrameLayout&gt;
  </code></pre>
  
  <p>Here's an image:
  <img src="https://i.stack.imgur.com/L4uSO.jpg" alt="How the buttons appear">
  <img src="https://i.stack.imgur.com/l1Rh9.jpg" alt="With the LinearLayout having a red background"></p>