title: How do you disable the SoftKeyboard key preview window?
body: <p>When creating your own SoftKeyboard you are given a "key preview" by default.</p>
  
  <p><img src="https://i.stack.imgur.com/HERd2.png" alt="enter image description here"> 
  <img src="https://i.stack.imgur.com/Xw0AA.png" alt="enter image description here"></p>
  
  <p>How do you disable this?</p>
  
  <p><strong>Edit:</strong> </p>
  
  <p>You can customise the <code>keyPreview</code> layout by changing the <code>&lt;KeyboardView&gt;</code> attribute <code>android:keyPreviewLayout</code>. This is styled by default to look at <a href="http://www.google.com/codesearch#cZwlSNS7aEw/frameworks/base/core/res/res/layout/keyboard_key_preview.xml&amp;type=cs" rel="noreferrer">keyboard_key_preview.xml</a>:</p>
  
  <p><strong>Edit 2:</strong> <em>Following my be a red herring:</em></p>
  
  <p>The source code suggests supplying 0 or not applying the tag <code>android:keyPreviewLayout</code> will result in no key preview appearing:</p>
  
  <pre><code>    ...
      case com.android.internal.R.styleable.KeyboardView_keyPreviewLayout:
          previewLayout = a.getResourceId(attr, 0);
          break; 
      ...
      if (previewLayout != 0) {
          mPreviewText = (TextView) inflate.inflate(previewLayout, null);
          mPreviewTextSizeLarge = (int) mPreviewText.getTextSize();
          mPreviewPopup.setContentView(mPreviewText);
          mPreviewPopup.setBackgroundDrawable(null);
      } else {
          mShowPreview = false;
      }  
  </code></pre>
  
  <p>I've tried:</p>
  
  <ul>
  <li>A styled KeyboardView with no keyPreviewLayout (Strangely though replacing this value changed the style of the preview.)</li>
  <li>I made a <code>keyPreviewLayout</code> reference an id with a value of 0 (which causes a crash on inflation). </li>
  </ul>
  
  <p>Stumped. :( Any help would be greatly appreciated!</p>