Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/asp.net-mvc-3/4.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 Fragments_Android Edittext_Android Softkeyboard - Fatal编程技术网

Android 如何在启动活动后在片段中以文本形式显示软键盘?

Android 如何在启动活动后在片段中以文本形式显示软键盘?,android,android-fragments,android-edittext,android-softkeyboard,Android,Android Fragments,Android Edittext,Android Softkeyboard,我在活动启动时显示的片段中有EditText 我想在发布后展示一下软键盘 我在片段的onStart方法中使用了这个问题中的代码,但它不起作用 我应该将代码放在哪个片段方法中?事实上,最好的解决方案是将android:windowSoftInputMode=stateVisible放在Activity部分的AndroidManifest.xml 它工作得非常好。事实上,最好的解决方案是将android:windowSoftInputMode=stateVisible放在AndroidManifes

我在
活动启动时显示的
片段中有
EditText

我想在发布后展示一下软键盘

我在片段的
onStart
方法中使用了这个问题中的代码,但它不起作用


我应该将代码放在哪个片段方法中?

事实上,最好的解决方案是将
android:windowSoftInputMode=stateVisible
放在
Activity
部分的
AndroidManifest.xml


它工作得非常好。

事实上,最好的解决方案是将
android:windowSoftInputMode=stateVisible
放在
AndroidManifest.xml的
活动
部分

它工作得很好