Hi i won\'t want to show virtual keyboard even user touch the editText field.
try this
@Override
public boolean dispatchTouchEvent(MotionEvent event) {
boolean ret = super.dispatchTouchEvent(event);
InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(mCurretnView.getWindowToken(), 0);
return ret;
}
or
editText.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(mCurretnView.getWindowToken(), 0);
return false;
}
});