android edittext不弹出软键盘
2013-01-06 13:02
316 查看
EditText 不弹出软件键盘2011-05-17 12:291.EditText默认不弹出软件键盘
方法一:
在AndroidMainfest.xml中选择哪个activity,设置windowSoftInputMode属性为adjustUnspecified|stateHidden
例如:
方法二:
让EditText失去焦点,使用EditText的clearFocus方法
例如:
方法三:
强制隐藏Android输入法窗口
例如:
2.EditText始终不弹出软件键盘
例:
方法一:
在AndroidMainfest.xml中选择哪个activity,设置windowSoftInputMode属性为adjustUnspecified|stateHidden
例如:
<activity android:name=".Main" android:label="@string/app_name" android:windowSoftInputMode="adjustUnspecified|stateHidden" android:configChanges="orientation|keyboardHidden"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity>
方法二:
让EditText失去焦点,使用EditText的clearFocus方法
例如:
EditText edit=(EditText)findViewById(R.id.edit); edit.clearFocus();
方法三:
强制隐藏Android输入法窗口
例如:
EditText edit=(EditText)findViewById(R.id.edit); InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(edit.getWindowToken(),0);
2.EditText始终不弹出软件键盘
例:
EditText edit=(EditText)findViewById(R.id.edit); edit.setInputType(InputType.TYPE_NULL);
相关文章推荐
- AndroidのEditText失去焦点,edittext禁止弹出键盘
- Android edittext 键盘 弹出问题总结
- Android禁止输入框控件EditText弹出软键盘
- android开发中防止刚进入activity时edittext获取焦点,防止自动弹出软键盘
- Android.edittext点击时,隐藏系统弹出的键盘,显示出光标
- android edittext不弹出软键盘
- Android 禁止editText弹出软键盘(带光标) 并解决其他editText弹出软键盘后 切换回来 小键盘隐藏
- Android Edittext获取焦点后,弹出的软键盘显示搜索、发送、完成等功能
- 关于android中EditText自动获取焦点并弹出键盘的相关设置
- Android避免进入页面EditText自动弹出软键盘
- 如何在点击android中的EditText的时候不弹出软键盘
- Android 点击EditText的时候弹出软键盘,点击EditText之外空白处软键盘消失
- Android中使EditText失去焦点,edittext禁止弹出键盘
- Android.EditText点击时,隐藏系统弹出的键盘,显示出光标
- android EditText 设置弹出数字输入法键盘
- Android开发之将Edittext输入弹出的软键盘设置搜索确定键。详细代码,已验证可用。
- android开发中防止刚进入activity时edittext获取焦点,防止自动自动弹出软键盘
- EditText添加android:imeOptions="actionSearch"弹出的键盘中带有搜索按钮
- Android自己定义dialog中的EditText无法弹出键盘的解决
- Android中使EditText失去焦点,edittext禁止弹出键盘