开发者

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 onT开发者_JS百科ouch(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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜