Hide Android Keyboard Keyboard Preview

What I'm looking for is to hide only pop-ups that show which key you press when using the soft keyboard. Is it possible? I create my own new keyboard that they don’t need.

From what I think I understand, the picture below is the actual popup keyboard that you can select using android:popupKeyboard and android:popupCharacters in XML Keyboard.Key .

Popup Android Keyboards

But the image below is not the same (see this image ). Is there a way to disable this using XML or even programmatically?

Android Keyboard Popups

+8
android
source share
2 answers

After reading a bit of the actual Android keyboard source code :

What I had in mind was a "key preview", which is a "pop-up window showing an enlarged version of the key pressed." By default, preview is enabled, but to disable it, just setPreviewEnabled(boolean previewEnabled) . This is a method from the KeyboardView class. API

+14
source share
 public void onPress(int primaryCode) { mInputView.setPreviewEnabled(false); } public void onRelease(int primaryCode) { mInputView.setPreviewEnabled(true); //Change to false if you want remove too for the Del key when it pressed } 

In addition, to get an idea and to disable preview everywhere from a custom class extending InputMethodService

  private KeyboardView mInputView; @Override public KeyboardView onCreateInputView() { mInputView = (KeyboardView)getLayoutInflater().inflate(R.layout.keyboard, null); mInputView .setPreviewEnabled(false); return mInputView; } 
+5
source share

All Articles