prasad.gai
prasad.gai

Reputation: 2987

How to disable the virtual key pad in Android?

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.

Upvotes: 0

Views: 400

Answers (1)

Jana
Jana

Reputation: 2920

probably this should help http://www.androidpeople.com/android-hide-virtual-keyboard-through-code/

Upvotes: 1

Related Questions