---今天搞软键盘隐藏..发现怎么也不隐藏...当点击EditText的时候,还是出来了输入法..
试过如下方法:
//1.代码中
InputMethodManager im =(InputMethodManager) this .getSystemService(Context.INPUT_METHOD_SERVICE);
imm.toggleSoftInput(InputMethodManager.SHOW_IMPLICIT, InputMethodManager.HIDE_NOT_ALWAYS);
imm.hideSoftInputFromWindow(holder.editNumber.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);
imm.hideSoftInputFromInputMethod(holder.editNumber.getWindowToken(),InputMethodManager.HIDE_NOT_ALWAYS);
//2.xml中
<activity android:name=".CallActivity"
android:windowSoftInputMode="stateAlwaysHidden"//加入这行
/>
//都不行...
//后面直接设置EditText的inputType属性就可以了
//代码如下:
EditText et=(EditText)findViewById(R.id.edit);
et.setInputType(InputType.TYPE_DATETIME_VARIATION_NORMAL);
20110829