I'm trying to override the soft input keyboard for a singular EditText field. I've mostly been following this excellent example -- setting the XML to inputType="text", and then, within the onCreate:
EditText amount = (EditText) findViewById(R.id.amount_edit_text); final EditText amt = amount; amount.setOnFocusChangeListener(new OnFocusChangeListener() { @Override public void onFocusChange(View v, boolean hasFocus) { if (hasFocus) { showCustomKeyboard(v); } else { hideCustomKeyboard(); } } }); amount.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { showCustomKeyboard(v); } }); amount.setOnTouchListener(new OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { EditText edittext = (EditText) v; int inType = edittext.getInputType(); edittext.setInputType(InputType.TYPE_NULL); edittext.onTouchEvent(event); edittext.setInputType(inType); return true; } }); This works for the most part -- clicking on the EditText brings up my custom keyboard, but there's always a jump. It's very quick, but it'll show my keyboard stacking on top of the standard keyboard, and then the standard keyboard will collapse and my keyboard will be left. And at times, it will arbitrarily not collapse and simply just stack...
Is there any way to override the standard keyboard with my own without this jump?