public void onPress(int primaryCode) { mInputView.setPreviewEnabled(false); } public void onRelease(int primaryCode) { mInputView.setPreviewEnabled(true);
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; }
highpass
source share