class="java" name="code"> editText.setOnTouchListener(new OnTouchListener() { public boolean onTouch(View v, MotionEvent event) { int inType = editText.getInputType(); // backup the input type editText.setInputType(InputType.TYPE_NULL); // disable soft input editText.onTouchEvent(event); // call native handler editText.setInputType(inType); // restore input type return true; } });