我想在程序开启时,把程序中的软键盘隐藏。使用的以下代码,没有得出结果,如何修改呢?谢谢。
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(notes.getWindowToken(), 0);
我想在程序开启时,把程序中的软键盘隐藏。使用的以下代码,没有得出结果,如何修改呢?谢谢。
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(notes.getWindowToken(), 0);
EditText et=(EditText)findViewById(R.id.edit);
et.setInputType(InputType.TYPE_DATETIME_VARIATION_NORMAL);