Pergunta

I would like to disable the virtual key pad that appears when the focus falls on a edit text element.

I've tried it with the following code:

((EditText)findViewById(R.id.EditTextYears)).setOnTouchListener(new OnTouchListener() {
    @Override
    public boolean onTouch(View v, MotionEvent event) {
        return false;
    }
});

This works partially. The virtual key pad doesn't appear, but I can't focus on the edit text element as well, which I need to be able to do.

Foi útil?
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top