Android TextField : set focus + soft input programmatically
2013-11-28 14:18
489 查看
Good sir, try this:
Im not sure, but this might be required on some phones (some of the older devices):
View Code
edittext.setFocusableInTouchMode(true); edittext.requestFocus();
Im not sure, but this might be required on some phones (some of the older devices):
finalInputMethodManager inputMethodManager =(InputMethodManager) context .getSystemService(Context.INPUT_METHOD_SERVICE); inputMethodManager.showSoftInput(edittext,InputMethodManager.SHOW_IMPLICIT);
View Code
http://stackoverflow.com/questions/8080579/android-textfield-set-focus-soft-input-programmatically
相关文章推荐
- Android 使用反射调用Hide方法setShowSoftInputOnFocus
- <Android>关于EditText中setInputType和setSingleLine的冲突
- android中showSoftInput不起作用
- Android之设置EditText输入类型(setInputType()方法和android:inputType属性)
- EditTexit只输入数字 android:digits 与始终隐藏软键盘setInputType冲突解决
- Android - 隐藏EditText弹出的软键盘输入(SoftInput)
- android:inputType属性和setInputType()方法参数对应整理
- Android中EditText 的setInputType以及setRawInputType区别
- android EditText setInputType,setRawInputType 的使用详解
- Android Api demo系列(10) (App>Activity>SoftInputModes键盘显示方式)
- android showSoftInput方法调用软键盘不显示
- android:windowsSoftInputMode=""详解
- angularjs How to set focus on input field?
- Android - 隐藏EditText弹出的软键盘输入(SoftInput)
- Android SoftInputModes设置
- Android SoftInputMode为SOFT_INPUT_ADJUST_RESIZE(adjustResize)时没有resize动画的问题
- Android输入法管理器设置输入法类型通过setCurrentInputMethodSubtype来设置
- android softinput 相关
- android 输入法WINDOW_FOCUS_CHANGED|MSG_CREATE_SESSION|MSG_BIND_INPUT|MSG_START_INPUT|MSG_BIND_METHOD消息
- How to set the default input focus on a field in an HTML web form