title: How do I make a view float above other views in an IME?
body: <p>I am trying to make a ListView <strong>in my IME</strong> "float" in the middle of the screen, just like the Swype keyboard:</p>
  
  <p><img src="https://i.stack.imgur.com/RTGg3.png" alt="enter image description here"></p>
  
  <p>I've read how to do it in an Activity by using a FrameLayout, but it isn't working in my IME, which is a Service not an Activity. My input view consists of a FrameLayout as the root view, a child RelativeLayout containing several controls, and the ListView which is also a child of the FrameLayout. Here is my layout code:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
                android:layout_width="fill_parent" 
                android:layout_height="wrap_content"
                android:layout_gravity="bottom" 
                android:gravity="center_horizontal" &gt;
  
      &lt;!-- Most of the controls are children of this RelativeLayout --&gt;
      &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
                    android:layout_width="fill_parent" 
                    android:layout_height="wrap_content"
                    android:gravity="center" &gt;
  
          &lt;Button android:id="@+id/btnOption1"
                  android:layout_width="wrap_content" 
                  android:layout_height="wrap_content"
                  android:layout_marginRight="10dp" 
                  android:layout_alignParentLeft="true"
                  android:layout_toLeftOf="@+id/imgArrow"
                  android:layout_marginTop="10dp" 
                  android:textSize="18dp"
                  android:textColor="#ffffff"
                  android:background="@drawable/button"
                  android:padding="4dp"
                  android:text="Option 1" /&gt;
  
          &lt;ImageView android:id="@id/imgArrow"
                  android:layout_width="wrap_content" 
                  android:layout_height="wrap_content"
                  android:layout_marginRight="10dp" 
                  android:layout_centerHorizontal="true"
              android:layout_alignBottom="@id/btnOption1"
                  android:layout_marginTop="10dp" 
                  android:padding="4dp"
                  android:src="@drawable/arrow_right" /&gt;
  
          &lt;Button android:id="@+id/btnOption2"
                  android:layout_width="wrap_content" 
                  android:layout_height="wrap_content"
                  android:layout_alignParentRight="true"
                  android:layout_toRightOf="@id/imgArrow"
                  android:layout_marginTop="10dp" 
                  android:textSize="18dp"
                  android:textColor="#ffffff"
                  android:background="@drawable/button"
                  android:padding="4dp"
                  android:text="Option 2" /&gt;
  
      &lt;!-- Translate button --&gt;
      &lt;Button android:id="@+id/btnContinue"
              android:layout_width="fill_parent" 
              android:layout_height="wrap_content"
              android:layout_centerHorizontal="true"
              android:layout_below="@id/imgArrow"
              android:layout_marginTop="10dp" 
              android:layout_marginBottom="10dp" 
              android:textSize="22dp"
              android:textColor="#ffffff"
              android:background="@drawable/button"
              android:text="Translate!" /&gt;
  
          &lt;!-- Keyboard button --&gt;
          &lt;ImageButton android:id="@+id/btnKeyboard"
                  android:layout_width="wrap_content" 
                  android:layout_height="wrap_content"
                  android:layout_alignParentLeft="true"
                  android:layout_below="@id/btnContinue"
                  android:layout_marginRight="4dp" 
                  android:textColor="#ffffff"
                  android:background="@drawable/button"
                  android:src="@drawable/sym_keyboard_kb" /&gt;
  
          &lt;!-- Undo button --&gt;
          &lt;ImageButton android:id="@+id/btnUndo"
                  android:layout_width="wrap_content" 
                  android:layout_height="wrap_content"
                  android:layout_alignParentRight="true"
                  android:layout_below="@id/btnContinue"
                  android:textColor="#ffffff"
                  android:background="@drawable/button"
                  android:src="@drawable/sym_keyboard_undo" /&gt;
  
      &lt;/RelativeLayout&gt;
  
  &lt;ListView android:id="@+id/menuOptions"
            style="@style/optionsMenu" /&gt;
  
  &lt;/FrameLayout&gt;
  </code></pre>
  
  <p>The ListView and IME look like this (inside the SMS app):</p>
  
  <p><img src="https://i.stack.imgur.com/Gryhj.png" alt="enter image description here"></p>
  
  <p>But I want it to look like this:</p>
  
  <p><img src="https://i.stack.imgur.com/2i3tW.png" alt="enter image description here"></p>
  
  <p>In other words I want it to appear <strong>outside</strong> the IME input view. If Swype can do it, I know I can (with a little help). Any suggestions?</p>
  
  <p>Thanks in advance!
  Barry</p>