title: Soft keyboard's POPUP layout
body: <p>I'm developing a soft keyboard and doing well, but I don't know how to customize the popup layout for a long keypress.</p>
  
  <h3>My KeyboardView: </h3>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;android.inputmethodservice.KeyboardView
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:id="@+id/keyboard"
  android:layout_width="match_parent"
  android:layout_height="wrap_content"
  android:layout_alignParentBottom="true"
  android:keyPreviewLayout="@layout/preview"
  android:keyBackground="@drawable/key_selector"
  android:shadowRadius="0.0"
  android:keyTextColor="#000000"
  /&gt;
  </code></pre>
  
  <h3>My keyboard layout: </h3>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;Keyboard xmlns:android="http://schemas.android.com/apk/res/android"
  android:keyWidth="10%p"
  android:keyHeight="10%p"&gt;
  
  &lt;Row android:verticalGap="1%p"  android:horizontalGap="0.5%p" android:keyHeight="8%p" android:keyWidth="9.6%p"&gt;
      &lt;Key android:codes="113"    android:keyLabel="q" /&gt;
      &lt;Key android:codes="119"    android:keyLabel="w" /&gt;
      &lt;Key android:codes="101"    android:keyLabel="e"  
          /&gt;
      &lt;Key android:codes="114"    android:keyLabel="r" /&gt;
      &lt;Key android:codes="116"    android:keyLabel="t" /&gt;
      &lt;Key android:codes="121"    android:keyLabel="y"
           android:popupKeyboard="@xml/keyboard_popup" android:popupCharacters="yýÿ"/&gt;
      &lt;Key android:codes="117"    android:keyLabel="u"
           android:popupKeyboard="@xml/keyboard_popup" android:popupCharacters="uúùũûü"/&gt;
      &lt;Key android:codes="105"    android:keyLabel="i" 
           android:popupKeyboard="@xml/keyboard_popup" android:popupCharacters="iíìĩîï"/&gt;
      &lt;Key android:codes="111"    android:keyLabel="o" 
           android:popupKeyboard="@xml/keyboard_popup" android:popupCharacters="oóò&amp;#245;ôö" /&gt;
      &lt;Key android:codes="112"    android:keyLabel="p" /&gt;
  &lt;/Row&gt;
  &lt;Row android:verticalGap="1%p" android:horizontalGap="0.5%p" android:keyHeight="8%p" android:keyWidth="9.6%p"&gt;
      &lt;Key android:codes="97"    android:keyLabel="a" android:keyEdgeFlags="left" android:horizontalGap="5%p"
           android:popupKeyboard="@xml/keyboard_popup" android:popupCharacters="aáà&amp;#227;âä"/&gt;
      &lt;Key android:codes="115"    android:keyLabel="s" /&gt;
      &lt;Key android:codes="100"    android:keyLabel="d" /&gt;
      &lt;Key android:codes="102"    android:keyLabel="f" /&gt;
      &lt;Key android:codes="103"    android:keyLabel="g" /&gt;
      &lt;Key android:codes="104"    android:keyLabel="h" /&gt;
      &lt;Key android:codes="106"    android:keyLabel="j" /&gt;
      &lt;Key android:codes="107"    android:keyLabel="k" /&gt;
      &lt;Key android:codes="108"    android:keyLabel="l" /&gt;
  &lt;/Row&gt;
  &lt;Row android:verticalGap="1%p"  android:horizontalGap="0.5%p" android:keyHeight="8%p" android:keyWidth="9.6%p"&gt;
      &lt;Key android:codes="3"      android:keyIcon="@drawable/keyboard_shift_off" 
           android:keyHeight="7.6%p" android:keyWidth="13.7%p"/&gt;
      &lt;Key android:codes="122"    android:keyLabel="z" android:horizontalGap="1%p"/&gt;
      &lt;Key android:codes="120"    android:keyLabel="x" /&gt;
      &lt;Key android:codes="99"     android:keyLabel="c"
           android:popupKeyboard="@xml/keyboard_popup" android:popupCharacters="cç"/&gt;
      &lt;Key android:codes="118"    android:keyLabel="v" /&gt;
      &lt;Key android:codes="98"     android:keyLabel="b" /&gt;
      &lt;Key android:codes="110"    android:keyLabel="n"
           android:popupKeyboard="@xml/keyboard_popup" android:popupCharacters="nñ"/&gt;
      &lt;Key android:codes="109"    android:keyLabel="m" /&gt;
      &lt;Key android:codes="-5"     android:keyIcon="@drawable/sym_keyboard_delete_dim"
          android:keyHeight="7.6%p" android:keyWidth="13.7%p" 
          android:horizontalGap="1%p"/&gt;
  &lt;/Row&gt;
  &lt;Row android:verticalGap="1%p"  android:horizontalGap="0.5%p" android:keyHeight="8%p" android:keyWidth="9.6%p"&gt;
      &lt;Key android:codes="-16"    android:keyIcon="@drawable/keyboard_symbol"
           android:keyHeight="7.6%p" android:keyWidth="18.7%p"/&gt;
      &lt;Key android:codes="44"     android:keyLabel="," android:horizontalGap="1%p"/&gt;
      &lt;Key android:codes="32"     android:keyIcon="@drawable/sym_keyboard_feedback_space" android:keyWidth="40%p"/&gt;
      &lt;Key android:codes="46"     android:keyLabel="."/&gt;
      &lt;Key android:codes="-3"     android:keyIcon="@drawable/keyboard_go" 
          android:keyHeight="7.6%p" android:keyWidth="18.5%p" android:horizontalGap="1%p"/&gt;
  &lt;/Row&gt;
  </code></pre>
  
  <p></p>
  
  <h3>The keyboard popup XML: </h3>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;Keyboard xmlns:android="http://schemas.android.com/apk/res/android"
  android:keyWidth="10%p"
  android:keyHeight="10%p"&gt;
  &lt;/Keyboard&gt;
  </code></pre>
  
  <p>I tried putting <em>keyBackground</em> and <em>background properties</em> everywhere, but not successfully. I tried to put:</p>
  
  <pre><code>android:popupLayout="@layout/keyboard"
  </code></pre>
  
  <p>...On the <em>keyboardView</em> but get nullpointer, maybe I'm putting a wrong XML in that parameter?</p>
  
  <p>In the <em>keyboard popup</em> XML that I put here:</p>
  
  <pre><code>android:popupKeyboard="@xml/keyboard_popup"
  </code></pre>
  
  <p>I can change the layout's size, key size, key gap, and other things, but can't change the colors or backgrounds.</p>
  
  <p>The <em>key preview</em> also is doing well, I put this on the <em>keyboardView</em>:</p>
  
  <pre><code>android:keyPreviewLayout="@layout/preview"
  </code></pre>
  
  <p>...And it works. I think the popup should be the same way, but it's not.</p>
  
  <h3>How can I customize the popup window that appears for a long keypress?</h3>