hide virtual keyboard in android?

后端 未结 4 860
情深已故
情深已故 2021-01-25 08:08

Hi i won\'t want to show virtual keyboard even user touch the editText field.

4条回答
  •  Happy的楠姐
    2021-01-25 08:43

    Have you tried adding android:configChanges="keyboard|keyboardHidden" into your activity?

    e.g.:

    
    

    Not sure if it applies to the onscreen keyboard as well as a physical one.

    Also you can mess with the On Screen Keyboard using the InputMethodManager, for example to hide it you could use:

    InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
    imm.hideSoftInputFromWindow(mCurretnView.getWindowToken(), 0);
    

提交回复
热议问题