title: Android - Set a view to be on top of items drawn with canvas
body: <p>I have an android app where the user paints, moves and reshapes some objects over a photo. In this page my screen layout consists of the photo that is loaded and below it (in portrait view) some buttons. My view looks exactly as I want it with the xml below:</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:orientation="vertical"
      android:id="@+id/linear" &gt;
  
      &lt;LinearLayout
          android:id="@+id/buttons"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:orientation="horizontal"
          android:gravity="center"
          android:layout_alignParentBottom="true"&gt;   
  
              &lt;ImageView
                  android:id="@+id/draw"
                  android:layout_width="80dp"
                  android:layout_height="50dp"
                  android:clickable="true"
                  android:src="@drawable/draw"/&gt;
  
              &lt;ImageView
                  android:id="@+id/delete"
                  android:layout_width="80dp"
                  android:layout_height="50dp"
                  android:clickable="true"
                  android:layout_toRightOf="@+id/erase"
                  android:src="@drawable/delete"/&gt;
  
              &lt;ImageView
                  android:id="@+id/done"
                  android:layout_width="80dp"
                  android:clickable="true"
                  android:layout_height="50dp"
                  android:layout_toRightOf="@+id/delete"          
                  android:src="@drawable/done"/&gt;         
  
          &lt;/LinearLayout&gt;     
  
  
  
      &lt;ImageView
          android:id="@+id/photo"
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"
          android:layout_gravity="center"
          android:layout_above="@id/buttons"/&gt;
  
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>The problem is that I want the buttons to be always on top of the painted objects. Now if the user paints a line and then moves it in a way that one edge will go lower than the image, then this line will be over the buttons. It will be untouchable at that point because the canvas is set to the bitmap that has my image, but it will be visible. I would like it to disappear in the way it disappears if part of the line gets out of screen. </p>
  
  <p>How can I implement this? Is there some attribute that can ensure that these buttons are always over the painted objects? Thank you in advance!</p>