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/
精彩评论