Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/206.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 软键板不来了_Android_Android Edittext_Android Softkeyboard - Fatal编程技术网

Android 软键板不来了

Android 软键板不来了,android,android-edittext,android-softkeyboard,Android,Android Edittext,Android Softkeyboard,我有一个编辑文本,基于某些条件,我动态地想要执行单击,所以我使用:0editText.performClick() 使用此按钮,会触发单击事件,并且我可以在编辑文本中看到焦点,但软键盘不会出现,我还尝试了:- ((InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE)).showSoftInput(editText, InputMethodManager.SHOW_IMPLICI

我有一个编辑文本,基于某些条件,我动态地想要执行单击,所以我使用:0
editText.performClick()

使用此按钮,会触发单击事件,并且我可以在编辑文本中看到焦点,但软键盘不会出现,我还尝试了:-

((InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE)).showSoftInput(editText,
                    InputMethodManager.SHOW_IMPLICIT);


但是键盘没有打开。。。。任何想法。。。。。谢谢:)

试试InputMethodManager的toggleSoftInput方法

((InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE)).showSoftInput(editText,
                    InputMethodManager.SHOW_FORCED);